Class ItemResolverFactory.ItemResolver

java.lang.Object
org.mvel2.integration.impl.ItemResolverFactory.ItemResolver
All Implemented Interfaces:
Serializable, VariableResolver
Enclosing class:
ItemResolverFactory

public static class ItemResolverFactory.ItemResolver extends Object implements VariableResolver
See Also:
  • Field Details

    • name

      private final String name
    • type

      private Class type
    • value

      public Object value
  • Constructor Details

    • ItemResolver

      public ItemResolver(String name, Class type)
    • ItemResolver

      public ItemResolver(String name)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: VariableResolver
      Returns the name of external variable.
      Specified by:
      getName in interface VariableResolver
      Returns:
      A string representing the variable name.
    • getType

      public Class getType()
      Description copied from interface: VariableResolver
      This should return the type of the variable. However, this is not completely necessary, and is particularily only of benefit to systems that require use of MVEL's strict typing facilities. In most cases, this implementation can simply return: Object.class
      Specified by:
      getType in interface VariableResolver
      Returns:
      A Class instance representing the type of the target variable.
    • setStaticType

      public void setStaticType(Class type)
      Specified by:
      setStaticType in interface VariableResolver
    • getFlags

      public int getFlags()
      Description copied from interface: VariableResolver
      Returns the bitset of special variable flags. Internal use only. This should just return 0 in custom implentations.
      Specified by:
      getFlags in interface VariableResolver
      Returns:
      Bitset of special flags.
    • getValue

      public Object getValue()
      Description copied from interface: VariableResolver
      Returns the physical target value of the variable.
      Specified by:
      getValue in interface VariableResolver
      Returns:
      The actual variable value.
    • setValue

      public void setValue(Object value)
      Description copied from interface: VariableResolver
      Sets the value of the physical target value.
      Specified by:
      setValue in interface VariableResolver
      Parameters:
      value - The new value.