< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/jdeprscan/Main.java

Print this page




  63 import com.sun.tools.javac.file.JavacFileManager;
  64 import com.sun.tools.javac.platform.JDKPlatformProvider;
  65 
  66 import com.sun.tools.jdeprscan.scan.Scan;
  67 
  68 import static java.util.stream.Collectors.*;
  69 
  70 import javax.lang.model.element.PackageElement;
  71 import javax.lang.model.element.TypeElement;
  72 
  73 /**
  74  * Deprecation Scanner tool. Loads API deprecation information from the
  75  * JDK image, or optionally, from a jar file or class hierarchy. Then scans
  76  * a class library for usages of those APIs.
  77  *
  78  * TODO:
  79  *  - audit error handling throughout, but mainly in scan package
  80  *  - handling of covariant overrides
  81  *  - handling of override of method found in multiple superinterfaces
  82  *  - convert type/method/field output to Java source like syntax, e.g.
  83  *      instead of java/lang/Runtime.runFinalizersOnExit(Z)V
  84  *      print void java.lang.Runtime.runFinalizersOnExit(boolean)
  85  *  - more example output in man page
  86  *  - more rigorous GNU style option parsing; use joptsimple?
  87  *
  88  * FUTURES:
  89  *  - add module support: --add-modules, --module-path, module arg
  90  *  - load deprecation declarations from a designated class library instead
  91  *    of the JDK
  92  *  - load deprecation declarations from a module
  93  *  - scan a module (but a modular jar can be treated just a like an ordinary jar)
  94  *  - multi-version jar
  95  */
  96 public class Main implements DiagnosticListener<JavaFileObject> {
  97     final PrintStream out;
  98     final PrintStream err;
  99     final List<File> bootClassPath = new ArrayList<>();
 100     final List<File> classPath = new ArrayList<>();
 101     final List<File> systemModules = new ArrayList<>();
 102     final List<String> options = new ArrayList<>();
 103     final List<String> comments = new ArrayList<>();
 104 




  63 import com.sun.tools.javac.file.JavacFileManager;
  64 import com.sun.tools.javac.platform.JDKPlatformProvider;
  65 
  66 import com.sun.tools.jdeprscan.scan.Scan;
  67 
  68 import static java.util.stream.Collectors.*;
  69 
  70 import javax.lang.model.element.PackageElement;
  71 import javax.lang.model.element.TypeElement;
  72 
  73 /**
  74  * Deprecation Scanner tool. Loads API deprecation information from the
  75  * JDK image, or optionally, from a jar file or class hierarchy. Then scans
  76  * a class library for usages of those APIs.
  77  *
  78  * TODO:
  79  *  - audit error handling throughout, but mainly in scan package
  80  *  - handling of covariant overrides
  81  *  - handling of override of method found in multiple superinterfaces
  82  *  - convert type/method/field output to Java source like syntax, e.g.
  83  *      instead of java/lang/Character.isJavaLetter(C)Z
  84  *      print void java.lang.Character.isJavaLetter(char)boolean
  85  *  - more example output in man page
  86  *  - more rigorous GNU style option parsing; use joptsimple?
  87  *
  88  * FUTURES:
  89  *  - add module support: --add-modules, --module-path, module arg
  90  *  - load deprecation declarations from a designated class library instead
  91  *    of the JDK
  92  *  - load deprecation declarations from a module
  93  *  - scan a module (but a modular jar can be treated just a like an ordinary jar)
  94  *  - multi-version jar
  95  */
  96 public class Main implements DiagnosticListener<JavaFileObject> {
  97     final PrintStream out;
  98     final PrintStream err;
  99     final List<File> bootClassPath = new ArrayList<>();
 100     final List<File> classPath = new ArrayList<>();
 101     final List<File> systemModules = new ArrayList<>();
 102     final List<String> options = new ArrayList<>();
 103     final List<String> comments = new ArrayList<>();
 104 


< prev index next >