Class PrefixedPropertiesValueSource
- java.lang.Object
-
- org.codehaus.plexus.interpolation.AbstractDelegatingValueSource
-
- org.codehaus.plexus.interpolation.PrefixedPropertiesValueSource
-
- All Implemented Interfaces:
QueryEnabledValueSource
,ValueSource
public class PrefixedPropertiesValueSource extends AbstractDelegatingValueSource implements QueryEnabledValueSource
Legacy support. Allow trimming one of a set of expression prefixes, the lookup the remaining expression as a literal key from the wrapped properties instance.This is just a convenience implementation to provide a shorthand for constructing the properties value source and then wrapping it with a prefixed value-source wrapper.
-
-
Constructor Summary
Constructors Constructor Description PrefixedPropertiesValueSource(java.lang.String prefix, java.util.Properties properties)
Wrap the specified properties file with a newPropertiesBasedValueSource
, then wrap that source with a newPrefixedValueSourceWrapper
that uses the specified expression prefix.PrefixedPropertiesValueSource(java.util.List<java.lang.String> possiblePrefixes, java.util.Properties properties, boolean allowUnprefixedExpressions)
Wrap the specified properties file with a newPropertiesBasedValueSource
, then wrap that source with a newPrefixedValueSourceWrapper
that uses the specified expression-prefix list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLastExpression()
-
Methods inherited from class org.codehaus.plexus.interpolation.AbstractDelegatingValueSource
clearFeedback, getDelegate, getFeedback, getValue
-
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
clearFeedback, getFeedback, getValue
-
-
-
-
Constructor Detail
-
PrefixedPropertiesValueSource
public PrefixedPropertiesValueSource(java.lang.String prefix, java.util.Properties properties)
Wrap the specified properties file with a newPropertiesBasedValueSource
, then wrap that source with a newPrefixedValueSourceWrapper
that uses the specified expression prefix. Finally, set this wrapper source as a delegate for this instance to use.- Parameters:
prefix
- The expression prefix to trimproperties
- The properties instance to wrap
-
PrefixedPropertiesValueSource
public PrefixedPropertiesValueSource(java.util.List<java.lang.String> possiblePrefixes, java.util.Properties properties, boolean allowUnprefixedExpressions)
Wrap the specified properties file with a newPropertiesBasedValueSource
, then wrap that source with a newPrefixedValueSourceWrapper
that uses the specified expression-prefix list. Finally, set this wrapper source as a delegate for this instance to use.- Parameters:
possiblePrefixes
- The expression-prefix list to trimproperties
- The properties instance to wrapallowUnprefixedExpressions
- allow unprefixed expressions or not.
-
-
Method Detail
-
getLastExpression
public java.lang.String getLastExpression()
- Specified by:
getLastExpression
in interfaceQueryEnabledValueSource
- Returns:
- the most recent expression processed by this value source, or null.
-
-