Package org.zkoss.xel.util
Class SimpleResolver
java.lang.Object
org.zkoss.xel.util.SimpleResolver
- All Implemented Interfaces:
Serializable,VariableResolver
A simple resolver that retrieve variable from a map.
Note: since 5.0.8, it becomes serializable. Thus, the parent and
vars parameter
of SimpleResolver(VariableResolver, Map) have to serializable
in the clustering environment.
- Since:
- 3.0.0
- Author:
- tomyeh
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a resolver.SimpleResolver(Map<String, ?> vars) Constructs a resolver with an object map.SimpleResolver(VariableResolver parent) Constructs a resolver with a parent.SimpleResolver(VariableResolver parent, Map<String, ?> vars) Constructs a resolver with a parent and an object map. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parent, or null if no parent at all.resolveVariable(String name) Resolves the specified variable.voidsetParent(VariableResolver parent) Sets the parent.
-
Field Details
-
_vars
The variable maps.
-
-
Constructor Details
-
SimpleResolver
public SimpleResolver()Constructs a resolver. -
SimpleResolver
Constructs a resolver with a parent.- Parameters:
parent- the parent resolver (null means ignored).
-
SimpleResolver
Constructs a resolver with a parent and an object map.- Parameters:
parent- the parent resolver (null means ignored).vars- the object map (null means ignored)
-
SimpleResolver
Constructs a resolver with an object map.- Parameters:
vars- the object map (null means ignored)
-
-
Method Details
-
getParent
Returns the parent, or null if no parent at all. -
setParent
Sets the parent.- Parameters:
parent- the parent resolver, or null if no parent.
-
resolveVariable
Description copied from interface:VariableResolverResolves the specified variable.- Specified by:
resolveVariablein interfaceVariableResolver- Parameters:
name- the name of the variable to resolve- Throws:
XelException
-