Package org.apache.tools.ant.types
Class Environment.Variable
- java.lang.Object
- 
- org.apache.tools.ant.types.Environment.Variable
 
- 
- Enclosing class:
- Environment
 
 public static class Environment.Variable extends java.lang.Objectrepresentation of a single env value
- 
- 
Constructor SummaryConstructors Constructor Description Variable()Constructor for variable
 - 
Method SummaryModifier and Type Method Description java.lang.StringgetContent()get the assignment string This is not ready for insertion into a property file without following the escaping rules of the properties class.java.lang.StringgetKey()key accessorjava.lang.StringgetValue()value accessorvoidsetFile(java.io.File file)get the absolute path of a file and assign it to the valuevoidsetKey(java.lang.String key)set the keyvoidsetPath(Path path)stringify path and assign to the value.voidsetValue(java.lang.String value)set the valuevoidvalidate()checks whether all required attributes have been specified.
 
- 
- 
- 
Method Detail- 
setKeypublic void setKey(java.lang.String key) set the key- Parameters:
- key- string
 
 - 
setValuepublic void setValue(java.lang.String value) set the value- Parameters:
- value- string value
 
 - 
getKeypublic java.lang.String getKey() key accessor- Returns:
- key
 
 - 
getValuepublic java.lang.String getValue() value accessor- Returns:
- value
 
 - 
setPathpublic 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
 
 - 
setFilepublic 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
 
 - 
getContentpublic java.lang.String getContent() throws BuildExceptionget the assignment 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
 
 - 
validatepublic void validate() checks whether all required attributes have been specified.- Throws:
- BuildException- if key or value are unassigned
 
 
- 
 
-