< prev index next >

langtools/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Profile.java

Print this page

        

@@ -37,26 +37,32 @@
 
 /**
  * Build the profile information.
  */
 enum Profile {
-    COMPACT1("compact1", 1, "java.compact1"),
-    COMPACT2("compact2", 2, "java.compact2"),
-    COMPACT3("compact3", 3, "java.compact3", "java.smartcardio", "jdk.sctp",
-                            "jdk.httpserver", "jdk.security.auth",
-                            "jdk.naming.dns", "jdk.naming.rmi",
-                            "jdk.management"),
-    // need a way to determine JRE modules
-    SE_JRE("Java SE JRE", 4, "java.se", "jdk.charsets",
-                            "jdk.crypto.ec", "jdk.crypto.pkcs11",
-                            "jdk.crypto.mscapi", "jdk.crypto.ucrypto",
-                            "jdk.localedata", "jdk.scripting.nashorn", "jdk.zipfs"),
-    FULL_JRE("Full JRE", 5, "java.se.ee", "jdk.charsets",
-                            "jdk.crypto.ec", "jdk.crypto.pkcs11",
-                            "jdk.crypto.mscapi", "jdk.crypto.ucrypto", "jdk.jvmstat",
-                            "jdk.localedata", "jdk.scripting.nashorn",
-                            "jdk.unsupported", "jdk.zipfs");
+    COMPACT1("compact1", 1, "java.logging",
+                            "java.scripting"),
+    COMPACT2("compact2", 2, "java.rmi",
+                            "java.sql",
+                            "java.xml",
+                            "jdk.xml.dom",
+                            "jdk.httpserver"),
+    COMPACT3("compact3", 3, "java.smartcardio",
+                            "java.compiler",
+                            "java.instrument",
+                            "java.management",
+                            "java.naming",
+                            "java.prefs",
+                            "java.security.jgss",
+                            "java.security.sasl",
+                            "java.sql.rowset",
+                            "java.xml.crypto",
+                            "jdk.management",
+                            "jdk.naming.dns",
+                            "jdk.naming.rmi",
+                            "jdk.sctp",
+                            "jdk.security.auth");
 
     final String name;
     final int profile;
     final String[] mnames;
     final Map<String, Module> modules = new HashMap<>();

@@ -78,16 +84,10 @@
 
     public static int getProfileCount() {
         return JDK.isEmpty() ? 0 : Profile.values().length;
     }
 
-    Optional<Module> findModule(String name) {
-        return modules.containsKey(name)
-            ? Optional.of(modules.get(name))
-            : Optional.empty();
-    }
-
     /**
      * Returns the Profile for the given package name; null if not found.
      */
     public static Profile getProfile(String pn) {
         for (Profile p : Profile.values()) {

@@ -135,10 +135,13 @@
               .forEach(m -> modules.put(m.name(), m));
     }
 
     // for debugging
     public static void main(String[] args) throws IOException {
+        // initialize Profiles
+        new JdepsConfiguration.Builder().allModules().build();
+
         // find platform modules
         if (Profile.getProfileCount() == 0) {
             System.err.println("No profile is present in this JDK");
         }
         for (Profile p : Profile.values()) {
< prev index next >