Class MapBasedValueSource
- java.lang.Object
-
- org.codehaus.plexus.interpolation.fixed.MapBasedValueSource
-
- All Implemented Interfaces:
FixedValueSource
public class MapBasedValueSource extends Object implements FixedValueSource
Wraps a Map, and looks up the whole expression as a single key, returning the value mapped to it.
-
-
Constructor Summary
Constructors Constructor Description MapBasedValueSource(Map values)
Construct a new value source to wrap the supplied map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getValue(String expression, InterpolationState interpolationState)
Lookup the supplied expression as a key in the wrapped Map, and return its value.
-
-
-
Constructor Detail
-
MapBasedValueSource
public MapBasedValueSource(Map values)
Construct a new value source to wrap the supplied map.- Parameters:
values
- the key/value pairs.
-
-
Method Detail
-
getValue
public Object getValue(String expression, InterpolationState interpolationState)
Lookup the supplied expression as a key in the wrapped Map, and return its value.- Specified by:
getValue
in interfaceFixedValueSource
- Parameters:
expression
- The expression.interpolationState
-InterpolationState
.- Returns:
- the value related to the expression, or null if not found (not available from this source)
-
-