Class ConstantResolver

java.lang.Object
gnu.jel.DVMap
uk.ac.starlink.ttools.jel.ConstantResolver

public class ConstantResolver extends gnu.jel.DVMap
DVMap implementation that can reference values from a supplied Map of Constant values.

Primitives, strings and objects are currently catered for.

Since:
10 Jul 2025
Author:
Mark Taylor
  • Constructor Details

    • ConstantResolver

      public ConstantResolver(Map<String, ? extends Constant<?>> constMap)
      Constructor. The supplied map of constants may change its content over the lifetime of this object, resolution will correspond to its state at resolution time.
      Parameters:
      constMap - map by name of Constant objects
  • Method Details

    • getConstantMap

      public Map<String, ? extends Constant<?>> getConstantMap()
      Returns this resolver's map of known constants.
      Returns:
      map by name of Constant objects
    • getTranslatedConstants

      public Set<Constant<?>> getTranslatedConstants()
      Returns a collection of those constants that have been referenced in expressions compiled with use of this resolver.
      Returns:
      set of referenced constants
    • getTypeName

      public String getTypeName(String name)
      Specified by:
      getTypeName in class gnu.jel.DVMap
    • getDoubleProperty

      public double getDoubleProperty(String name)
    • getFloatProperty

      public float getFloatProperty(String name)
    • getLongProperty

      public long getLongProperty(String name)
    • getIntegerProperty

      public int getIntegerProperty(String name)
    • getShortProperty

      public short getShortProperty(String name)
    • getByteProperty

      public byte getByteProperty(String name)
    • getBooleanProperty

      public boolean getBooleanProperty(String name)
    • getCharacterProperty

      public char getCharacterProperty(String name)
    • getStringProperty

      public String getStringProperty(String name)
    • getObjectProperty

      public Object getObjectProperty(String name)