Class DelegatingVariableResolver

java.lang.Object
org.zkoss.zkplus.cdi.DelegatingVariableResolver
All Implemented Interfaces:
VariableResolver, VariableResolverX

public class DelegatingVariableResolver extends Object implements VariableResolverX
Generic CDI EL named managed bean resolver.

Applicable to CDI version 1.0 or later

Author:
henrichen
  • Constructor Details

    • DelegatingVariableResolver

      public DelegatingVariableResolver()
  • Method Details

    • resolveVariable

      public Object resolveVariable(String name) throws XelException
      Description copied from interface: VariableResolver
      Resolves the specified variable.
      Specified by:
      resolveVariable in interface VariableResolver
      Parameters:
      name - the name of the variable to resolve
      Throws:
      XelException
    • resolveVariable

      public Object resolveVariable(XelContext ctx, Object base, 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 is foo).

      Specified by:
      resolveVariable in interface VariableResolverX
      Parameters:
      ctx - the context of this evaluation
      base - 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 class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object