# 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 Summary

Constructors
Constructor
Description
`ConstantResolver(Map<String, ? extends Constant<?>> constMap)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`getBooleanProperty(String name)`
`byte`
`getByteProperty(String name)`
`char`
`getCharacterProperty(String name)`
`Map<String, ? extends Constant<?>>`
`getConstantMap()`
Returns this resolver's map of known constants.
`double`
`getDoubleProperty(String name)`
`float`
`getFloatProperty(String name)`
`int`
`getIntegerProperty(String name)`
`long`
`getLongProperty(String name)`
`Object`
`getObjectProperty(String name)`
`short`
`getShortProperty(String name)`
`String`
`getStringProperty(String name)`
`Set<Constant<?>>`
`getTranslatedConstants()`
Returns a collection of those constants that have been referenced in expressions compiled with use of this resolver.
`String`
`getTypeName(String name)`

### Methods inherited from class gnu.jel.DVMap

`translate`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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)