public class ImmutableTypeProperty extends AbstractProperty
An instance of this class is not bound to a specific instance of an object, rather it represents a re-usable defintion of a get/set pair on a given class
| Constructor and Description |
|---|
ImmutableTypeProperty(String propertyName,
org.exparity.beans.core.MethodWrapper accessor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Method |
getAccessor()
Return the accessor
Method for this property |
Object |
getValue(Object instance)
Return the value of this property.
|
<T> T |
getValue(Object instance,
Class<T> type)
Return the value of this property from the given object cast to the given type.
|
int |
hashCode() |
String |
toString() |
getDeclaringType, getDeclaringTypeCanonicalName, getDeclaringTypeSimpleName, getName, getType, getTypeCanonicalName, getTypeParameter, getTypeParameters, getTypeSimpleName, hasAnyTypeParameters, hasName, hasTypeParameter, isArray, isBoolean, isByte, isCharacter, isCollection, isDate, isDouble, isEnum, isFloat, isGeneric, isInteger, isIterable, isList, isLong, isMap, isPrimitive, isSet, isShort, isString, isType, isTypepublic ImmutableTypeProperty(String propertyName, org.exparity.beans.core.MethodWrapper accessor)
public Object getValue(Object instance)
BeanPropertyException if the property is not found on the given instancepublic <T> T getValue(Object instance, Class<T> type)
ClassCastException if the value is not of the given type.type - the type to return the value aspublic boolean equals(Object obj)
equals in class AbstractPropertypublic int hashCode()
hashCode in class AbstractPropertypublic String toString()
toString in class AbstractPropertyCopyright © 2015. All rights reserved.