|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.tools.util.ClassPath
ClassPath represents a classpath for an application. It consists of a set of Strings that contain the path to classes and resources needed by the application. The classpath can contain directory references where classes can be found and jar(or zip) file names which contain classes.
This class provides a number of utility methods for classpath related activities.
Nested Class Summary | |
protected class |
ClassPath.ClassFilter
FileFilter for classes only (excluding inner classes) |
protected class |
ClassPath.PackageFilter
FileFilter for packages only - no files |
Constructor Summary | |
ClassPath()
Constructs a new empty ClassPath |
|
ClassPath(java.lang.String classPath)
Constructs a new ClassPath based on the given String representation. |
Method Summary | |
protected void |
addMissingEntries()
Add missing entries to entries TreeSet. |
void |
addPath(java.lang.String path)
Add a path to this classpath. |
java.lang.String |
getClassPathString()
Get the String representation of this classpath. |
javax.swing.tree.DefaultMutableTreeNode |
getClassTree()
Get a Tree consisting of all classes based on this ClassPath. |
java.util.TreeSet |
getEntries()
Get the internal set of entries -- for testing purposes only. |
protected void |
getEntriesInPath()
|
javax.swing.tree.DefaultMutableTreeNode |
getPackageTree()
Get a Tree consisting of all packages based on this ClassPath. |
java.util.ArrayList |
getPaths()
Get a copy of the paths for this ClassPath. |
javax.swing.tree.DefaultMutableTreeNode |
getTree(java.io.FileFilter filter,
boolean removeFileType)
Get a Tree consisting of all files matching given filter. |
protected java.lang.String |
getTreePath(javax.swing.tree.DefaultMutableTreeNode node)
Get the String representation of given path |
void |
removePath(java.lang.String path)
Remove a path from this classpath. |
protected void |
resetEntries()
Reset the cached entries and trees, forcing a rebuild from the current paths. |
void |
resetPaths()
Reset the collection of paths to empty. |
void |
setClassPathString(java.lang.String classPath)
Set this ClassPath from the given String representation. |
protected void |
setInternalEntries(java.util.TreeSet entries)
Set the internal entries TreeSet for testing purposes only. |
void |
setPaths(java.util.ArrayList newPaths)
Set the internal ArrayList of paths for this ClassPath. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassPath()
public ClassPath(java.lang.String classPath)
Method Detail |
public void setClassPathString(java.lang.String classPath)
classPath
- is a set of paths separated by semicolons.public java.lang.String getClassPathString()
public void addPath(java.lang.String path)
path
- to add to this classpath.public void removePath(java.lang.String path)
path
- to remove from this classpath.public void setPaths(java.util.ArrayList newPaths)
newPaths
- the internal ArrayList of paths for this ClassPath.public java.util.ArrayList getPaths()
public javax.swing.tree.DefaultMutableTreeNode getClassTree()
public javax.swing.tree.DefaultMutableTreeNode getPackageTree()
public java.util.TreeSet getEntries()
public void resetPaths()
protected java.lang.String getTreePath(javax.swing.tree.DefaultMutableTreeNode node)
public javax.swing.tree.DefaultMutableTreeNode getTree(java.io.FileFilter filter, boolean removeFileType)
protected void resetEntries()
protected void addMissingEntries()
com/sun/tools/jdi/resources/jdi.properties
followed
by com/sun/xml/parser/
. It is missing the entry
com/sun/xml/
.
protected void setInternalEntries(java.util.TreeSet entries)
entries
- the internal entries TreeSet for testing purposes only.protected void getEntriesInPath()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |