org.apache.tools.ant.taskdefs.optional.dotnet

Class DotnetDefine

public class DotnetDefine extends Object

definitions can be conditional. What .NET conditions can not be is in any state other than defined and undefined; you cannot give a definition a value.
Method Summary
StringgetName()
Get the name of the definition.
StringgetValue(Task owner)
This method gets the value of this definition.
booleanisSet(Task owner)
logic taken from patternset
voidsetIf(String condition)
the name of a property which must be defined for the definition to be set.
voidsetName(String name)
the name of the definition.
voidsetUnless(String condition)
the name of a property which must be undefined for the definition to be set.

Method Detail

getName

public String getName()
Get the name of the definition.

Returns: the name.

getValue

public String getValue(Task owner)
This method gets the value of this definition. Will be null if a condition was declared and not met

Parameters: owner owning task

Returns: The value of the definition.

Throws: BuildException if there is an error.

isSet

public boolean isSet(Task owner)
logic taken from patternset

Parameters: owner the owning task.

Returns: true if the condition is valid

setIf

public void setIf(String condition)
the name of a property which must be defined for the definition to be set. Optional.

Parameters: condition the name of the property

setName

public void setName(String name)
the name of the definition. Required.

Parameters: name the name value.

setUnless

public void setUnless(String condition)
the name of a property which must be undefined for the definition to be set. Optional.

Parameters: condition the name of the property