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

public Class Type

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

Type file/dir ResourceSelector.
Since
Ant 1.7

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Type.FileDir

Implements the type attribute.

Field Summary

Modifier and TypeField and Description
public static final Type
ANY

Static any type selector.

private static final String
public static final Type
DIR

Static dir type selector.

private static final String
public static final Type
FILE

Static file type selector.

private static final String
private Type.FileDir

Constructor Summary

AccessConstructor and Description
public
Type()

Default constructor.

public
Type(final Type.FileDir
the FileDir type.
fd
)

Convenience constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

whether the Resource was selected.
isSelected
(final 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
setType(final Type.FileDir
a FileDir object.
fd
)

Set type; file|dir.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ANYback to summary
public static final Type ANY

Static any type selector. Since Ant 1.8.

ANY_ATTRback to summary
private static final String ANY_ATTR
DIRback to summary
public static final Type DIR

Static dir type selector.

DIR_ATTRback to summary
private static final String DIR_ATTR
FILEback to summary
public static final Type FILE

Static file type selector.

FILE_ATTRback to summary
private static final String FILE_ATTR
typeback to summary
private Type.FileDir type

Constructor Detail

Typeback to summary
public Type()

Default constructor.

Typeback to summary
public Type(final Type.FileDir fd)

Convenience constructor.

Parameters
fd:Type.FileDir

the FileDir type.

Method Detail

isSelectedback to summary
public boolean isSelected(final 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.

setTypeback to summary
public void setType(final Type.FileDir fd)

Set type; file|dir.

Parameters
fd:Type.FileDir

a FileDir object.

org.apache.tools.ant.types.resources.selectors back to summary

public Class Type.FileDir

extends EnumeratedAttribute
Class Inheritance

Implements the type attribute.

Field Summary

Modifier and TypeField and Description
private static final String[]
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
value

Constructor Summary

AccessConstructor and Description
public
FileDir()

Default constructor.

public
FileDir(final String
the String EnumeratedAttribute value.
value
)

Convenience constructor.

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

a String array.
getValues
()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Return the possible values.
Inherited from org.apache.tools.ant.types.EnumeratedAttribute:
containsValuegetIndexgetInstancegetValueindexOfValuesetValuetoString

Field Detail

VALUESback to summary
private static final String[] VALUES

Constructor Detail

FileDirback to summary
public FileDir()

Default constructor.

FileDirback to summary
public FileDir(final String value)

Convenience constructor.

Parameters
value:String

the String EnumeratedAttribute value.

Method Detail

getValuesback to summary
public String[] getValues()

Implements abstract org.apache.tools.ant.types.EnumeratedAttribute.getValues.

Return the possible values.

Returns:String[]

a String array.

Annotations
@Override