Class PropertiesBasedValueSource
- java.lang.Object
-
- org.codehaus.plexus.interpolation.AbstractValueSource
-
- org.codehaus.plexus.interpolation.PropertiesBasedValueSource
-
- All Implemented Interfaces:
ValueSource
public class PropertiesBasedValueSource extends AbstractValueSource
ValueSource
implementation that wraps aProperties
instance, and does a simple lookup of the entire expression string as the parameter forProperties.getProperty(String)
, returning the result as the resolved value.- Author:
- jdcasey
-
-
Constructor Summary
Constructors Constructor Description PropertiesBasedValueSource(java.util.Properties properties)
Wrap the specifiedProperties
object for use as a value source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue(java.lang.String expression)
-
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)
- Parameters:
expression
- The string expression.- 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. - See Also:
ValueSource.getValue(String, String, String)
-
-