|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.pf.file.Classpath
public class Classpath
Represents a classpath definition whereas the elements are already parsed
an validated.
Since version 1.2 elements are also collected from patterns with wildcards
(e.g. "base.jar:lib/*.jar:xalan.jar")
| Constructor Summary | |
|---|---|
Classpath()
Initialize the new instance with the classpath from System property "java.class.path" or from the Class-Path value in the manifest file of the sole JAR file if the program was started with option -jar. |
|
Classpath(java.util.Collection classpathElements)
Initialize the new instance with the given elements. |
|
Classpath(java.lang.String classpath)
Initialize the new instance with a classpath definition. |
|
Classpath(java.lang.String[] classpathElements)
Initialize the new instance with the given elements. |
|
Classpath(java.lang.String classpath,
java.lang.String separator)
Initialize the new instance with a classpath definition where the separator is the one given as parameter. |
|
| Method Summary | |
|---|---|
ClasspathElement[] |
allElements()
Returns all classpath elements. |
ClasspathElement[] |
elementsContaining(java.lang.String filename)
Returns all elements that contain a file with the specified name. |
ClasspathElement |
firstElementContaining(java.lang.String filename)
Returns the first element that contains a file with the specified name or null if the file cannot be found. |
ClasspathElement[] |
invalidElements()
Returns the classpath elements that are invalid. |
void |
removeDuplicates()
Removes all duplicates of classpath elements that are already in the classpath. |
java.lang.String |
toString()
Returns the string representation of this classpath using the current platform's path separator. |
java.lang.String |
toString(java.lang.String separator)
Returns the string representation of this classpath using the given path separator. |
ClasspathElement[] |
validElements()
Returns the classpath elements that are valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Classpath()
public Classpath(java.lang.String classpath)
classpath - A classpath definition with the current platform's path separator
public Classpath(java.lang.String classpath,
java.lang.String separator)
classpath - A classpath definition with the specified path separatorseparator - The separator thst is used to separate the elementspublic Classpath(java.lang.String[] classpathElements)
classpathElements - An array with the elements of the classpathpublic Classpath(java.util.Collection classpathElements)
classpathElements - A collection of String elements that build the classpath| Method Detail |
|---|
public ClasspathElement[] allElements()
public ClasspathElement[] validElements()
public ClasspathElement[] invalidElements()
public ClasspathElement[] elementsContaining(java.lang.String filename)
public ClasspathElement firstElementContaining(java.lang.String filename)
public void removeDuplicates()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String separator)
separator - The separator to separate the elements
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||