|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassPackageExplorer
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 |
---|
static final int IN_DIRECTORY
getStatus(java.lang.String)
,
Constant Field Valuesstatic final int IN_JAR
getStatus(java.lang.String)
,
Constant Field Valuesstatic final int IN_JAR_SEALED
getStatus(java.lang.String)
,
Constant Field ValuesMethod Detail |
---|
java.lang.String[] listPackageNames()
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
java.lang.String[] listPackage(java.lang.String packageName, int status)
packageName
- the name of the packagestatus
- bit mask (see status constant masks) indicating which files to list.
java.lang.String[] listPackage(java.lang.String packageName)
packageName
- the name of the package
int getStatus(java.lang.String packageName)
This can take a long time on first invocation.
packageName
- the name of the package
java.io.File[] getPackageFiles(java.lang.String packageName)
This can take a long time on first invocation.
packageName
- the name of the package
boolean hasErrorOccurred()
java.lang.String getErrorLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |