ca.sqlpower.wabit
Class SystemPropertiesVariableContext
java.lang.Object
ca.sqlpower.wabit.SystemPropertiesVariableContext
- All Implemented Interfaces:
- VariableContext
public class SystemPropertiesVariableContext
- extends java.lang.Object
- implements VariableContext
Provides all the Java system properties as Wabit variables. Note that is is
technically possible (but unusual and not a recommended practice) to create
system properties whose keys are not an instance of String. These values will
not appear, and cannot be accessed, in this WabitVariables view of the system
properties.
|
Method Summary |
java.util.Set<java.lang.String> |
getVariableNames()
Returns the set of all defined variable names in this context. |
java.lang.Object |
getVariableValue(java.lang.String name,
java.lang.Object defaultValue)
Returns the value of the named variable, or the given default value if
the variable is not defined. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SystemPropertiesVariableContext
public SystemPropertiesVariableContext()
getVariableNames
public java.util.Set<java.lang.String> getVariableNames()
- Description copied from interface:
VariableContext
- Returns the set of all defined variable names in this context.
- Specified by:
getVariableNames in interface VariableContext
getVariableValue
public java.lang.Object getVariableValue(java.lang.String name,
java.lang.Object defaultValue)
- Description copied from interface:
VariableContext
- Returns the value of the named variable, or the given default value if
the variable is not defined. If you want a reliable way to find out if
a variable is defined, look it up in the set returned by
VariableContext.getVariableNames().
- Specified by:
getVariableValue in interface VariableContext
- Parameters:
name - The name of the variabledefaultValue - The value to return if the variable is not defined
- Returns:
- The value of the variable.
Copyright © 2009. All Rights Reserved.