Package org.zkoss.zkplus.cdi
Class DelegatingVariableResolver
- java.lang.Object
-
- org.zkoss.zkplus.cdi.DelegatingVariableResolver
-
- All Implemented Interfaces:
VariableResolver
,VariableResolverX
public class DelegatingVariableResolver extends java.lang.Object implements VariableResolverX
Generic CDI EL named managed bean resolver.Applicable to CDI version 1.0 or later
- Author:
- henrichen
-
-
Constructor Summary
Constructors Constructor Description DelegatingVariableResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.Object
resolveVariable(java.lang.String name)
Resolves the specified variable.java.lang.Object
resolveVariable(XelContext ctx, java.lang.Object base, java.lang.Object name)
Resolves the the given variable on the given base object.
-
-
-
Method Detail
-
resolveVariable
public java.lang.Object resolveVariable(java.lang.String name) throws XelException
Description copied from interface:VariableResolver
Resolves the specified variable.- Specified by:
resolveVariable
in interfaceVariableResolver
- Parameters:
name
- the name of the variable to resolve- Throws:
XelException
-
resolveVariable
public java.lang.Object resolveVariable(XelContext ctx, java.lang.Object base, java.lang.Object name) throws XelException
Description copied from interface:VariableResolverX
Resolves the the given variable on the given base object.It resolves not only top-level variables but also properties. For example, when resolving
foo.duke
,resolveVariable(ctx, null, "foo")
is called first. And if it returns an non-null object,resolveVariable(ctx, foo, "duke")
is called then (where we assume the returned object in the previous call isfoo
).- Specified by:
resolveVariable
in interfaceVariableResolverX
- Parameters:
ctx
- the context of this evaluationbase
- the base object whose property value is to be returned, or null to resolve a top-level variable.name
- the name of the variable (or property) to resolve- Throws:
XelException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-