public class PropertyAccess extends AccessStrategy
| Constructor and Description |
|---|
PropertyAccess(Class<?> clazz,
String propertyName)
Create a new PropertyAccess instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Object |
get(Object bean)
Get the value from the given instance.
|
ElementType |
getElementType()
Get the Java program
ElementType used by this AccessStrategy
to determine property values. |
Type |
getJavaType()
Get the type of the property
|
static Object |
getProperty(Object bean,
String propertyName)
Get a named property from
bean. |
String |
getPropertyName()
Get a name representative of this property.
|
int |
hashCode() |
boolean |
isKnown()
Learn whether this
PropertyAccess references a known property. |
String |
toString() |
public ElementType getElementType()
ElementType used by this AccessStrategy
to determine property values.getElementType in class AccessStrategypublic static Object getProperty(Object bean, String propertyName) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException
bean.bean - propertyName - InvocationTargetExceptionNoSuchMethodExceptionIllegalAccessExceptionpublic Type getJavaType()
getJavaType in class AccessStrategypublic boolean isKnown()
PropertyAccess references a known property.public String getPropertyName()
getPropertyName in class AccessStrategypublic Object get(Object bean)
get in class AccessStrategyCopyright © 2010–2024 The Apache Software Foundation. All rights reserved.