Class PropertiesBasedValueSource
java.lang.Object
org.codehaus.plexus.interpolation.fixed.PropertiesBasedValueSource
- All Implemented Interfaces:
FixedValueSource
FixedValueSource
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
ConstructorDescriptionPropertiesBasedValueSource
(Properties properties) Wrap the specifiedProperties
object for use as a value source. -
Method Summary
Modifier and TypeMethodDescriptiongetValue
(String expression, InterpolationState interpolationState)
-
Constructor Details
-
PropertiesBasedValueSource
Wrap the specifiedProperties
object for use as a value source. Nulls are allowed.- Parameters:
properties
- The properties instance to wrap.
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfaceFixedValueSource
- Parameters:
expression
- The expression.interpolationState
-InterpolationState
.- 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.
-