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

java.lang.Object
  extended by org.apache.tools.ant.types.resources.selectors.Type
All Implemented Interfaces:
ResourceSelector

public class Type
extends java.lang.Object
implements ResourceSelector

Type file/dir ResourceSelector.

Since:
Ant 1.7

Nested Class Summary
static class Type.FileDir
          Implements the type attribute.
 
Field Summary
static Type ANY
          Static any type selector.
static Type DIR
          Static dir type selector.
static Type FILE
          Static file type selector.
 
Constructor Summary
Type()
          Default constructor.
Type(Type.FileDir fd)
          Convenience constructor.
 
Method Summary
 boolean isSelected(Resource r)
          Return true if this Resource is selected.
 void setType(Type.FileDir fd)
          Set type; file|dir.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILE

public static final Type FILE
Static file type selector.


DIR

public static final Type DIR
Static dir type selector.


ANY

public static final Type ANY
Static any type selector. Since Ant 1.8.

Constructor Detail

Type

public Type()
Default constructor.


Type

public Type(Type.FileDir fd)
Convenience constructor.

Parameters:
fd - the FileDir type.
Method Detail

setType

public void setType(Type.FileDir fd)
Set type; file|dir.

Parameters:
fd - a FileDir object.

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.