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

java.lang.Object
  |
  +--org.apache.tools.ant.taskdefs.optional.dotnet.DotnetDefine

public class DotnetDefine
extends java.lang.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.


Constructor Summary
DotnetDefine()
           
 
Method Summary
 java.lang.String getName()
           
 java.lang.String getValue(Task owner)
          This method gets the value of this definition.
 boolean isSet(Task owner)
          logic taken from patternset
 void setIf(java.lang.String condition)
          the name of a property which must be defined for the definition to be set.
 void setName(java.lang.String name)
          the name of the definition.
 void setUnless(java.lang.String condition)
          the name of a property which must be undefined for the definition to be set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DotnetDefine

public DotnetDefine()
Method Detail

setIf

public void setIf(java.lang.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

setUnless

public void setUnless(java.lang.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

getName

public java.lang.String getName()

setName

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

Parameters:
name -

getValue

public java.lang.String getValue(Task owner)
                          throws BuildException
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

isSet

public boolean isSet(Task owner)
logic taken from patternset

Parameters:
owner -
Returns:
true if the condition is valid


Copyright © 2000-2004 Apache Software Foundation. All Rights Reserved.