|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Variables
Variables provide access to a global set of values accessible via XPath.
XPath can reference variables using the "$varname"
syntax.
To use a custom implementation of this interface, pass it to
JXPathContext.setVariables()
Method Summary | |
---|---|
void |
declareVariable(java.lang.String varName,
java.lang.Object value)
Defines a new variable with the specified value or modifies the value of an existing variable. |
java.lang.Object |
getVariable(java.lang.String varName)
Returns the value of the specified variable. |
boolean |
isDeclaredVariable(java.lang.String varName)
Returns true if the specified variable is declared. |
void |
undeclareVariable(java.lang.String varName)
Removes an existing variable. |
Method Detail |
---|
boolean isDeclaredVariable(java.lang.String varName)
varName
- variable name
java.lang.Object getVariable(java.lang.String varName)
varName
- variable name
java.lang.IllegalArgumentException
- if there is no such variable.void declareVariable(java.lang.String varName, java.lang.Object value)
varName
- variable namevalue
- to declarevoid undeclareVariable(java.lang.String varName)
varName
- is a variable name without the "$" sign
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |