1.1 --- a/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java Wed Aug 25 11:24:30 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java Wed Aug 25 11:40:25 2010 -0700 1.3 @@ -160,6 +160,7 @@ 1.4 XMAXERRS, 1.5 XMAXWARNS, 1.6 XSTDOUT, 1.7 + XPKGINFO, 1.8 XPRINT, 1.9 XPRINTROUNDS, 1.10 XPRINTPROCESSORINFO, 1.11 @@ -217,6 +218,7 @@ 1.12 XMAXERRS, 1.13 XMAXWARNS, 1.14 // XSTDOUT, 1.15 + XPKGINFO, 1.16 XPRINT, 1.17 XPRINTROUNDS, 1.18 XPRINTPROCESSORINFO, 1.19 @@ -532,6 +534,9 @@ 1.20 new XOption(XPREFER, "opt.prefer", 1.21 Option.ChoiceKind.ONEOF, "source", "newer"), 1.22 1.23 + new XOption(XPKGINFO, "opt.pkginfo", 1.24 + Option.ChoiceKind.ONEOF, "always", "legacy", "nonempty"), 1.25 + 1.26 /* -O is a no-op, accepted for backward compatibility. */ 1.27 new HiddenOption(O), 1.28 1.29 @@ -598,6 +603,16 @@ 1.30 }; 1.31 } 1.32 1.33 + public enum PkgInfo { 1.34 + ALWAYS, LEGACY, NONEMPTY; 1.35 + public static PkgInfo get(Options options) { 1.36 + String v = options.get(XPKGINFO); 1.37 + return (v == null 1.38 + ? PkgInfo.LEGACY 1.39 + : PkgInfo.valueOf(v.toUpperCase())); 1.40 + } 1.41 + } 1.42 + 1.43 private static Map<String,Boolean> getXLintChoices() { 1.44 Map<String,Boolean> choices = new LinkedHashMap<String,Boolean>(); 1.45 choices.put("all", false);