|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.rice.krad.uif.util.ObjectPropertyReference
public class ObjectPropertyReference
Represents a property reference in a path expression, for use in implementing
ObjectPathExpressionParser.PathEntry.
This class defers the actual resolution of property references nodes in a path expression until the transition between parse nodes. This facilitates traversal to the final node in the path.
ObjectPathExpressionParser.parsePathExpression(Object, String, PathEntry)| Method Summary | |
|---|---|
boolean |
canRead()
Determine if the bean property is readable. |
boolean |
canWrite()
Determine if the property is writable. |
Object |
get()
Get the property value for a specific bean property of a known bean class. |
Object |
getBean()
Get the bean. |
Class<?> |
getBeanClass()
Get the bean class. |
Object |
getFromReadMethod()
Get the property value for a specific bean property of a known bean class. |
Class<?> |
getImplClass()
Get the bean implementation class. |
String |
getName()
Get the property name. |
Class<?> |
getPropertyType()
Get the type of a specific property on the implementation class. |
static boolean |
isWarning()
Determine if a warning should be logged on when an invalid property is encountered on the current thread. |
static ObjectPropertyReference |
resolvePath(Object bean,
Class<?> beanClass,
String propertyPath,
boolean grow)
Resolve a path expression on a bean. |
static ObjectPropertyReference |
resolveProperty(Object bean,
Class<?> beanClass,
String propertyPath)
Get a single-use reference for resolving a property on a bean. |
void |
set(Object propertyValue)
Set the property to a specific value. |
static void |
setWarning(boolean warning)
Indicate whether or not a warning should be logged on when an invalid property is encountered on the current thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean isWarning()
public static void setWarning(boolean warning)
warning - True to log warnings when invalid properties are encountered, false to ignore
invalid properties.
public static ObjectPropertyReference resolvePath(Object bean,
Class<?> beanClass,
String propertyPath,
boolean grow)
bean - The bean.beanClass - The bean class.propertyPath - The property path expression.grow - True to create objects while traversing the path, false to traverse class
structure only when referring to null.
public static ObjectPropertyReference resolveProperty(Object bean,
Class<?> beanClass,
String propertyPath)
When using this method, the property name will be treated as-is, and will not be resolved as a path expression.
bean - The bean.beanClass - The bean class.propertyPath - The property path.
public Object getBean()
public Class<?> getBeanClass()
The bean class may be a super-class of the bean, and is likely to be an abstract class or interface.
getBean() is
either null, or that getBeanClass().isInstance(getBean()) will always return
true.public Class<?> getImplClass()
getBeanClass(). When
getBean() returns a non-null value it is expected that getBean().
getClass() == getImplClass().public String getName()
public boolean canRead()
public boolean canWrite()
public Object getFromReadMethod()
public Object get()
public Class<?> getPropertyType()
public void set(Object propertyValue)
propertyValue - The property value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||