Top Description Fields Constructors Methods
org.apache.tools.ant.types.resources.selectors

public Class InstanceOf

extends Object
implements ResourceSelector
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.types.resources.selectors.ResourceSelector
Imports
org.apache.tools.ant.AntTypeDefinition, .BuildException, .ComponentHelper, .Project, .ProjectHelper, org.apache.tools.ant.types.Resource

InstanceOf ResourceSelector.
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
private Class<?>
private static final String
private Project
private String
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>

Returns:

the Class object.
getCheckClass
()

Get the comparison class.

public String

Returns:

the String typename.
getType
()

Get the comparison type.

public String

Returns:

the String URI.
getURI
()

Get the type's URI.

public boolean

Returns:

whether the Resource was selected.
isSelected
(Resource
the Resource to check.
r
)

Implements org.apache.tools.ant.types.resources.selectors.ResourceSelector.isSelected.

Return true if this Resource is selected.
public void
setClass(Class<?>
the class.
c
)

Set the class to compare against.

public void
setProject(Project
the Project instance used for type comparisons.
p
)

Set the Project instance for this InstanceOf selector.

public void
setType(String
the type name.
s
)

Set the Ant type to compare against.

public void
setURI(String
the URI.
u
)

Set the URI in which the Ant type, if specified, should be defined.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clazzback to summary
private Class<?> clazz
ONE_ONLYback to summary
private static final String ONE_ONLY
projectback to summary
private Project project
typeback to summary
private String type
uriback to summary
private String uri

Constructor Detail

InstanceOfback to summary
public InstanceOf()

Method Detail

getCheckClassback to summary
public Class<?> getCheckClass()

Get the comparison class.

Returns:Class<?>

the Class object.

getTypeback to summary
public String getType()

Get the comparison type.

Returns:String

the String typename.

getURIback to summary
public String getURI()

Get the type's URI.

Returns:String

the String URI.

isSelectedback to summary
public boolean isSelected(Resource r)

Implements org.apache.tools.ant.types.resources.selectors.ResourceSelector.isSelected.

Return true if this Resource is selected.

Parameters
r:Resource

the Resource to check.

Returns:boolean

whether the Resource was selected.

Exceptions
BuildException:
if an error occurs.
setClassback to summary
public void setClass(Class<?> c)

Set the class to compare against.

Parameters
c:Class<?>

the class.

setProjectback to summary
public void setProject(Project p)

Set the Project instance for this InstanceOf selector.

Parameters
p:Project

the Project instance used for type comparisons.

setTypeback to summary
public void setType(String s)

Set the Ant type to compare against.

Parameters
s:String

the type name.

setURIback to summary
public void setURI(String u)

Set the URI in which the Ant type, if specified, should be defined.

Parameters
u:String

the URI.