|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes implementing this interface can explore the classpath, retrieving the contents of Java packages and enumerate the classes therein.
Multiple jars or directories containing different classes in the same package are supported.
However, different jars and directories containing the same class are not.
Field Summary | |
static int |
IN_DIRECTORY
Status constant mask, indicating that a certain package is found in a directory. |
static int |
IN_JAR
Status constant mask, indicating that a certain package is found in a jar file. |
static int |
IN_JAR_SEALED
Status constant mask, indicating that a certain package is found in a jar file and is sealed. |
Method Summary | |
java.lang.String |
getErrorLog()
Return an error status for the explorer. |
java.io.File[] |
getPackageFiles(java.lang.String packageName)
Return the one or more files or directories where a package lives. |
int |
getStatus(java.lang.String packageName)
Return information on whether the package lives in a directory, a jar file, a sealed jar file or a combination. |
boolean |
hasErrorOccurred()
Return an error status for the explorer. |
java.lang.String[] |
listPackage(java.lang.String packageName)
Return the names of all the classes in the package. |
java.lang.String[] |
listPackage(java.lang.String packageName,
int status)
Return the names of the classes in the package. |
java.lang.String[] |
listPackageNames()
List the available packages. |
java.lang.String[] |
listPackageNames(boolean rescan)
List the available packages. |
Field Detail |
public static final int IN_DIRECTORY
getStatus(java.lang.String)
,
Constant Field Valuespublic static final int IN_JAR
getStatus(java.lang.String)
,
Constant Field Valuespublic static final int IN_JAR_SEALED
getStatus(java.lang.String)
,
Constant Field ValuesMethod Detail |
public java.lang.String[] listPackageNames()
public java.lang.String[] listPackageNames(boolean rescan)
This can take a long time on first invocation or if rescan is true.
rescan
- forces a re-scanning
public java.lang.String[] listPackage(java.lang.String packageName, int status)
packageName
- the name of the package
public java.lang.String[] listPackage(java.lang.String packageName)
packageName
- the name of the package
public int getStatus(java.lang.String packageName)
This can take a long time on first invocation.
packageName
- the name of the package
public java.io.File[] getPackageFiles(java.lang.String packageName)
This can take a long time on first invocation.
packageName
- the name of the package
public boolean hasErrorOccurred()
public java.lang.String getErrorLog()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |