org.apache.tools.ant.types.resources.selectors

Class InstanceOf

Implemented Interfaces:
ResourceSelector

public class InstanceOf
extends java.lang.Object
implements ResourceSelector

InstanceOf ResourceSelector.
Since:
Ant 1.7

Method Summary

Class
getCheckClass()
Get the comparison class.
String
getType()
Get the comparison type.
String
getURI()
Get the type's URI.
boolean
isSelected(Resource r)
Return true if this Resource is selected.
void
setClass(Class c)
Set the class to compare against.
void
setProject(Project p)
Set the Project instance for this InstanceOf selector.
void
setType(String s)
Set the Ant type to compare against.
void
setURI(String u)
Set the URI in which the Ant type, if specified, should be defined.

Method Details

getCheckClass

public Class getCheckClass()
Get the comparison class.
Returns:
the Class object.

getType

public String getType()
Get the comparison type.
Returns:
the String typename.

getURI

public String getURI()
Get the type's URI.
Returns:
the String URI.

isSelected

public boolean isSelected(Resource r)
Return true if this Resource is selected.
Specified by:
isSelected in interface ResourceSelector
Parameters:
r - the Resource to check.
Returns:
whether the Resource was selected.

setClass

public void setClass(Class c)
Set the class to compare against.
Parameters:
c - the class.

setProject

public void setProject(Project p)
Set the Project instance for this InstanceOf selector.
Parameters:
p - the Project instance used for type comparisons.

setType

public void setType(String s)
Set the Ant type to compare against.
Parameters:
s - the type name.

setURI

public void setURI(String u)
Set the URI in which the Ant type, if specified, should be defined.
Parameters:
u - the URI.