/** Visitor method: enter classes of a list of trees, returning a list of types. */ <T extends JCTree> List<Type> classEnter(List<T> trees, Env<AttrContext> env) { ListBuffer<Type> ts = new ListBuffer<Type>(); for (List<T> l = trees; l.nonEmpty(); l = l.tail) { Type t = classEnter(l.head, env); if (t != null) ts.append(t); } return ts.toList(); }
/** Visitor method: enter classes of a list of trees, returning a list of types. */ <T extends JCTree> List<Type> classEnter(List<T> trees, Env<AttrContext> env) { ListBuffer<Type> ts = new ListBuffer<Type>(); for (List<T> l = trees; l.nonEmpty(); l = l.tail) ts.append(classEnter(l.head, env)); return ts.toList(); }
/** Visitor method: enter classes of a list of trees, returning a list of types. */ <T extends JCTree> List<Type> classEnter(List<T> trees, Env<AttrContext> env) { ListBuffer<Type> ts = new ListBuffer<Type>(); for (List<T> l = trees; l.nonEmpty(); l = l.tail) { Type t = classEnter(l.head, env); if (t != null) ts.append(t); } return ts.toList(); }
/** Visitor method: enter classes of a list of trees, returning a list of types. */ <T extends JCTree> List<Type> classEnter(List<T> trees, Env<AttrContext> env) { ListBuffer<Type> ts = new ListBuffer<Type>(); for (List<T> l = trees; l.nonEmpty(); l = l.tail) { Type t = classEnter(l.head, env); if (t != null) ts.append(t); } return ts.toList(); }
public void visitClassDef(JCClassDecl tree) { // Local classes have not been entered yet, so we need to do it now: if ((env.info.scope.owner.kind & (VAR | MTH)) != 0) enter.classEnter(tree, env); ClassSymbol c = tree.sym; if (c == null) { // exit in case something drastic went wrong during enter. result = null; } else { // make sure class has been completed: c.complete(); // If this class appears as an anonymous class // in a superclass constructor call where // no explicit outer instance is given, // disable implicit outer instance from being passed. // (This would be an illegal access to "this before super"). if (env.info.isSelfCall && env.tree.tag == JCTree.NEWCLASS && ((JCNewClass) env.tree).encl == null) { c.flags_field |= NOOUTERTHIS; } attribClass(tree.pos(), c); result = tree.type = c.type; } }
enter.classEnter(tree, env); } else { enter.classEnter(tree, env);
public void visitClassDef(JCClassDecl tree) { // Local classes have not been entered yet, so we need to do it now: if ((env.info.scope.owner.kind & (VAR | MTH)) != 0) enter.classEnter(tree, env); ClassSymbol c = tree.sym; if (c == null) { // exit in case something drastic went wrong during enter. result = null; } else { // make sure class has been completed: c.complete(); // If this class appears as an anonymous class // in a superclass constructor call where // no explicit outer instance is given, // disable implicit outer instance from being passed. // (This would be an illegal access to "this before super"). if (env.info.isSelfCall && env.tree.hasTag(NEWCLASS) && ((JCNewClass) env.tree).encl == null) { c.flags_field |= NOOUTERTHIS; } attribClass(tree.pos(), c); result = tree.type = c.type; } }
public void visitClassDef(JCClassDecl tree) { // Local classes have not been entered yet, so we need to do it now: if ((env.info.scope.owner.kind & (VAR | MTH)) != 0) enter.classEnter(tree, env); ClassSymbol c = tree.sym; if (c == null) { // exit in case something drastic went wrong during enter. result = null; } else { // make sure class has been completed: c.complete(); // If this class appears as an anonymous class // in a superclass constructor call where // no explicit outer instance is given, // disable implicit outer instance from being passed. // (This would be an illegal access to "this before super"). if (env.info.isSelfCall && env.tree.getTag() == JCTree.NEWCLASS && ((JCNewClass) env.tree).encl == null) { c.flags_field |= NOOUTERTHIS; } attribClass(tree.pos(), c); result = tree.type = c.type; } }
classEnter(tree.defs, env); if (addEnv) { todo.append(env);
tree.packge.package_info = c; classEnter(tree.defs, env); if (addEnv) { todo.append(env);
classEnter(trees, null);
classEnter(trees, null);
tree.packge.package_info = c; classEnter(tree.defs, topEnv); if (addEnv) { todo.append(topEnv);
classEnter(trees, null);
classEnter(trees, null);
List<Type> tvars = enter.classEnter(typarams, env); attr.attribTypeVariables(typarams, env);
List<Type> tvars = enter.classEnter(typarams, env); attr.attribTypeVariables(typarams, env);
List<Type> tvars = enter.classEnter(typarams, env); attr.attribTypeVariables(typarams, env);
List<Type> tvars = enter.classEnter(typarams, env); attr.attribTypeVariables(typarams, env);
tree.packge.package_info = c; classEnter(tree.defs, topEnv); if (addEnv) { todo.append(topEnv);