Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.condition

public Class ResourceContains

extends Object
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
java.io.BufferedReader, .File, .IOException, .InputStreamReader, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.Resource, .ResourceCollection, org.apache.tools.ant.types.resources.FileResource, org.apache.tools.ant.util.FileUtils

<resourcecontains> Is a string contained in a resource (file currently)?
Since
Ant 1.7.1

Field Summary

Modifier and TypeField and Description
private boolean
private Project
private String
private Resource
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized boolean

Returns:

true if the substring is contained in the resource
eval
()

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Evaluates the condition.
public Project

Returns:

Project
getProject
()

Get this condition's Project.

private void
public void
setCasesensitive(boolean
the value to use.
casesensitive
)

Sets case sensitivity attribute.

public void
setProject(Project
Project
project
)

Set this condition's Project.

public void
setRefid(String
the value to use.
refid
)

Sets the refid to search; should indicate a resource directly or by way of a single-element ResourceCollection.

public void
setResource(String
the value to use.
r
)

Sets the resource to search

public void
setSubstring(String
the value to use.
substring
)

Sets the substring to look for

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

casesensitiveback to summary
private boolean casesensitive
projectback to summary
private Project project
refidback to summary
private String refid
resourceback to summary
private Resource resource
substringback to summary
private String substring

Constructor Detail

ResourceContainsback to summary
public ResourceContains()

Method Detail

evalback to summary
public synchronized boolean eval() throws BuildException

Implements org.apache.tools.ant.taskdefs.condition.Condition.eval.

Evaluates the condition.

Returns:boolean

true if the substring is contained in the resource

Annotations
@Override
Exceptions
BuildException:
if there is a problem.
getProjectback to summary
public Project getProject()

Get this condition's Project.

Returns:Project

Project

resolveRefidback to summary
private void resolveRefid()
setCasesensitiveback to summary
public void setCasesensitive(boolean casesensitive)

Sets case sensitivity attribute.

Parameters
casesensitive:boolean

the value to use.

setProjectback to summary
public void setProject(Project project)

Set this condition's Project.

Parameters
project:Project

Project

setRefidback to summary
public void setRefid(String refid)

Sets the refid to search; should indicate a resource directly or by way of a single-element ResourceCollection.

Parameters
refid:String

the value to use.

setResourceback to summary
public void setResource(String r)

Sets the resource to search

Parameters
r:String

the value to use.

setSubstringback to summary
public void setSubstring(String substring)

Sets the substring to look for

Parameters
substring:String

the value to use.

validateback to summary
private void validate()