static com.sun.tools.javac.util.List<JCStatement> inlineStatementList( Iterable<? extends UStatement> statements, Inliner inliner) throws CouldNotResolveImportException { ListBuffer<JCStatement> buffer = new ListBuffer<>(); for (UStatement statement : statements) { buffer.appendList(statement.inlineStatements(inliner)); } return buffer.toList(); }
/** Append all elements in a list to buffer. */ public ListBuffer<A> appendList(ListBuffer<A> xs) { return appendList(xs.toList()); }
/** * Add all included classes (including Exceptions and Errors) * and interfaces. */ public void addAllClassesTo(ListBuffer<ClassDocImpl> list) { list.appendList(getClasses(true)); }
/** Append all elements in a list to buffer. */ public ListBuffer<A> appendList(ListBuffer<A> xs) { return appendList(xs.toList()); }
/** Append all elements in a list to buffer. */ public ListBuffer<A> appendList(ListBuffer<A> xs) { return appendList(xs.toList()); }
/** Append all elements in a list to buffer. */ public ListBuffer<A> appendList(ListBuffer<A> xs) { return appendList(xs.toList()); }
/** get all bounds of a given kind */ public List<Type> getBounds(InferenceBound... ibs) { ListBuffer<Type> buf = new ListBuffer<>(); for (InferenceBound ib : ibs) { buf.appendList(bounds.get(ib)); } return buf.toList(); }
/** get all bounds of a given kind */ public List<Type> getBounds(InferenceBound... ibs) { ListBuffer<Type> buf = new ListBuffer<>(); for (InferenceBound ib : ibs) { buf.appendList(bounds.get(ib)); } return buf.toList(); }
private void handleFlowResults(List<Env<AttrContext>> list, ListBuffer<Element> elems) { for (Env<AttrContext> env: list) { switch (env.tree.tag) { case JCTree.CLASSDEF: JCClassDecl cdef = (JCClassDecl) env.tree; if (cdef.sym != null) elems.append(cdef.sym); break; case JCTree.TOPLEVEL: JCCompilationUnit unit = (JCCompilationUnit) env.tree; if (unit.packge != null) elems.append(unit.packge); break; } } genList.appendList(list); }
static com.sun.tools.javac.util.List<JCStatement> inlineStatementList( Iterable<? extends UStatement> statements, Inliner inliner) throws CouldNotResolveImportException { ListBuffer<JCStatement> buffer = new ListBuffer<>(); for (UStatement statement : statements) { buffer.appendList(statement.inlineStatements(inliner)); } return buffer.toList(); }
for (Node n : nodes) { Assert.check(n.data.length() == 1, "Attempt to merge a compound node!"); data.appendList(n.data); for (DependencyKind dk : DependencyKind.values()) { addDependencies(dk, n.getDependencies(dk));
final List<Type> freeVarsIn(List<Type> ts) { ListBuffer<Type> buf = new ListBuffer<>(); for (Type t : ts) { buf.appendList(freeVarsIn(t)); } ListBuffer<Type> buf2 = new ListBuffer<>(); for (Type t : buf) { if (!buf2.contains(t)) { buf2.add(t); } } return buf2.toList(); }
final List<Type> freeVarsIn(List<Type> ts) { ListBuffer<Type> buf = new ListBuffer<>(); for (Type t : ts) { buf.appendList(freeVarsIn(t)); } ListBuffer<Type> buf2 = new ListBuffer<>(); for (Type t : buf) { if (!buf2.contains(t)) { buf2.add(t); } } return buf2.toList(); }
/** ClassBody = "{" {ClassBodyDeclaration} "}" * InterfaceBody = "{" {InterfaceBodyDeclaration} "}" */ List<JCTree> classOrInterfaceBody(Name className, boolean isInterface) { accept(LBRACE); if (token.pos <= endPosTable.errorEndPos) { // error recovery skip(false, true, false, false); if (token.kind == LBRACE) nextToken(); } ListBuffer<JCTree> defs = new ListBuffer<JCTree>(); while (token.kind != RBRACE && token.kind != EOF) { defs.appendList(classOrInterfaceBodyDeclaration(className, isInterface)); if (token.pos <= endPosTable.errorEndPos) { // error recovery skip(false, true, true, false); } } accept(RBRACE); return defs.toList(); }
/** ClassBody = "{" {ClassBodyDeclaration} "}" * InterfaceBody = "{" {InterfaceBodyDeclaration} "}" */ List<JCTree> classOrInterfaceBody(Name className, boolean isInterface) { accept(LBRACE); if (token.pos <= endPosTable.errorEndPos) { // error recovery skip(false, true, false, false); if (token.kind == LBRACE) nextToken(); } ListBuffer<JCTree> defs = new ListBuffer<JCTree>(); while (token.kind != RBRACE && token.kind != EOF) { defs.appendList(classOrInterfaceBodyDeclaration(className, isInterface)); if (token.pos <= endPosTable.errorEndPos) { // error recovery skip(false, true, true, false); } } accept(RBRACE); return defs.toList(); }
/** * Return the minimum types of a closure, suitable for computing * compoundMin or glb. */ private List<Type> closureMin(List<Type> cl) { ListBuffer<Type> classes = new ListBuffer<>(); ListBuffer<Type> interfaces = new ListBuffer<>(); while (!cl.isEmpty()) { Type current = cl.head; if (current.isInterface()) interfaces.append(current); else classes.append(current); ListBuffer<Type> candidates = new ListBuffer<>(); for (Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) candidates.append(t); } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
/** * Return the minimum types of a closure, suitable for computing * compoundMin or glb. */ private List<Type> closureMin(List<Type> cl) { ListBuffer<Type> classes = lb(); ListBuffer<Type> interfaces = lb(); while (!cl.isEmpty()) { Type current = cl.head; if (current.isInterface()) interfaces.append(current); else classes.append(current); ListBuffer<Type> candidates = lb(); for (Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) candidates.append(t); } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
/** * Return the minimum types of a closure, suitable for computing * compoundMin or glb. */ private List<Type> closureMin(List<Type> cl) { ListBuffer<Type> classes = lb(); ListBuffer<Type> interfaces = lb(); while (!cl.isEmpty()) { Type current = cl.head; if (current.isInterface()) interfaces.append(current); else classes.append(current); ListBuffer<Type> candidates = lb(); for (Type t : cl.tail) { if (!isSubtypeNoCapture(current, t)) candidates.append(t); } cl = candidates.toList(); } return classes.appendList(interfaces).toList(); }
/** ClassBody = "{" {ClassBodyDeclaration} "}" * InterfaceBody = "{" {InterfaceBodyDeclaration} "}" */ List<JCTree> classOrInterfaceBody(Name className, boolean isInterface) { accept(LBRACE); if (S.pos() <= errorEndPos) { // error recovery skip(false, true, false, false); if (S.token() == LBRACE) S.nextToken(); } ListBuffer<JCTree> defs = new ListBuffer<JCTree>(); while (S.token() != RBRACE && S.token() != EOF) { defs.appendList(classOrInterfaceBodyDeclaration(className, isInterface)); if (S.pos() <= errorEndPos) { // error recovery skip(false, true, true, false); } } accept(RBRACE); return defs.toList(); }
/** ClassBody = "{" {ClassBodyDeclaration} "}" * InterfaceBody = "{" {InterfaceBodyDeclaration} "}" */ List<JCTree> classOrInterfaceBody(Name className, boolean isInterface) { accept(LBRACE); if (S.pos() <= errorEndPos) { // error recovery skip(false, true, false, false); if (S.token() == LBRACE) S.nextToken(); } ListBuffer<JCTree> defs = new ListBuffer<JCTree>(); while (S.token() != RBRACE && S.token() != EOF) { defs.appendList(classOrInterfaceBodyDeclaration(className, isInterface)); if (S.pos() <= errorEndPos) { // error recovery skip(false, true, true, false); } } accept(RBRACE); return defs.toList(); }