Class 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
    • 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.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegatingVariableResolver

        public DelegatingVariableResolver()
    • Method Detail

      • 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 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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object