static final class BasicTypeConverter.ValuePointer extends java.lang.Object implements Pointer
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
bean |
private static long |
serialVersionUID |
Constructor and Description |
---|
ValuePointer(java.lang.Object object)
Create a new ValuePointer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asPath()
Returns a string that is a proper "canonical" XPath that corresponds to
this pointer.
|
java.lang.Object |
clone()
Pointers are cloneable.
|
int |
compareTo(java.lang.Object object) |
java.lang.Object |
getNode()
Returns the raw value of the object, property or collection element
this pointer represents.
|
java.lang.Object |
getRootNode()
Returns the node this pointer is based on.
|
java.lang.Object |
getValue()
Returns the value of the object, property or collection element
this pointer represents.
|
void |
setValue(java.lang.Object value)
Modifies the value of the object, property or collection element
this pointer represents.
|
private static final long serialVersionUID
private java.lang.Object bean
public ValuePointer(java.lang.Object object)
object
- valuepublic java.lang.Object getValue()
Pointer
public java.lang.Object getNode()
Pointer
public java.lang.Object getRootNode()
Pointer
getRootNode
in interface Pointer
public void setValue(java.lang.Object value)
Pointer
public java.lang.Object clone()
Pointer
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
public java.lang.String asPath()
Pointer
Pointer ptr = ctx.getPointer("//employees[firstName = 'John']")
The value of ptr.asPath()
will look something like
"/departments[2]/employees[3]"
, so, basically, it represents
the concrete location(s) of the result of a search performed by JXPath.
If an object in the pointer's path is a Dynamic Property object (like a
Map), the asPath method generates an XPath that looks like this: "
/departments[@name = 'HR']/employees[3]"
.