src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 1569
475eb15dfdad
parent 1445
376d6c1b49e5
child 1570
f91144b7da75
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 21 00:45:35 2013 -0500
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Mon Jan 21 01:27:42 2013 -0500
     1.3 @@ -79,6 +79,7 @@
     1.4      private boolean enableSunApiLintControl;
     1.5      private final TreeInfo treeinfo;
     1.6      private final JavaFileManager fileManager;
     1.7 +    private final Profile profile;
     1.8  
     1.9      // The set of lint options currently in effect. It is initialized
    1.10      // from the context, and then is set/reset as needed by Attr as it
    1.11 @@ -106,7 +107,7 @@
    1.12          enter = Enter.instance(context);
    1.13          deferredAttr = DeferredAttr.instance(context);
    1.14          infer = Infer.instance(context);
    1.15 -        this.types = Types.instance(context);
    1.16 +        types = Types.instance(context);
    1.17          diags = JCDiagnostic.Factory.instance(context);
    1.18          Options options = Options.instance(context);
    1.19          lint = Lint.instance(context);
    1.20 @@ -129,6 +130,8 @@
    1.21          Target target = Target.instance(context);
    1.22          syntheticNameChar = target.syntheticNameChar();
    1.23  
    1.24 +        profile = Profile.instance(context);
    1.25 +
    1.26          boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
    1.27          boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
    1.28          boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
    1.29 @@ -3006,6 +3009,12 @@
    1.30          }
    1.31      }
    1.32  
    1.33 +    void checkProfile(final DiagnosticPosition pos, final Symbol s) {
    1.34 +        if (profile != Profile.DEFAULT && (s.flags() & NOT_IN_PROFILE) != 0) {
    1.35 +            log.error(pos, "not.in.profile", s, profile);
    1.36 +        }
    1.37 +    }
    1.38 +
    1.39  /* *************************************************************************
    1.40   * Check for recursive annotation elements.
    1.41   **************************************************************************/

mercurial