org.apache.tools.ant.taskdefs.conditionClass ResourceContains
- java.lang.Object
- org.apache.tools.ant.taskdefs.condition.ResourceContains
Constructor Summary
Constructors Constructor and Description ResourceContains()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
eval()
Evaluates the condition.Project
getProject()
Get this condition's Project.void
setCasesensitive(boolean casesensitive)
Sets case sensitivity attribute.void
setProject(Project project)
Set this condition's Project.void
setRefid(java.lang.String refid)
Sets the refid to search; should indicate a resource directly or by way of a single-element ResourceCollection.void
setResource(java.lang.String r)
Sets the resource to searchvoid
setSubstring(java.lang.String substring)
Sets the substring to look for
Method Detail
setProject
public void setProject(Project project)Set this condition's Project.
- Parameters:
project
- Project
getProject
public Project getProject()Get this condition's Project.
- Returns:
- Project
setResource
public void setResource(java.lang.String r)Sets the resource to search
- Parameters:
r
- the value to use.
setRefid
public void setRefid(java.lang.String refid)Sets the refid to search; should indicate a resource directly or by way of a single-element ResourceCollection.
- Parameters:
refid
- the value to use.
setSubstring
public void setSubstring(java.lang.String substring)Sets the substring to look for
- Parameters:
substring
- the value to use.
setCasesensitive
public void setCasesensitive(boolean casesensitive)Sets case sensitivity attribute.
- Parameters:
casesensitive
- the value to use.
eval
public boolean eval() throws BuildExceptionEvaluates the condition.
- Specified by:
eval
in interfaceCondition
- Returns:
- true if the substring is contained in the resource
- Throws:
BuildException
- if there is a problem.