Class HasMethod
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.HasMethod
- All Implemented Interfaces:
java.lang.Cloneable
,Condition
public class HasMethod extends ProjectComponent implements Condition
test for a method
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HasMethod()
-
Method Summary
Modifier and Type Method Description Path
createClasspath()
Classpath to be used when searching for classes and resources.boolean
eval()
Is this condition true?void
setClassname(java.lang.String classname)
Set the classname attribute.void
setClasspath(Path classpath)
Set the classpath to be used when searching for classes and resources.void
setClasspathRef(Reference r)
Set the classpath by reference.void
setField(java.lang.String field)
Set the name of the field.void
setIgnoreSystemClasses(boolean ignoreSystemClasses)
Set whether to ignore system classes when looking for the class.void
setMethod(java.lang.String method)
Set the name of the method.Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
HasMethod
public HasMethod()
-
-
Method Details
-
setClasspath
Set the classpath to be used when searching for classes and resources.- Parameters:
classpath
- an Ant Path object containing the search path.
-
createClasspath
Classpath to be used when searching for classes and resources.- Returns:
- an empty Path instance to be configured by Ant.
-
setClasspathRef
Set the classpath by reference.- Parameters:
r
- a Reference to a Path instance to be used as the classpath value.
-
setClassname
public void setClassname(java.lang.String classname)Set the classname attribute.- Parameters:
classname
- the name of the class to check.
-
setMethod
public void setMethod(java.lang.String method)Set the name of the method.- Parameters:
method
- the name of the method to check.
-
setField
public void setField(java.lang.String field)Set the name of the field.- Parameters:
field
- the name of the field to check.
-
setIgnoreSystemClasses
public void setIgnoreSystemClasses(boolean ignoreSystemClasses)Set whether to ignore system classes when looking for the class.- Parameters:
ignoreSystemClasses
- aboolean
value.
-
eval
Is this condition true?.- Specified by:
eval
in interfaceCondition
- Returns:
- true if the condition is true
- Throws:
BuildException
- if an error occurs
-