org.pojomatic.internal
Class AbstractPropertyElement<E extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member>
java.lang.Object
org.pojomatic.internal.AbstractPropertyElement<E>
- All Implemented Interfaces:
- PropertyElement
- Direct Known Subclasses:
- PropertyAccessor, PropertyField
public abstract class AbstractPropertyElement<E extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member>
- extends java.lang.Object
- implements PropertyElement
Method Summary |
protected abstract java.lang.Object |
accessValue(java.lang.Object instance)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.Class<?> |
getDeclaringClass()
Get the class object representing the class or interface declaring this property. |
java.lang.reflect.AnnotatedElement |
getElement()
Get the original annotated element that this property is derived from. |
java.lang.String |
getName()
Get the name of this property. |
java.lang.Object |
getValue(java.lang.Object instance)
Get the value held by this property from the given instance. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
element
protected final E extends java.lang.reflect.AccessibleObject & java.lang.reflect.Member element
AbstractPropertyElement
protected AbstractPropertyElement(E element,
java.lang.String name)
getName
public java.lang.String getName()
- Description copied from interface:
PropertyElement
- Get the name of this property.
- Specified by:
getName
in interface PropertyElement
- Returns:
- the name of this property.
getValue
public java.lang.Object getValue(java.lang.Object instance)
- Description copied from interface:
PropertyElement
- Get the value held by this property from the given instance.
- Specified by:
getValue
in interface PropertyElement
- Parameters:
instance
- the instance to get the value from
- Returns:
- the value held by the instance
accessValue
protected abstract java.lang.Object accessValue(java.lang.Object instance)
throws java.lang.IllegalAccessException,
java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
getElement
public java.lang.reflect.AnnotatedElement getElement()
- Description copied from interface:
PropertyElement
- Get the original annotated element that this property is derived from.
- Specified by:
getElement
in interface PropertyElement
- Returns:
- the original annotated element that this property is derived from.
getDeclaringClass
public java.lang.Class<?> getDeclaringClass()
- Description copied from interface:
PropertyElement
- Get the class object representing the class or interface declaring this property.
- Specified by:
getDeclaringClass
in interface PropertyElement
- Returns:
- the declaring class or interface of this property.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2008-2010. All Rights Reserved.