org.codehaus.plexus.interpolation
Class MapBasedValueSource

java.lang.Object
  extended by org.codehaus.plexus.interpolation.AbstractValueSource
      extended by 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.

Version:
$Id: MapBasedValueSource.java 7717 2008-09-12 21:04:19Z jdcasey $

Constructor Summary
MapBasedValueSource(java.util.Map values)
          Construct a new value source to wrap the supplied map.
 
Method Summary
 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
 

Constructor Detail

MapBasedValueSource

public MapBasedValueSource(java.util.Map values)
Construct a new value source to wrap the supplied map.

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.

Returns:
the value related to the expression, or null if not found.


Copyright © 2001-2011 Codehaus. All Rights Reserved.