|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.jxpath.ri.JXPathCompiledExpression
public class JXPathCompiledExpression
RI of CompiledExpression.
| Constructor Summary | |
|---|---|
JXPathCompiledExpression(String xpath,
Expression expression)
Create a new JXPathCompiledExpression. |
|
| Method Summary | |
|---|---|
Pointer |
createPath(JXPathContext context)
Creates intermediate elements of the path by invoking an AbstractFactory, which should first be
installed on the context by calling JXPathContext.setFactory(org.apache.commons.jxpath.AbstractFactory). |
Pointer |
createPathAndSetValue(JXPathContext context,
Object value)
The same as setValue, except it creates intermediate elements of the path by invoking an AbstractFactory, which should first be
installed on the context by calling JXPathContext.setFactory(org.apache.commons.jxpath.AbstractFactory). |
protected Expression |
getExpression()
Get the compiled expression. |
Pointer |
getPointer(JXPathContext context,
String xpath)
Traverses the xpath and returns a Pointer. |
Object |
getValue(JXPathContext context)
Evaluates the xpath and returns the resulting object. |
Object |
getValue(JXPathContext context,
Class requiredType)
Evaluates the xpath, converts the result to the specified class and returns the resulting object. |
protected String |
getXPath()
Get the source expression. |
Iterator |
iterate(JXPathContext context)
Traverses the xpath and returns a Iterator of all results found for the path. |
Iterator |
iteratePointers(JXPathContext context)
Traverses the xpath and returns an Iterator of Pointers. |
void |
removeAll(JXPathContext context)
Remove all graph elements described by this expression. |
void |
removePath(JXPathContext context)
Remove the graph element described by this expression. |
void |
setValue(JXPathContext context,
Object value)
Modifies the value of the property described by the supplied xpath. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JXPathCompiledExpression(String xpath,
Expression expression)
xpath - sourceexpression - compiled| Method Detail |
|---|
protected String getXPath()
protected Expression getExpression()
public String toString()
toString in class Objectpublic Object getValue(JXPathContext context)
CompiledExpression
getValue in interface CompiledExpressioncontext - to evaluate
public Object getValue(JXPathContext context,
Class requiredType)
CompiledExpression
getValue in interface CompiledExpressioncontext - to evaluaterequiredType - return type
public void setValue(JXPathContext context,
Object value)
CompiledExpression
setValue in interface CompiledExpressioncontext - basevalue - to setpublic Pointer createPath(JXPathContext context)
CompiledExpressionAbstractFactory, which should first be
installed on the context by calling JXPathContext.setFactory(org.apache.commons.jxpath.AbstractFactory).
createPath in interface CompiledExpressioncontext - base
public Pointer createPathAndSetValue(JXPathContext context,
Object value)
CompiledExpressionAbstractFactory, which should first be
installed on the context by calling JXPathContext.setFactory(org.apache.commons.jxpath.AbstractFactory).
Will throw an exception if one of the following conditions occurs:
createPathAndSetValue in interface CompiledExpressioncontext - basevalue - to set
public Iterator iterate(JXPathContext context)
CompiledExpression
iterate in interface CompiledExpressioncontext - base
public Pointer getPointer(JXPathContext context,
String xpath)
CompiledExpression
getPointer in interface CompiledExpressioncontext - basexpath - string
public Iterator iteratePointers(JXPathContext context)
CompiledExpression
iteratePointers in interface CompiledExpressioncontext - to iterate
public void removePath(JXPathContext context)
CompiledExpression
removePath in interface CompiledExpressioncontext - basepublic void removeAll(JXPathContext context)
CompiledExpression
removeAll in interface CompiledExpressioncontext - base
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||