org.codehaus.plexus.interpolation
Class PropertiesBasedValueSource

java.lang.Object
  extended byorg.codehaus.plexus.interpolation.PropertiesBasedValueSource
All Implemented Interfaces:
ValueSource

public class PropertiesBasedValueSource
extends java.lang.Object
implements ValueSource

ValueSource implementation that wraps a Properties instance, and does a simple lookup of the entire expression string as the parameter for Properties.getProperty(String), returning the result as the resolved value.

Author:
jdcasey

Constructor Summary
PropertiesBasedValueSource(java.util.Properties properties)
          Wrap the specified Properties object for use as a value source.
 
Method Summary
 java.lang.Object getValue(java.lang.String expression)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesBasedValueSource

public PropertiesBasedValueSource(java.util.Properties properties)
Wrap the specified Properties object for use as a value source. Nulls are allowed.

Parameters:
properties - The properties instance to wrap.
Method Detail

getValue

public java.lang.Object getValue(java.lang.String expression)
Specified by:
getValue in interface ValueSource
Returns:
the result of Properties.getProperty(String), using the entire expression as the key to lookup. If the wrapped properties instance is null, simply return null.


Copyright © 2001-2008 Codehaus. All Rights Reserved.