Modifier and Type | Class and Description |
---|---|
public static class | Available.FileDir
EnumeratedAttribute covering the file types to be checked for, either file or dir. |
Modifier and Type | Field and Description |
---|---|
private String | |
private Path | |
private File | |
private static final FileUtils | |
private String | |
private Path | |
private boolean | |
private boolean | |
private AntClassLoader | |
private String | |
private String | |
private boolean | |
private Available. | |
private Object |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
private boolean | |
private boolean | checkFile()
Search for file/directory either relative to project's basedir or in the path given as filepath. |
private boolean | |
private boolean | |
public Path | Returns: an empty Path instance to be configured by Ant.Classpath to be used when searching for classes and resources. |
public Path | Returns: a new Path instance which Ant will configure with a file search path.Path to search for file resources. |
public boolean | Returns: boolean is the resource is available.Implements org. |
public void | |
public void | setClassname(String
the name of the class required. classname)Set a classname of a class which must be available to set the given property. |
public void | setClasspath(Path
an Ant Path object containing the search path. classpath)Set the classpath to be used when searching for classes and resources. |
public void | setClasspathRef(Reference
a Reference to a Path instance to be used as the classpath
value. r)Set the classpath by reference. |
public void | |
public void | setFilepath(Path
a Path instance containing the search path for files. filepath)Set the path to use when looking for a file. |
public void | setIgnoresystemclasses(boolean
true if system classes are to be ignored. ignore)Set whether the search for classes should ignore the runtime classes and just use the given classpath. |
public void | setProperty(String
the name of the property to set. property)Set the name of the property which will be set if the particular resource is available. |
public void | setResource(String
the name of a resource which is required to be available. resource)Set the name of a Java resource which is required to set the property. |
public void | |
public void | |
public void | |
public void | |
public void |
classname | back to summary |
---|---|
private String classname |
classpath | back to summary |
---|---|
private Path classpath |
file | back to summary |
---|---|
private File file |
FILE_UTILS | back to summary |
---|---|
private static final FileUtils FILE_UTILS |
filename | back to summary |
---|---|
private String filename |
filepath | back to summary |
---|---|
private Path filepath |
ignoreSystemclasses | back to summary |
---|---|
private boolean ignoreSystemclasses |
isTask | back to summary |
---|---|
private boolean isTask |
loader | back to summary |
---|---|
private AntClassLoader loader |
property | back to summary |
---|---|
private String property |
resource | back to summary |
---|---|
private String resource |
searchParents | back to summary |
---|---|
private boolean searchParents |
type | back to summary |
---|---|
private Available. |
value | back to summary |
---|---|
private Object value |
Available | back to summary |
---|---|
public Available() |
checkClass | back to summary |
---|---|
private boolean checkClass(String classname) Check if a given class can be loaded. |
checkFile | back to summary |
---|---|
private boolean checkFile() Search for file/directory either relative to project's basedir or in the path given as filepath. filepath can be a list of directory and/or file names (gen'd
via look for:
|
checkFile | back to summary |
---|---|
private boolean checkFile(File f, String text) Check if a given file exists and matches the required type. |
checkResource | back to summary |
---|---|
private boolean checkResource(String resource) Check if a given resource can be loaded. |
createClasspath | back to summary |
---|---|
public Path createClasspath() Classpath to be used when searching for classes and resources.
|
createFilepath | back to summary |
---|---|
public Path createFilepath() Path to search for file resources.
|
eval | back to summary |
---|---|
public boolean eval() throws BuildException Implements org. Evaluate the availability of a resource.
|
execute | back to summary |
---|---|
public void execute() throws BuildException Overrides org. Entry point when operating as a task.
|
setClassname | back to summary |
---|---|
public void setClassname(String classname) Set a classname of a class which must be available to set the given property.
|
setClasspath | back to summary |
---|---|
public void setClasspath(Path classpath) Set the classpath to be used when searching for classes and resources.
|
setClasspathRef | back to summary |
---|---|
public void setClasspathRef(Reference r) Set the classpath by reference.
|
setFile | back to summary |
---|---|
public void setFile(File file) Set the file which must be present in the file system to set the given property.
|
setFilepath | back to summary |
---|---|
public void setFilepath(Path filepath) Set the path to use when looking for a file.
|
setIgnoresystemclasses | back to summary |
---|---|
public void setIgnoresystemclasses(boolean ignore) Set whether the search for classes should ignore the runtime classes and just use the given classpath.
|
setProperty | back to summary |
---|---|
public void setProperty(String property) Set the name of the property which will be set if the particular resource is available.
|
setResource | back to summary |
---|---|
public void setResource(String resource) Set the name of a Java resource which is required to set the property.
|
setSearchParents | back to summary |
---|---|
public void setSearchParents(boolean searchParents) Set the searchParents attribute. This controls the behaviour of the the "file" type. If true, the path, parent path and grandparent path are searched for the file. If false, only the path is searched. The default value is false.
|
setType | back to summary |
---|---|
public void setType(String type)
Deprecated since 1.5.x. setType(String) is deprecated and is replaced with setType(Available.FileDir) to make Ant's Introspection mechanism do the work and also to encapsulate operations on the type in its own class.
|
setType | back to summary |
---|---|
public void setType(Available. Set what type of file is required - either directory or file. |
setValue | back to summary |
---|---|
public void setValue(Object value) Set the value to be given to the property if the desired resource is available.
|
setValue | back to summary |
---|---|
public void setValue(String value) Set the value to be given to the property if the desired resource is available.
|
Modifier and Type | Field and Description |
---|---|
private static final String[] |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String[] | getValues()
Implements abstract org. |
public boolean | Returns: true if the value specifies a directory.Indicate if the value specifies a directory. |
public boolean |
VALUES | back to summary |
---|---|
private static final String[] VALUES |
FileDir | back to summary |
---|---|
public FileDir() |
getValues | back to summary |
---|---|
public String[] getValues() Implements abstract org. Doc from org. This is the only method a subclass needs to implement. |
isDir | back to summary |
---|---|
public boolean isDir() Indicate if the value specifies a directory.
|
isFile | back to summary |
---|---|
public boolean isFile() Indicate if the value specifies a file.
|