Todo
- audit error handling throughout, but mainly in scan package - handling of covariant overrides - handling of override of method found in multiple superinterfaces - convert type/method/field output to Java source like syntax, e.g. instead of java/lang/Character.isJavaLetter(C)Z print void java.lang.Character.isJavaLetter(char)boolean - more example output in man page - more rigorous GNU style option parsing; use joptsimple? FUTURES: - add module support: --add-modules, --module-path, module arg - load deprecation declarations from a designated class library instead of the JDK - load deprecation declarations from a module - scan a module (but a modular jar can be treated just a like an ordinary jar) - multi-version jar
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | Main.
An enum denoting the mode in which the tool is running. |
| pack-priv static enum | |
| pack-priv static class | Main.
A checked exception that's thrown if a command-line syntax error is detected. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final List | |
| pack-priv final List | |
| pack-priv final List | |
| pack-priv final JavaCompiler | |
| pack-priv List | |
| pack-priv final PrintStream | |
| pack-priv final StandardJavaFileManager | |
| pack-priv boolean | |
| pack-priv final List | |
| pack-priv final PrintStream | |
| pack-priv final Set | |
| pack-priv final Set | |
| pack-priv final List | |
| pack-priv final Set | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | Main(PrintStream
the stream to which the tool's output is sent out, PrintStream the stream to which error messages are sent err)Constructs an instance of the finder tool. |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true on success, false otherwiseProgrammatic main entry point: initializes the tool instance to use stdout and stderr; runs the tool, passing command-line args; returns an exit status. |
| pack-priv String | Returns: the modular classnamethe input filename filename)Replaces all but the first occurrence of '/' with '.'. |
| pack-priv boolean | Returns: true for success, false for failurecollection of fully qualified classnames to process classNames)Processes a collection of class names. |
| pack-priv boolean | Returns: true for success, false for failurea Stream of filenames to process filenames)Processes a stream of filenames (strings). |
| pack-priv boolean | |
| pack-priv boolean | Returns: true for success, false for failurea Stream of filenames to process filenames)Processes a stream of filenames (strings) including a module prefix. |
| public static void | |
| private void | |
| pack-priv boolean | Returns: true for success, false for failurethe name of the directory to process dirname, Collection<String> the names of classes to process classNames)Processes named class files in the given directory. |
| pack-priv boolean | Returns: true for success, false for failurethe name of the jar file to process jarname, Collection<String> the names of classes to process classNames)Processes named class files from the given jar file, or all classes if classNames is empty. |
| pack-priv boolean | |
| pack-priv boolean | Returns: true for success, false for failurethe path to the "home" of the JDK to process jdkHome, Collection<String> the names of classes to process classNames)Processes named class files from rt.jar of a JDK version 7 or 8. |
| pack-priv boolean | Returns: success valuea supported release version, like "8" or "10". release, Collection<String> collection of classes to process, may be empty classes)Process classes from a particular JDK release, using only information in this JDK. |
| pack-priv boolean | Returns: true for success, false for failureProcesses the class files from the currently running JDK, using the jrt: filesystem. |
| public void | report(Diagnostic<? extends JavaFileObject>
the tool diagnostic to print diagnostic)Implements javax. Prints the diagnostic to the err stream. |
| pack-priv void | require(boolean
the condition that's required to be true cond)Convenience method to throw UsageException if a condition is false. |
| pack-priv boolean |
| bootClassPath | back to summary |
|---|---|
| pack-priv final List<File> bootClassPath | |
| classPath | back to summary |
|---|---|
| pack-priv final List<File> classPath | |
| comments | back to summary |
|---|---|
| pack-priv final List<String> comments | |
| compiler | back to summary |
|---|---|
| pack-priv final JavaCompiler compiler | |
| deprList | back to summary |
|---|---|
| pack-priv List<DeprData> deprList | |
| err | back to summary |
|---|---|
| pack-priv final PrintStream err | |
| fm | back to summary |
|---|---|
| pack-priv final StandardJavaFileManager fm | |
| forRemoval | back to summary |
|---|---|
| pack-priv boolean forRemoval | |
| options | back to summary |
|---|---|
| pack-priv final List<String> options | |
| out | back to summary |
|---|---|
| pack-priv final PrintStream out | |
| releasesWithForRemoval | back to summary |
|---|---|
| pack-priv final Set<String> releasesWithForRemoval | |
| releasesWithoutForRemoval | back to summary |
|---|---|
| pack-priv final Set<String> releasesWithoutForRemoval | |
| systemModules | back to summary |
|---|---|
| pack-priv final List<File> systemModules | |
| validReleases | back to summary |
|---|---|
| pack-priv final Set<String> validReleases | |
| verbose | back to summary |
|---|---|
| pack-priv boolean verbose | |
| Main | back to summary |
|---|---|
| pack-priv Main(PrintStream out, PrintStream err) Constructs an instance of the finder tool.
| |
| call | back to summary |
|---|---|
| public static boolean call(PrintStream out, PrintStream err, String... args) Programmatic main entry point: initializes the tool instance to use stdout and stderr; runs the tool, passing command-line args; returns an exit status.
| |
| convertModularFileName | back to summary |
|---|---|
| pack-priv String convertModularFileName(String filename) Replaces all but the first occurrence of '/' with '.'. Assumes that the name is in the format module/pkg/pkg/classname.class. That is, the name should contain at least one '/' character separating the module name from the package-class name. | |
| doClassNames | back to summary |
|---|---|
| pack-priv boolean doClassNames(Collection<String> classNames) throws IOException Processes a collection of class names. Names should fully qualified names in the form "pkg.pkg.pkg.classname".
| |
| doFileNames | back to summary |
|---|---|
| pack-priv boolean doFileNames(Stream<String> filenames) throws IOException Processes a stream of filenames (strings). The strings are in the form pkg/pkg/pkg/classname.class relative to the root of a package hierarchy.
| |
| doJarFile | back to summary |
|---|---|
| pack-priv boolean doJarFile(String jarname) throws IOException Processes all class files in the given jar file.
| |
| doModularFileNames | back to summary |
|---|---|
| pack-priv boolean doModularFileNames(Stream<String> filenames) throws IOException Processes a stream of filenames (strings) including a module prefix. The strings are in the form module/pkg/pkg/pkg/classname.class relative to the root of a directory containing modules. The strings are processed into module-qualified class names of the form "module/pkg.pkg.pkg.classname".
| |
| main | back to summary |
|---|---|
| public static void main(String[] args) Calls the main entry point and exits the JVM with an exit status determined by the return status. | |
| printHelp | back to summary |
|---|---|
| private void printHelp(PrintStream out) | |
| processDirectory | back to summary |
|---|---|
| pack-priv boolean processDirectory(String dirname, Collection<String> classNames) throws IOException Processes named class files in the given directory. The directory should be the root of a package hierarchy. If classNames is empty, walks the directory hierarchy to find all classes.
| |
| processJarFile | back to summary |
|---|---|
| pack-priv boolean processJarFile(String jarname, Collection<String> classNames) throws IOException Processes named class files from the given jar file, or all classes if classNames is empty.
| |
| processJdk9 | back to summary |
|---|---|
| pack-priv boolean processJdk9(String jdkHome, Collection<String> classes) throws IOException Processes listed classes given a JDK 9 home. | |
| processOldJdk | back to summary |
|---|---|
| pack-priv boolean processOldJdk(String jdkHome, Collection<String> classNames) throws IOException Processes named class files from rt.jar of a JDK version 7 or 8. If classNames is empty, processes all classes.
| |
| processRelease | back to summary |
|---|---|
| pack-priv boolean processRelease(String release, Collection<String> classes) throws IOException Process classes from a particular JDK release, using only information in this JDK.
| |
| processSelf | back to summary |
|---|---|
| pack-priv boolean processSelf(Collection<String> classes) throws IOException Processes the class files from the currently running JDK, using the jrt: filesystem.
| |
| report | back to summary |
|---|---|
| public void report(Diagnostic<? extends JavaFileObject> diagnostic) Implements javax. Prints the diagnostic to the err stream. Specified by the DiagnosticListener interface.
| |
| require | back to summary |
|---|---|
| pack-priv void require(boolean cond) throws UsageException Convenience method to throw UsageException if a condition is false.
| |
| run | back to summary |
|---|---|
| pack-priv boolean run(String... argArray) Parses arguments and performs the requested processing.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Main. | |
| public static final Main. | |
| public static final Main. | |
| public static final Main. | |
| public static final Main. | |
| public static final Main. | |
| public static final Main. | |
| public static final Main. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Main. | |
| public static Main. |
| CLASSES | back to summary |
|---|---|
| public static final Main. | |
| DIR | back to summary |
|---|---|
| public static final Main. | |
| JAR | back to summary |
|---|---|
| public static final Main. | |
| JDK9 | back to summary |
|---|---|
| public static final Main. | |
| LOAD_CSV | back to summary |
|---|---|
| public static final Main. | |
| OLD_JDK | back to summary |
|---|---|
| public static final Main. | |
| RELEASE | back to summary |
|---|---|
| public static final Main. | |
| SELF | back to summary |
|---|---|
| public static final Main. | |
| LoadMode | back to summary |
|---|---|
| private LoadMode() | |
| valueOf | back to summary |
|---|---|
| public static Main. | |
| values | back to summary |
|---|---|
| public static Main. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Main. | |
| public static final Main. | |
| public static final Main. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Main. | |
| public static Main. |
| ARGS | back to summary |
|---|---|
| public static final Main. | |
| LIST | back to summary |
|---|---|
| public static final Main. | |
| PRINT_CSV | back to summary |
|---|---|
| public static final Main. | |
| ScanMode | back to summary |
|---|---|
| private ScanMode() | |
| valueOf | back to summary |
|---|---|
| public static Main. | |
| values | back to summary |
|---|---|
| public static Main. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UsageException | back to summary |
|---|---|
| pack-priv UsageException() | |