public interface Variables extends Serializable
"$varname"
syntax.
To use a custom implementation of this interface, pass it to
JXPathContext.setVariables()
Modifier and Type | Method and Description |
---|---|
void |
declareVariable(String varName,
Object value)
Defines a new variable with the specified value or modifies
the value of an existing variable.
|
Object |
getVariable(String varName)
Returns the value of the specified variable.
|
boolean |
isDeclaredVariable(String varName)
Returns true if the specified variable is declared.
|
void |
undeclareVariable(String varName)
Removes an existing variable.
|
boolean isDeclaredVariable(String varName)
varName
- variable nameObject getVariable(String varName)
varName
- variable nameIllegalArgumentException
- if there is no such variable.void declareVariable(String varName, Object value)
varName
- variable namevalue
- to declarevoid undeclareVariable(String varName)
varName
- is a variable name without the "$" signCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.