|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertyAccessor
Used to get and set object properties based on an xpath expression.
Method Summary | |
---|---|
boolean |
canHandle(Object object,
String xpath,
Class target)
Determines if the property accessor can handle the property denoted by xpath. |
Object |
get(Object object,
String xpath,
Class target)
Accesses a property of object via xpath expression. |
void |
set(Object object,
String xpath,
Object value,
Class target)
Sets a property of object via xpath expression. |
Method Detail |
---|
boolean canHandle(Object object, String xpath, Class target)
Can be used to perform checks against schema to ensure that the propery accessor will actually work with the provided instance.
object
- The target object.xpath
- An xpath expression denoting a property of the target object.
true
if the property can be accessed, otherwise false
Object get(Object object, String xpath, Class target) throws IllegalArgumentException
#canHandle(Object, String)
should be called before calling this method to ensure
that the property can be safely accessed.
object
- The target object.xpath
- An xpath expression denoting a property of the target object.target
- Target context we intend to access (often null or Geometry.class)
null
IllegalArgumentException
- In the even that xpath is not supported.void set(Object object, String xpath, Object value, Class target) throws IllegalArgumentException
#canHandle(Object, String)
should be called before calling this method to ensure
that the property can be safely accessed.
object
- The target object.xpath
- An xpath expression denoting a property of the target object.value
- The new value to settarget
- The target context we intend to update (often null or Geometry.class)
IllegalArgumentException
- In the even that xpath is not supported.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |