Class MapBasedValueSource

java.lang.Object
org.codehaus.plexus.interpolation.AbstractValueSource
org.codehaus.plexus.interpolation.MapBasedValueSource
All Implemented Interfaces:
ValueSource

public class MapBasedValueSource extends AbstractValueSource
Wraps a Map, and looks up the whole expression as a single key, returning the value mapped to it.
  • Constructor Details

    • MapBasedValueSource

      public MapBasedValueSource(Map values)
      Construct a new value source to wrap the supplied map.
      Parameters:
      values - key,value of mapping.
  • Method Details

    • getValue

      public Object getValue(String expression)
      Lookup the supplied expression as a key in the wrapped Map, and return its value.
      Parameters:
      expression - The string expression.
      Returns:
      the value related to the expression, or null if not found.