org.apache.anteater.test
Class BaseDataType

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.types.DataType
              |
              +--org.apache.anteater.test.BaseDataType
All Implemented Interfaces:
Groupable
Direct Known Subclasses:
BaseLogger, Group, LoggerFactory, Namespace, Session, Uses

public class BaseDataType
extends org.apache.tools.ant.types.DataType
implements Groupable

Root class for all the Anteater types. Has support for a 'debug' attribute, as well as 'proxying' support where one DataType refers to another via the 'refid' attribute.

Since:
June 12, 2002
Version:
$Revision: 1.10 $ $Date: 2002/10/17 10:21:15 $
Author:
Jeff Turner

Field Summary
protected  int debug
          Debug level for this task.
protected  boolean debugWasSet
          Whether debug was previously setup.
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, description, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
BaseDataType()
           
 
Method Summary
 void debug(String message)
           
protected  String getDataTypeName()
          Sets the name used for this datatype instance.
 int getDebug()
          Return the debug level.
 Group getGroup()
           
protected  BaseDataType getRef(org.apache.tools.ant.Project p)
          Assuming this BaseDataType is a reference to a real one (has a refid attr), this method will return the one this points to.
 void print(String message)
           
 void println(String message)
           
 void setDebug(int debug)
          Set the debug level.
 void setGroup(Group group)
          Sets the group that this task belongs to.
 void setGroup(String group)
          Sets the group that this task belongs to.
 void setRefid(org.apache.tools.ant.types.Reference r)
          Makes this instance in effect a reference to another FileList instance.
 
Methods inherited from class org.apache.tools.ant.types.DataType
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected int debug
Debug level for this task.


debugWasSet

protected boolean debugWasSet
Whether debug was previously setup. This is used so that local debug attributes are not overridden by the value of a debug attribute inherited from its parent.

In other words, you can specify a debug attribute in a parent element, and override it in a sub-element.

Constructor Detail

BaseDataType

public BaseDataType()
Method Detail

setGroup

public void setGroup(String group)
Sets the group that this task belongs to.

Specified by:
setGroup in interface Groupable
Parameters:
group - String id of an existing group.

setGroup

public void setGroup(Group group)
Sets the group that this task belongs to.

Specified by:
setGroup in interface Groupable
Parameters:
group - Group object to add this task to.

getGroup

public Group getGroup()

setDebug

public void setDebug(int debug)
Set the debug level.

Parameters:
debug - an int value

getDebug

public int getDebug()
Return the debug level.

Returns:
an int value

debug

public void debug(String message)

println

public void println(String message)

print

public void print(String message)

setRefid

public void setRefid(org.apache.tools.ant.types.Reference r)
              throws org.apache.tools.ant.BuildException
Makes this instance in effect a reference to another FileList instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Overrides:
setRefid in class org.apache.tools.ant.types.DataType
org.apache.tools.ant.BuildException

getRef

protected BaseDataType getRef(org.apache.tools.ant.Project p)
Assuming this BaseDataType is a reference to a real one (has a refid attr), this method will return the one this points to.


getDataTypeName

protected String getDataTypeName()
Sets the name used for this datatype instance. Used when printing an error message in #getRef(Project)



Ant Functional Tester -- see Project home page for details