org.oddjob.values.properties
Class EnvVarPropertyLookup

java.lang.Object
  extended by org.oddjob.values.properties.EnvVarPropertyLookup
All Implemented Interfaces:
PropertyLookup

public class EnvVarPropertyLookup
extends Object
implements PropertyLookup

A PropertyLookup for environment variables.

Author:
rob

Constructor Summary
EnvVarPropertyLookup(String prefix)
           
 
Method Summary
 String lookup(String propertyName)
          Return the value of a property, or null if it doesn't exist.
 Set<String> propertyNames()
          Return all property names in this property lookup.
 PropertySource sourceFor(String propertyName)
          Return a source for the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvVarPropertyLookup

public EnvVarPropertyLookup(String prefix)
Method Detail

lookup

public String lookup(String propertyName)
Description copied from interface: PropertyLookup
Return the value of a property, or null if it doesn't exist.

Specified by:
lookup in interface PropertyLookup
Parameters:
propertyName - The name of the property.
Returns:
The value or null.

propertyNames

public Set<String> propertyNames()
Description copied from interface: PropertyLookup
Return all property names in this property lookup.

Specified by:
propertyNames in interface PropertyLookup
Returns:
The property names. Never null.

sourceFor

public PropertySource sourceFor(String propertyName)
Description copied from interface: PropertyLookup
Return a source for the property.

Specified by:
sourceFor in interface PropertyLookup
Parameters:
propertyName - The property name.
Returns:
The source, or null if the property isn't known.