org.apache.tools.ant.taskdefs.condition

Class TypeFound

public class TypeFound extends ProjectComponent implements Condition

looks for a task or other Ant type that exists. Existence is defined as the type is defined, and its implementation class is present. This will work for datatypes and preset, script and macro definitions.
Method Summary
protected booleandoesTypeExist(String typename)
test for a task or other ant type existing in the current project
booleaneval()
Is this condition true?
voidsetName(String name)
the task or other type to look for
voidsetURI(String uri)
The URI for this definition.

Method Detail

doesTypeExist

protected boolean doesTypeExist(String typename)
test for a task or other ant type existing in the current project

Parameters: typename the name of the type

Returns: true if the typename exists

eval

public boolean eval()
Is this condition true?

Returns: true if the condition is true

Throws: BuildException if an error occurs

setName

public void setName(String name)
the task or other type to look for

Parameters: name the name of the type

setURI

public void setURI(String uri)
The URI for this definition.

Parameters: uri the namespace URI. If this is not set, use the default ant namespace.