org.apache.tools.ant.types

Class Environment.Variable

Enclosing Class:
Environment

public static class Environment.Variable
extends java.lang.Object

representation of a single env value

Constructor Summary

Variable()
Constructor for variable

Method Summary

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.
String
getKey()
key accessor
String
getValue()
value accessor
void
setFile(java.io.File file)
get the absolute path of a file and assign it to the value
void
setKey(String key)
set the key
void
setPath(Path path)
stringify path and assign to the value.
void
setValue(String value)
set the value
void
validate()
checks whether all required attributes have been specified.

Constructor Details

Variable

public Variable()
Constructor for variable

Method Details

getContent

public String getContent()
            throws BuildException
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(java.io.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.


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