本文整理了Java中com.sun.tools.javac.util.List.iterator()
方法的一些代码示例,展示了List.iterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.iterator()
方法的具体详情如下:
包路径:com.sun.tools.javac.util.List
类名称:List
方法名:iterator
暂无
代码示例来源:origin: google/error-prone
@Override
public Description matchSwitch(SwitchTree tree, VisitorState state) {
PeekingIterator<JCTree.JCCase> it =
Iterators.peekingIterator(((JCTree.JCSwitch) tree).cases.iterator());
while (it.hasNext()) {
JCTree.JCCase caseTree = it.next();
代码示例来源:origin: org.projectlombok/lombok-utils
@Override public <T extends JCTree> List<T> copy(List<T> originals) {
List<T> copies = super.copy(originals);
if (originals != null) {
Iterator<T> it1 = originals.iterator();
Iterator<T> it2 = copies.iterator();
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
}
return copies;
}
代码示例来源:origin: org.projectlombok/lombok-utils
@Override public <T extends JCTree> List<T> copy(List<T> originals, Void p) {
List<T> copies = super.copy(originals, p);
if (originals != null) {
Iterator<T> it1 = originals.iterator();
Iterator<T> it2 = copies.iterator();
while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next());
}
return copies;
}
代码示例来源:origin: konsoletyper/teavm-javac
try {
Processor processor = PrintingProcessor.class.newInstance();
processorIterator = List.of(processor).iterator();
} catch (Throwable t) {
AssertionError assertError =
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
try {
Processor processor = PrintingProcessor.class.newInstance();
processorIterator = List.of(processor).iterator();
} catch (Throwable t) {
AssertionError assertError =
代码示例来源:origin: com.google.errorprone/error_prone_core
@Override
public Description matchSwitch(SwitchTree tree, VisitorState state) {
PeekingIterator<JCTree.JCCase> it =
Iterators.peekingIterator(((JCTree.JCSwitch) tree).cases.iterator());
while (it.hasNext()) {
JCTree.JCCase caseTree = it.next();
代码示例来源:origin: sc.fiji/javac
try {
Processor processor = PrintingProcessor.class.newInstance();
processorIterator = List.of(processor).iterator();
} catch (Throwable t) {
AssertionError assertError =
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base
@Override
public void visitTry(JCTry tree) {
print("try");
if (!tree.getResources().isEmpty()) {
print(" ("); //XXX: space should be according to the code style!
for (Iterator<? extends JCTree> it = tree.getResources().iterator(); it.hasNext();) {
JCTree r = it.next();
//XXX: disabling copying of original text, as the ending ';' needs to be removed in some cases.
oldTrees.remove(r);
printPrecedingComments(r, false);
printExpr(r, 0);
printTrailingComments(r, false);
if (it.hasNext()) print(";");
}
print(") "); //XXX: space should be according to the code style!
}
printBlock(tree.body, cs.getOtherBracePlacement(), cs.spaceBeforeTryLeftBrace());
for (List < JCCatch > l = tree.catchers; l.nonEmpty(); l = l.tail)
printStat(l.head);
if (tree.finalizer != null) {
printFinallyBlock(tree.finalizer);
}
}
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
try {
Processor processor = PrintingProcessor.class.newInstance();
processorIterator = List.of(processor).iterator();
} catch (Throwable t) {
AssertionError assertError =
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base
insertHint = oldT.implementing.iterator().next().getStartPosition();
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base
} else {
posHint = oldT.params.iterator().next().getStartPosition();
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base
posHint = oldT.restype != null ? oldT.restype.getStartPosition() : oldT.getStartPosition();
} else {
posHint = oldT.typarams.iterator().next().getStartPosition();
} else {
posHint = oldT.params.iterator().next().getStartPosition();
posHint = oldT.thrown.iterator().next().getStartPosition();
内容来源于网络,如有侵权,请联系作者删除!