org.apache.tools.ant.types

Class Environment.Variable

public static class Environment.Variable extends Object

representation of a single env value
Constructor Summary
Variable()
Constructor for variable
Method Summary
StringgetContent()
get the assigment string This is not ready for insertion into a property file without following the escaping rules of the properties class.
StringgetKey()
key accessor
StringgetValue()
value accessor
voidsetFile(File file)
get the absolute path of a file and assign it to the value
voidsetKey(String key)
set the key
voidsetPath(Path path)
stringify path and assign to the value.
voidsetValue(String value)
set the value
voidvalidate()
checks whether all required attributes have been specified.

Constructor Detail

Variable

public Variable()
Constructor for variable

Method Detail

getContent

public String getContent()
get the assigment string This is not ready for insertion into a property file without following the escaping rules of the properties class.

Returns: a string of the form key=value.

Throws: BuildException if key or value are unassigned

getKey

public String getKey()
key accessor

Returns: key

getValue

public String getValue()
value accessor

Returns: value

setFile

public void setFile(File file)
get the absolute path of a file and assign it to the value

Parameters: file file to use as the value

setKey

public void setKey(String key)
set the key

Parameters: key string

setPath

public void setPath(Path path)
stringify path and assign to the value. The value will contain all path elements separated by the appropriate separator

Parameters: path path

setValue

public void setValue(String value)
set the value

Parameters: value string value

validate

public void validate()
checks whether all required attributes have been specified.

Throws: BuildException if key or value are unassigned

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