Class SimpleResolver

  • All Implemented Interfaces:
    java.io.Serializable, VariableResolver

    public class SimpleResolver
    extends java.lang.Object
    implements VariableResolver, java.io.Serializable
    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:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​?> _vars
      The variable maps.
    • Field Detail

      • _vars

        protected java.util.Map<java.lang.String,​?> _vars
        The variable maps.
    • Constructor Detail

      • SimpleResolver

        public SimpleResolver()
        Constructs a resolver.
      • SimpleResolver

        public SimpleResolver​(VariableResolver parent)
        Constructs a resolver with a parent.
        Parameters:
        parent - the parent resolver (null means ignored).
      • SimpleResolver

        public SimpleResolver​(VariableResolver parent,
                              java.util.Map<java.lang.String,​?> vars)
        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

        public SimpleResolver​(java.util.Map<java.lang.String,​?> vars)
        Constructs a resolver with an object map.
        Parameters:
        vars - the object map (null means ignored)
    • Method Detail

      • getParent

        public VariableResolver getParent()
        Returns the parent, or null if no parent at all.
      • setParent

        public void setParent​(VariableResolver parent)
        Sets the parent.
        Parameters:
        parent - the parent resolver, or null if no parent.