org.codehaus.plexus.interpolation

Class PropertiesBasedValueSource

public class PropertiesBasedValueSource extends AbstractValueSource

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.

Version: $Id: PropertiesBasedValueSource.java 7681 2008-08-22 20:34:22Z jdcasey $

Author: jdcasey

Constructor Summary
PropertiesBasedValueSource(Properties properties)
Wrap the specified Properties object for use as a value source.
Method Summary
ObjectgetValue(String expression)

Constructor Detail

PropertiesBasedValueSource

public PropertiesBasedValueSource(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 Object getValue(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.

Copyright © 2001-2009 Codehaus. All Rights Reserved.