|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjve.generated.PropertyHelper
This helper provide the details of resolving an Object/Property string into the final object.
For example:
Object=Foo, Property=address.zip will be resolved into Foo.getAddress().getZip()
Object=Foo, Property=null will be resolved into Foo
It serves as an element to be cached and thrown away when the underlying object changes.
Note: the object can not be a Collection or an array of Objects.
| Constructor Summary | |
PropertyHelper(ObjectReference val)
Create a property helper for the given ObjectReference. |
|
PropertyHelper(java.lang.Object o,
java.lang.String prop)
Create a property helper for the given object and property string. |
|
| Method Summary | |
java.lang.Class |
getType()
Get the type of the property for this PropertyHelper. |
static java.lang.Class |
getType(java.lang.Class root,
java.lang.String property)
Get the type of the given dotted property, rooted from the given class. |
java.lang.Object |
getValue()
Get the final value of the property (the last property in the dotted property value). |
boolean |
isPrimitive()
Check to see if the target property's type is a Java primitive type. |
boolean |
isReadOnly()
Check to see if the target property is read only. |
void |
setValue(java.lang.Object val)
Set the value of the target property to the given value. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PropertyHelper(java.lang.Object o,
java.lang.String prop)
o - the target objectprop - the property on the target object. May be null.public PropertyHelper(ObjectReference val)
val - the referenced object to resolve.| Method Detail |
public java.lang.Object getValue()
public boolean isReadOnly()
public boolean isPrimitive()
public void setValue(java.lang.Object val)
val - the value to setpublic java.lang.String toString()
public static java.lang.Class getType(java.lang.Class root,
java.lang.String property)
root - the base class to retrieve the property fromproperty - the target property (may be dotted - foo.bar.baz)
public java.lang.Class getType()
throws java.lang.IllegalStateException
java.lang.IllegalStateException - if the property value is invalid.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||