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

public Class IsReference

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.Reference

Condition that tests whether a given reference has been defined.

Optionally tests whether it is of a given type/class.

Since
Ant 1.6

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the reference exists and if type is set, if the reference is the same type
eval
()

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

Is this condition true?
public void
setRefid(Reference
a Reference value
r
)

Set the refid attribute.

public void
setType(String
an ant component type name
type
)

Set the type attribute.

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

Field Detail

refback to summary
private Reference ref
typeback to summary
private String type

Constructor Detail

IsReferenceback to summary
public IsReference()

Method Detail

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 reference exists and if type is set, if the reference is the same type

Annotations
@Override
Exceptions
BuildException:
if an error occurs
setRefidback to summary
public void setRefid(Reference r)

Set the refid attribute.

Parameters
r:Reference

a Reference value

setTypeback to summary
public void setType(String type)

Set the type attribute. This is optional attribute.

Parameters
type:String

an ant component type name