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

changeset 1603
6118072811e5
parent 1588
2620c953e9fe
parent 1571
af8417e590f4
child 1607
bd49e0304281
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Feb 21 12:23:27 2013 -0800
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Feb 21 17:49:56 2013 -0800
     1.3 @@ -80,6 +80,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 @@ -110,7 +111,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 @@ -133,6 +134,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 @@ -3068,6 +3071,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