public interface Variables
extends java.io.Serializable
"$varname"
syntax.
To use a custom implementation of this interface, pass it to
JXPathContext.setVariables()
Modifier and Type | Method and Description |
---|---|
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.
|
boolean isDeclaredVariable(java.lang.String varName)
varName
- variable namejava.lang.Object getVariable(java.lang.String varName)
varName
- variable namejava.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