< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java

Print this page




4427                 chk.checkFunctionalInterface((JCClassDecl) env.tree, c);
4428                 chk.checkLeaksNotAccessible(env, (JCClassDecl) env.tree);
4429             } finally {
4430                 env.info.returnResult = prevReturnRes;
4431                 log.useSource(prev);
4432                 chk.setLint(prevLint);
4433             }
4434 
4435         }
4436     }
4437 
4438     public void visitImport(JCImport tree) {
4439         // nothing to do
4440     }
4441 
4442     public void visitModuleDef(JCModuleDecl tree) {
4443         tree.sym.completeUsesProvides();
4444         ModuleSymbol msym = tree.sym;
4445         Lint lint = env.outer.info.lint = env.outer.info.lint.augment(msym);
4446         Lint prevLint = chk.setLint(lint);
4447 
4448         chk.checkDeprecatedAnnotation(tree, msym);
4449 
4450         try {
4451             deferredLintHandler.flush(tree.pos());
4452         } finally {
4453             chk.setLint(prevLint);
4454         }
4455     }
4456 
4457     /** Finish the attribution of a class. */
4458     private void attribClassBody(Env<AttrContext> env, ClassSymbol c) {
4459         JCClassDecl tree = (JCClassDecl)env.tree;
4460         Assert.check(c == tree.sym);
4461 
4462         // Validate type parameters, supertype and interfaces.
4463         attribStats(tree.typarams, env);
4464         if (!c.isAnonymous()) {
4465             //already checked if anonymous
4466             chk.validate(tree.typarams, env);
4467             chk.validate(tree.extending, env);




4427                 chk.checkFunctionalInterface((JCClassDecl) env.tree, c);
4428                 chk.checkLeaksNotAccessible(env, (JCClassDecl) env.tree);
4429             } finally {
4430                 env.info.returnResult = prevReturnRes;
4431                 log.useSource(prev);
4432                 chk.setLint(prevLint);
4433             }
4434 
4435         }
4436     }
4437 
4438     public void visitImport(JCImport tree) {
4439         // nothing to do
4440     }
4441 
4442     public void visitModuleDef(JCModuleDecl tree) {
4443         tree.sym.completeUsesProvides();
4444         ModuleSymbol msym = tree.sym;
4445         Lint lint = env.outer.info.lint = env.outer.info.lint.augment(msym);
4446         Lint prevLint = chk.setLint(lint);
4447         chk.checkModuleName(tree);
4448         chk.checkDeprecatedAnnotation(tree, msym);
4449 
4450         try {
4451             deferredLintHandler.flush(tree.pos());
4452         } finally {
4453             chk.setLint(prevLint);
4454         }
4455     }
4456 
4457     /** Finish the attribution of a class. */
4458     private void attribClassBody(Env<AttrContext> env, ClassSymbol c) {
4459         JCClassDecl tree = (JCClassDecl)env.tree;
4460         Assert.check(c == tree.sym);
4461 
4462         // Validate type parameters, supertype and interfaces.
4463         attribStats(tree.typarams, env);
4464         if (!c.isAnonymous()) {
4465             //already checked if anonymous
4466             chk.validate(tree.typarams, env);
4467             chk.validate(tree.extending, env);


< prev index next >