public Object[] toArray() { return toArray(new Object[size()]); }
public Object[] toArray() { return toArray(new Object[size()]); }
public Object[] toArray() { return toArray(new Object[size()]); }
public Object[] toArray() { return toArray(new Object[size()]); }
public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends File> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (File f: path) { try { lb.append(f.toURI().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return new URLClassLoader(lb.toArray(new URL[lb.size()]), getClass().getClassLoader()); }
public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends File> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (File f: path) { try { lb.append(f.toURI().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends File> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (File f: path) { try { lb.append(f.toURI().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends File> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (File f: path) { try { lb.append(f.toURI().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
@Override public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends Path> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (Path p: path) { try { lb.append(p.toUri().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
@Override public ClassLoader getClassLoader(Location location) { nullCheck(location); Iterable<? extends Path> path = getLocation(location); if (path == null) return null; ListBuffer<URL> lb = new ListBuffer<URL>(); for (Path p: path) { try { lb.append(p.toUri().toURL()); } catch (MalformedURLException e) { throw new AssertionError(e); } } return getClassLoader(lb.toArray(new URL[lb.size()])); }
private Attribute.Compound[] unpackContained(Attribute.Compound container) { // Pack them in an array Attribute[] contained0 = null; if (container != null) contained0 = unpackAttributes(container); ListBuffer<Attribute.Compound> compounds = new ListBuffer<>(); if (contained0 != null) { for (Attribute a : contained0) if (a instanceof Attribute.Compound) compounds = compounds.append((Attribute.Compound)a); } return compounds.toArray(new Attribute.Compound[compounds.size()]); }
private Attribute.Compound[] unpackContained(Attribute.Compound container) { // Pack them in an array Attribute[] contained0 = null; if (container != null) contained0 = unpackAttributes(container); ListBuffer<Attribute.Compound> compounds = new ListBuffer<>(); if (contained0 != null) { for (Attribute a : contained0) if (a instanceof Attribute.Compound) compounds = compounds.append((Attribute.Compound)a); } return compounds.toArray(new Attribute.Compound[compounds.size()]); }
/** * 处理循环 * * @param stat 循环 * @return 返回处理后的循环 */ private JCTree.JCStatement doLoop(JCTree.JCStatement stat) { if (stat instanceof JCTree.JCBlock) { JCTree.JCBlock block = (JCTree.JCBlock) stat; doBlock(block); stat = block; } else { ListBuffer<JCTree.JCStatement> stats = visitReturn(stat); stat = treeMaker.Block(stats.size(), stats.toList()); } return stat; }
boolean merge(ListBuffer<JCLiteral> litBuf, ListBuffer<JCExpression> opStack) { if (litBuf.isEmpty()) { return false; } else if (litBuf.size() == 1) { opStack.prepend(litBuf.first()); return false; } else { StringBuilder sb = new StringBuilder(); for (JCLiteral lit : litBuf) { sb.append(lit.getValue()); } JCExpression t = F.at(litBuf.first().getStartPosition()).Literal(TypeTag.CLASS, sb.toString()); storeEnd(t, litBuf.last().getEndPosition(endPosTable)); opStack.prepend(t); return true; } }
List<T> buf = List.<T>nil(); for (ListBuffer<T> lb : annotated.values()) { if (lb.size() == 1) { buf = buf.prepend(lb.first()); } else { // repeated
List<T> buf = List.<T>nil(); for (ListBuffer<T> lb : annotated.values()) { if (lb.size() == 1) { buf = buf.prepend(lb.first()); } else { // repeated
} else if (abstracts.size() == 1) { return new FunctionDescriptor(abstracts.first()); } else { // size > 1
} else if (abstracts.size() == 1) { return new FunctionDescriptor(abstracts.first()); } else { // size > 1