Package org.apache.tools.ant.types
Class CommandlineJava.SysProperties
java.lang.Object
org.apache.tools.ant.types.Environment
org.apache.tools.ant.types.CommandlineJava.SysProperties
- All Implemented Interfaces:
- Cloneable
- Enclosing class:
- CommandlineJava
Specialized Environment class for System properties.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.tools.ant.types.EnvironmentEnvironment.Variable
- 
Field SummaryFields inherited from class org.apache.tools.ant.types.Environmentvariables
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDefinitionsToList(ListIterator<String> listIt) Add all definitions (including property sets) to a list.voidAdd a propertyset to the total set.voidAdd a propertyset to the total set.clone()Create a deep clone.String[]Get the properties as an array; this is an override of the superclass, as it evaluates all the properties.voidRestore the system properties to the cached value.voidCache the system properties and set the system properties to the new values.intsize()Get the size of the sysproperties instance.Methods inherited from class org.apache.tools.ant.types.EnvironmentaddVariable, getVariablesVector
- 
Constructor Details- 
SysPropertiespublic SysProperties()
 
- 
- 
Method Details- 
getVariablesGet the properties as an array; this is an override of the superclass, as it evaluates all the properties.- Overrides:
- getVariablesin class- Environment
- Returns:
- the array of definitions; may be null.
- Throws:
- BuildException- on error.
 
- 
addDefinitionsToListAdd all definitions (including property sets) to a list.- Parameters:
- listIt- list iterator supporting add method.
 
- 
sizepublic int size()Get the size of the sysproperties instance. This merges all property sets, so is not an O(1) operation.- Returns:
- the size of the sysproperties instance.
 
- 
setSystemCache the system properties and set the system properties to the new values.- Throws:
- BuildException- if Security prevented this operation.
 
- 
restoreSystemRestore the system properties to the cached value.- Throws:
- BuildException- if Security prevented this operation, or there were no system properties to restore.
 
- 
cloneCreate a deep clone.- Overrides:
- clonein class- Object
- Returns:
- a cloned instance of SysProperties.
- Throws:
- CloneNotSupportedException- for signature.
 
- 
addSyspropertysetAdd a propertyset to the total set.- Parameters:
- ps- the new property set.
 
- 
addSyspropertiesAdd a propertyset to the total set.- Parameters:
- ps- the new property set.
- Since:
- Ant 1.6.3
 
 
-