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 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.Object
getValue(java.lang.String expression)
Lookup the supplied expression as a key in the wrapped Map, and return its value.-
Methods inherited from class org.codehaus.plexus.interpolation.AbstractValueSource
addFeedback, addFeedback, clearFeedback, getFeedback
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.plexus.interpolation.ValueSource
getValue
-
-
-
-
Method Detail
-
getValue
public java.lang.Object getValue(java.lang.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. - See Also:
ValueSource.getValue(String, String, String)
-
-