public class PropertyAccess extends AccessStrategy
DynaBean type. Otherwise the
java.beans APIs are used for Java bean property methods and we fall
back to accessing field values directly.| Constructor and Description |
|---|
PropertyAccess(Class<?> clazz,
String propertyName)
Deprecated.
|
| 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. |
static PropertyAccess |
getInstance(Class<?> clazz,
String propertyName)
Obtain a
PropertyAccess instance. |
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.
|
protected Object |
getPublicProperty(Object bean) |
int |
hashCode() |
boolean |
isKnown()
Learn whether this
PropertyAccess references a known property. |
String |
toString() |
@Deprecated public PropertyAccess(Class<?> clazz, String propertyName)
clazz - propertyName - public static PropertyAccess getInstance(Class<?> clazz, String propertyName)
PropertyAccess instance.clazz - propertyName - public ElementType getElementType()
ElementType used by this AccessStrategy
to determine property values.getElementType in class AccessStrategyprotected Object getPublicProperty(Object bean) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException
public 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–2025 The Apache Software Foundation. All rights reserved.