|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.bval.util.AccessStrategy
org.apache.bval.util.PropertyAccess
public class PropertyAccess
Description: Undefined dynamic strategy (FIELD or METHOD access) Uses PropertyUtils or tries to determine field to
access the value
Constructor Summary | |
---|---|
PropertyAccess(Class<?> clazz,
String propertyName)
Create a new PropertyAccess instance. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyAccess(Class<?> clazz, String propertyName)
clazz
- propertyName
- Method Detail |
---|
public ElementType getElementType()
ElementType
used by this AccessStrategy
to determine property values.
getElementType
in class AccessStrategy
public static Object getProperty(Object bean, String propertyName) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException
bean
.
bean
- propertyName
-
InvocationTargetException
NoSuchMethodException
IllegalAccessException
public String toString()
toString
in class Object
public Type getJavaType()
getJavaType
in class AccessStrategy
public boolean isKnown()
PropertyAccess
references a known property.
public String getPropertyName()
getPropertyName
in class AccessStrategy
public Object get(Object bean)
get
in class AccessStrategy
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |