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

public Class ResourceExists

extends ProjectComponent
implements Condition
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.taskdefs.condition.Condition
Imports
org.apache.tools.ant.BuildException, .ProjectComponent, org.apache.tools.ant.types.Resource

Condition that checks whether a given resource exists.
Since
Ant 1.8.0

Field Summary

Modifier and TypeField and Description
private Resource
Inherited from org.apache.tools.ant.ProjectComponent:
descriptionlocationproject

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(Resource
Resource
r
)

The resource to test.

public boolean
eval()

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

Is this condition true?
protected void
validate()

Argument validation.

Inherited from org.apache.tools.ant.ProjectComponent:
clonegetDescriptiongetLocationgetProjectloglogsetDescriptionsetLocationsetProject

Field Detail

resourceback to summary
private Resource resource

Constructor Detail

ResourceExistsback to summary
public ResourceExists()

Method Detail

addback to summary
public void add(Resource r)

The resource to test.

Parameters
r:Resource

Resource

evalback to summary
public boolean eval() throws BuildException

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

Doc from org.apache.tools.ant.taskdefs.condition.Condition.eval.

Is this condition true?

Returns:boolean

true if the condition is true

Exceptions
BuildException:
if an error occurs
validateback to summary
protected void validate() throws BuildException

Argument validation.