org.apache.tools.ant.types

Class CommandlineJava.SysProperties

public static class CommandlineJava.SysProperties extends Environment implements Cloneable

Specialized Environment class for System properties.
Method Summary
voidaddDefinitionsToList(ListIterator 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.
Objectclone()
Create a deep clone.
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.

Method Detail

addDefinitionsToList

public void addDefinitionsToList(ListIterator listIt)
Add all definitions (including property sets) to a list.

Parameters: listIt list iterator supporting add method.

addSysproperties

public void addSysproperties(CommandlineJava.SysProperties ps)
Add a propertyset to the total set.

Parameters: ps the new property set.

Since: Ant 1.6.3

addSyspropertyset

public void addSyspropertyset(PropertySet ps)
Add a propertyset to the total set.

Parameters: ps the new property set.

clone

public Object clone()
Create a deep clone.

Returns: a cloned instance of SysProperties.

Throws: CloneNotSupportedException for signature.

getVariables

public String[] getVariables()
Get the properties as an array; this is an override of the superclass, as it evaluates all the properties.

Returns: the array of definitions; may be null.

Throws: BuildException on error.

restoreSystem

public void restoreSystem()
Restore the system properties to the cached value.

Throws: BuildException if Security prevented this operation, or there were no system properties to restore.

setSystem

public void setSystem()
Cache the system properties and set the system properties to the new values.

Throws: BuildException if Security prevented this operation.

size

public 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.