<sometask> <somepath> <pathelement location="/path/to/file.jar"/> <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3"/> <pathelement location="/path/to/file3.jar"/> <pathelement location="/path/to/file4.jar"/> </somepath> </sometask>
The object implementation sometask
must provide a method called
createSomepath
which returns an instance of Path
.
Nested path definitions are handled by the Path object and must be labeled
pathelement
.
The path element takes a parameter path
which will be parsed
and split into single elements. It will usually be used
to define a path from an environment variable.
Modifier and Type | Class and Description |
---|---|
public class | Path.PathElement
Helper class, holds the nested |
Modifier and Type | Field and Description |
---|---|
private boolean | |
private Boolean | |
public static final Path | systemBootClasspath
The system bootclasspath as a Path object. |
public static Path | systemClasspath
The system classpath as a Path object |
private Union |
Access | Constructor and Description |
---|---|
public | |
public |
Modifier and Type | Method and Description |
---|---|
public void | |
public void | |
public void | |
public void | addExisting(Path
- source path whose components are examined for existence source)Adds the components on the given path which exist to this Path. |
public void | addExisting(Path
the source path source, boolean if true try the user directory if the file is not present tryUserDir)Same as addExisting, but support classpath behavior if tryUserDir is true. |
public void | |
public void | |
public void | |
public void | |
public void | |
protected ResourceCollection | Returns: the passed in ResourceCollection.the ResourceCollection to check. rc)Verify the specified ResourceCollection is filesystem-only. |
public Object | Returns: Path with shallowly cloned Resource children.Overrides org. |
private Path | concatSpecialPath(String defValue, Path p)
Concatenates a class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
public Path | Returns: the concatenated paththe order ("first", "last", "only") defValue)Concatenates the system boot class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
public Path | Returns: the concatenated pathConcatenates the system class path in the order specified by the ${build.sysclasspath} property - using "last" as default value. |
public Path | Returns: the concatenated paththe order ("first", "last", "only") defValue)Concatenates the system class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
private static boolean | |
public Path | |
public Path. | Returns: thePathElement to be configuredCreates the nested |
protected boolean | Returns: true if iterator() should delegate to list() .Helps determine whether to preserve BC by calling |
protected synchronized void | dieOnCircularReference(Stack<Object>
the stack of data types to use (recursively). stk, Project the project to use to dereference the references. p)Overrides org. |
private synchronized boolean | |
private Path | |
public synchronized boolean | Returns: whether this is a filesystem-only resource collection.Implements org. |
public final synchronized Iterator | Returns: a "fail-fast" Iterator.Implements java. |
public String[] | Returns: list of path elements.Returns all path elements defined by this and nested path objects. |
private static File | resolveFile(Project project, String relativeName)
Resolve a filename with Project's help - if we know one that is. |
public void | |
public void | setLocation(File
the location of the element to add (must not be
location)null nor empty.Adds a element definition to the path. |
public void | |
public void | setRefid(Reference
the reference to another Path r)Overrides org. |
public synchronized int | Returns: number of elements as int.Implements org. |
public String | Returns: a textual representation of the path.Overrides org. |
public static String | Returns: the converted paththe path to convert source)Returns its argument with all file separator characters replaced so that they match the local OS conventions. |
protected static boolean | Returns: true if the character was a / or \a buffer containing a string buffer, int the position in the string buffer to convert pos)Translates occurrences at a position of / or \ to correct separator of the current platform and returns whether it had to do a replacement. |
public static String[] | Returns: an array of strings, one for each path elementthe project to use project, String a source)String valueSplits a PATH (with : or ; as separators) into its parts. |
cache | back to summary |
---|---|
private boolean cache |
preserveBC | back to summary |
---|---|
private Boolean preserveBC |
systemBootClasspath | back to summary |
---|---|
public static final Path systemBootClasspath The system bootclasspath as a Path object.
|
systemClasspath | back to summary |
---|---|
public static Path systemClasspath The system classpath as a Path object |
union | back to summary |
---|---|
private Union union |
Path | back to summary |
---|---|
public Path(Project p, String path) Invoked by IntrospectionHelper for |
Path | back to summary |
---|---|
public Path(Project project) Construct an empty
|
add | back to summary |
---|---|
public void add(Path path) throws BuildException Adds a nested path
|
add | back to summary |
---|---|
public void add(ResourceCollection c) Add a nested
|
addDirset | back to summary |
---|---|
public void addDirset(DirSet dset) throws BuildException Adds a nested
|
addExisting | back to summary |
---|---|
public void addExisting(Path source) Adds the components on the given path which exist to this Path. Components that don't exist aren't added.
|
addExisting | back to summary |
---|---|
public void addExisting(Path source, boolean tryUserDir) Same as addExisting, but support classpath behavior if tryUserDir is true. Classpaths are relative to user dir, not the project base. That used to break jspc test
|
addExtdirs | back to summary |
---|---|
public void addExtdirs(Path extdirs) Emulation of extdirs feature in Java >= 1.2. This method adds all files in the given directories (but not in sub-directories!) to the classpath, so that you don't have to specify them all one by one.
|
addFilelist | back to summary |
---|---|
public void addFilelist(FileList fl) throws BuildException Adds a nested
|
addFileset | back to summary |
---|---|
public void addFileset(FileSet fs) throws BuildException Adds a nested
|
addJavaRuntime | back to summary |
---|---|
public void addJavaRuntime() Add the Java Runtime classes to this Path instance. |
append | back to summary |
---|---|
public void append(Path other) Append the contents of the other Path instance to this.
|
assertFilesystemOnly | back to summary |
---|---|
protected ResourceCollection assertFilesystemOnly(ResourceCollection rc) Verify the specified ResourceCollection is filesystem-only.
|
clone | back to summary |
---|---|
public Object clone() Overrides org. Clone this Path. |
concatSpecialPath | back to summary |
---|---|
private Path concatSpecialPath(String defValue, Path p) Concatenates a class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
concatSystemBootClasspath | back to summary |
---|---|
public Path concatSystemBootClasspath(String defValue) Concatenates the system boot class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
concatSystemClasspath | back to summary |
---|---|
public Path concatSystemClasspath() Concatenates the system class path in the order specified by the ${build.sysclasspath} property - using "last" as default value.
|
concatSystemClasspath | back to summary |
---|---|
public Path concatSystemClasspath(String defValue) Concatenates the system class path in the order specified by the ${build.sysclasspath} property - using the supplied value if ${build.sysclasspath} has not been set. |
containsWildcards | back to summary |
---|---|
private static boolean containsWildcards(String path) Does the given file name contain wildcards?
|
createPath | back to summary |
---|---|
public Path createPath() throws BuildException Creates a nested
|
createPathElement | back to summary |
---|---|
public Path. Creates the nested
|
delegateIteratorToList | back to summary |
---|---|
protected boolean delegateIteratorToList() Helps determine whether to preserve BC by calling
|
dieOnCircularReference | back to summary |
---|---|
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p) throws BuildException Overrides org. Overrides the version of DataType to recurse on all DataType child elements that may have been added.
|
getPreserveBC | back to summary |
---|---|
private synchronized boolean getPreserveBC() |
getRef | back to summary |
---|---|
private Path getRef() |
isFilesystemOnly | back to summary |
---|---|
public synchronized boolean isFilesystemOnly() Implements org. Fulfill the ResourceCollection contract.
|
iterator | back to summary |
---|---|
public final synchronized Iterator Implements java. Fulfill the ResourceCollection contract. The Iterator returned will throw ConcurrentModificationExceptions if ResourceCollections are added to this container while the Iterator is in use. |
list | back to summary |
---|---|
public String[] list() Returns all path elements defined by this and nested path objects.
|
resolveFile | back to summary |
---|---|
private static File resolveFile(Project project, String relativeName) Resolve a filename with Project's help - if we know one that is. |
setCache | back to summary |
---|---|
public void setCache(boolean b) Whether to cache the current path.
|
setLocation | back to summary |
---|---|
public void setLocation(File location) throws BuildException Adds a element definition to the path.
|
setPath | back to summary |
---|---|
public void setPath(String path) throws BuildException Parses a path definition and creates single PathElements.
|
setRefid | back to summary |
---|---|
public void setRefid(Reference r) throws BuildException Overrides org. Makes this instance in effect a reference to another Path instance. You must not set another attribute or nest elements inside this element if you make it a reference.
|
size | back to summary |
---|---|
public synchronized int size() Implements org. Fulfill the ResourceCollection contract.
|
toString | back to summary |
---|---|
public String toString() Overrides org. Returns a textual representation of the path, which can be used as CLASSPATH or PATH environment variable definition. |
translateFile | back to summary |
---|---|
public static String translateFile(String source) Returns its argument with all file separator characters replaced so that they match the local OS conventions. |
translateFileSep | back to summary |
---|---|
protected static boolean translateFileSep(StringBuffer buffer, int pos) Translates occurrences at a position of / or \ to correct separator of the current platform and returns whether it had to do a replacement.
|
translatePath | back to summary |
---|---|
public static String[] translatePath(Project project, String source) Splits a PATH (with : or ; as separators) into its parts. |
<pathelement>
values.
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public String[] | |
public boolean | Returns: true.Implements org. |
public Iterator | |
public void | |
public void | |
public int | Returns: the number of parts.Implements org. |
parts | back to summary |
---|---|
private String[] parts |
PathElement | back to summary |
---|---|
public PathElement() |
getParts | back to summary |
---|---|
public String[] getParts() Return the converted pathelements.
|
isFilesystemOnly | back to summary |
---|---|
public boolean isFilesystemOnly() Implements org. Check if this resource is only for filesystems.
|
iterator | back to summary |
---|---|
public Iterator Implements java. Create an iterator. |
setLocation | back to summary |
---|---|
public void setLocation(File loc) Set the location.
|
setPath | back to summary |
---|---|
public void setPath(String path) Set the path.
|
size | back to summary |
---|---|
public int size() Implements org. Get the number of resources.
|