Package org.apache.tools.ant.taskdefs.condition

# Class ResourceContains

java.lang.Object
org.apache.tools.ant.taskdefs.condition.ResourceContains

All Implemented Interfaces:
  `Condition`

public class ResourceContains extends Object implements Condition
<resourcecontains> Is a string contained in a resource (file currently)?

Since:
  Ant 1.7.1

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceContains()`

- ## Method Summary

  Modifier and Type
  Method
  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(String refid)`
  Sets the refid to search; should indicate a resource directly or by way of a single-element ResourceCollection.
  `void`
  `setResource(String r)`
  Sets the resource to search
  `void`
  `setSubstring(String substring)`
  Sets the substring to look for

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ResourceContains

    public ResourceContains()

- ## Method Details

  - ### 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(String r)
    Sets the resource to search
    Parameters:
      `r` - the value to use.

  - ### setRefid

    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` - the value to use.

  - ### setSubstring

    public void setSubstring(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 BuildException
    Evaluates the condition.
    Specified by:
      `eval` in interface `Condition`
    Returns:
      true if the substring is contained in the resource
    Throws:
      `BuildException` - if there is a problem.