Class MapBasedValueSource
- java.lang.Object
-
- org.codehaus.plexus.interpolation.fixed.MapBasedValueSource
-
- All Implemented Interfaces:
FixedValueSource
public class MapBasedValueSource extends java.lang.Object implements FixedValueSource
Wraps a Map, and looks up the whole expression as a single key, returning the value mapped to it.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Mapvalues
-
Constructor Summary
Constructors Constructor Description MapBasedValueSource(java.util.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 java.lang.ObjectgetValue(java.lang.String expression, InterpolationState interpolationState)Lookup the supplied expression as a key in the wrapped Map, and return its value.
-
-
-
Method Detail
-
getValue
public java.lang.Object getValue(java.lang.String expression, InterpolationState interpolationState)Lookup the supplied expression as a key in the wrapped Map, and return its value.- Specified by:
getValuein interfaceFixedValueSource- Parameters:
expression- The expression.interpolationState-InterpolationState.- Returns:
- the value related to the expression, or null if not found (not available from this source)
-
-