org.apache.tools.ant.types

Class CommandlineJava.SysProperties

Enclosing Class:
CommandlineJava
Implemented Interfaces:
Cloneable

public static class CommandlineJava.SysProperties
extends Environment
implements Cloneable

Specialized Environment class for System properties

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.tools.ant.types.Environment

Environment.Variable

Field Summary

Fields inherited from class org.apache.tools.ant.types.Environment

variables

Method Summary

void
addDefinitionsToList(ListIterator listIt)
add all definitions (including property sets) to a list
void
addSysproperties(CommandlineJava.SysProperties ps)
add a propertyset to the total set
void
addSyspropertyset(PropertySet ps)
add a propertyset to the total set
Object
clone()
deep clone
String[]
getVariables()
get the properties as an array; this is an override of the superclass, as it evaluates all the properties
void
restoreSystem()
restore the system properties to the cached value
void
setSystem()
cache the system properties and set the system properties to the new values
int
size()
This method gets the size of the sysproperties instance.

Methods inherited from class org.apache.tools.ant.types.Environment

addVariable, getVariables

Method Details

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()
            throws CloneNotSupportedException
deep clone

Returns:
a cloned instance of SysProperties


getVariables

public String[] getVariables()
            throws BuildException
get the properties as an array; this is an override of the superclass, as it evaluates all the properties
Overrides:
getVariables in interface Environment

Returns:
the array of definitions; may be null

Throws:
BuildException - on error


restoreSystem

public void restoreSystem()
            throws BuildException
restore the system properties to the cached value

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


setSystem

public void setSystem()
            throws BuildException
cache the system properties and set the system properties to the new values

Throws:
BuildException - if Security prevented this operation


size

public int size()
This method gets 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


Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.