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:
- java.lang.Cloneable
 - Enclosing class:
- CommandlineJava
 
 public static class CommandlineJava.SysProperties extends Environment implements java.lang.Cloneable Specialized Environment class for System properties.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.tools.ant.types.EnvironmentEnvironment.Variable
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.tools.ant.types.Environmentvariables
 
- 
 - 
Constructor SummaryConstructors Constructor Description SysProperties()
 - 
Method SummaryModifier and Type Method Description voidaddDefinitionsToList(java.util.ListIterator<java.lang.String> listIt)Add all definitions (including property sets) to a list.voidaddSysproperties(CommandlineJava.SysProperties ps)Add a propertyset to the total set.voidaddSyspropertyset(PropertySet ps)Add a propertyset to the total set.java.lang.Objectclone()Create a deep clone.java.lang.String[]getVariables()Get the properties as an array; this is an override of the superclass, as it evaluates all the properties.voidrestoreSystem()Restore the system properties to the cached value.voidsetSystem()Cache 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
 
- 
 
- 
- 
- 
Method Detail- 
getVariablespublic java.lang.String[] getVariables() throws BuildExceptionGet 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.
 
 - 
addDefinitionsToListpublic void addDefinitionsToList(java.util.ListIterator<java.lang.String> listIt) Add 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.
 
 - 
setSystempublic void setSystem() throws BuildExceptionCache the system properties and set the system properties to the new values.- Throws:
- BuildException- if Security prevented this operation.
 
 - 
restoreSystempublic void restoreSystem() throws BuildExceptionRestore the system properties to the cached value.- Throws:
- BuildException- if Security prevented this operation, or there were no system properties to restore.
 
 - 
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionCreate a deep clone.- Overrides:
- clonein class- java.lang.Object
- Returns:
- a cloned instance of SysProperties.
- Throws:
- java.lang.CloneNotSupportedException- for signature.
 
 - 
addSyspropertysetpublic void addSyspropertyset(PropertySet ps) Add a propertyset to the total set.- Parameters:
- ps- the new property set.
 
 - 
addSyspropertiespublic void addSysproperties(CommandlineJava.SysProperties ps) Add a propertyset to the total set.- Parameters:
- ps- the new property set.
- Since:
- Ant 1.6.3
 
 
- 
 
-