public class DelegatingVariableResolver extends java.lang.Object implements VariableResolverX
Applicable to CDI version 1.0 or later
Constructor and Description |
---|
DelegatingVariableResolver() |
Modifier and Type | Method and 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.
|
public java.lang.Object resolveVariable(java.lang.String name) throws XelException
VariableResolver
resolveVariable
in interface VariableResolver
name
- the name of the variable to resolveXelException
public java.lang.Object resolveVariable(XelContext ctx, java.lang.Object base, java.lang.Object name) throws XelException
VariableResolverX
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"),/code> is called then
(where we assume the returned object in the previous call is
foo
).
resolveVariable
in interface VariableResolverX
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 resolveXelException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.