当前位置: 首页>>代码示例>>Java>>正文


Java JCDoWhileLoop类代码示例

本文整理汇总了Java中com.sun.tools.javac.tree.JCTree.JCDoWhileLoop的典型用法代码示例。如果您正苦于以下问题:Java JCDoWhileLoop类的具体用法?Java JCDoWhileLoop怎么用?Java JCDoWhileLoop使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JCDoWhileLoop类属于com.sun.tools.javac.tree.JCTree包,在下文中一共展示了JCDoWhileLoop类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: diffDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
protected int diffDoLoop(JCDoWhileLoop oldT, JCDoWhileLoop newT, int[] bounds) {
    int localPointer = bounds[0];

    int[] bodyBounds = new int[] { localPointer, endPos(oldT.body) };
    int oldIndent = newT.body.hasTag(Tag.BLOCK) ? -1 : printer.indent();
    localPointer = diffTree(oldT.body, newT.body, bodyBounds, oldT.getKind());
    if (!newT.body.hasTag(Tag.BLOCK))
        printer.undent(oldIndent);
    int[] condBounds = getBounds(oldT.cond);
    if (oldT.body.getKind() != Kind.BLOCK && newT.body.getKind() == Kind.BLOCK) {
        moveBackToToken(tokenSequence, condBounds[0], JavaTokenId.WHILE);
        localPointer = tokenSequence.offset();
    } else {
        copyTo(localPointer, condBounds[0]);
        localPointer = diffTree(oldT.cond, newT.cond, condBounds);
    }
    copyTo(localPointer, bounds[1]);

    return bounds[1];
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:21,代码来源:CasualDiff.java

示例2: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override public void visitDoLoop(JCDoWhileLoop tree) {
	aPrint("do ");
	if (tree.body instanceof JCBlock) {
		println("{");
		indent++;
		print(((JCBlock) tree.body).stats, "");
		indent--;
		aPrint("}");
		
	} else print(tree.body);
	print(" while ");
	if (tree.cond instanceof JCParens) {
		print(tree.cond);
	} else {
		print("(");
		print(tree.cond);
		print(")");
	}
	println(";", tree);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:21,代码来源:PrettyPrinter.java

示例3: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public void visitDoLoop(JCDoWhileLoop tree) {
	try {
		print("do ");
		printStat(tree.body);
		align();
		print(" while ");
		if (PARENS.equals(treeTag(tree.cond))) {
			printExpr(tree.cond);
		} else {
			print("(");
			printExpr(tree.cond);
			print(")");
		}
		print(";");
	} catch (IOException e) {
		throw new UncheckedIOException(e);
	}
}
 
开发者ID:mobmead,项目名称:EasyMPermission,代码行数:19,代码来源:PrettyCommentsPrinter.java

示例4: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public void visitDoLoop(JCDoWhileLoop tree) {
    try {
        print("do ");
        printStat(tree.body);
        align();
        print(" while ");
        if (tree.cond.getTag() == JCTree.PARENS) {
            printExpr(tree.cond);
        } else {
            print("(");
            printExpr(tree.cond);
            print(")");
        }
        print(";");
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:sebastianoe,项目名称:s4j,代码行数:19,代码来源:Pretty.java

示例5: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public void visitDoLoop(JCDoWhileLoop tree) {
    try {
        print("do ");
        printStat(tree.body);
        align();
        print(" while ");
        if (getTag(tree.cond) == PARENS) {
            printExpr(tree.cond);
        } else {
            print("(");
            printExpr(tree.cond);
            print(")");
        }
        print(";");
    } catch (IOException e) {
        throw new UncheckedIOException(e);
    }
}
 
开发者ID:redundent,项目名称:lombok,代码行数:19,代码来源:PrettyCommentsPrinter.java

示例6: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public void visitDoLoop(JCDoWhileLoop that) {
    try {
        print("JCDoWhileLoop:");
    } catch (Exception e) {
    }
    super.visitDoLoop(that);
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:8,代码来源:PrintAstVisitor.java

示例7: visitDoWhileLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override
public Choice<State<JCDoWhileLoop>> visitDoWhileLoop(final DoWhileLoopTree node, State<?> state) {
  return chooseSubtrees(
      state,
      s -> unifyStatement(node.getStatement(), s),
      s -> unifyExpression(node.getCondition(), s),
      maker()::DoLoop);
}
 
开发者ID:google,项目名称:error-prone,代码行数:9,代码来源:PlaceholderUnificationVisitor.java

示例8: matchDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
private boolean matchDoLoop(JCDoWhileLoop t1, JCDoWhileLoop t2) {
    return treesMatch(t1.cond, t2.cond) && treesMatch(t1.body, t2.body);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CasualDiff.java

示例9: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override
public void visitDoLoop(JCDoWhileLoop tree) {
    //skip body (to prevents same statements to be analyzed twice)
    scan(tree.getCondition());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:Analyzer.java

示例10: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override
public void visitDoLoop(JCDoWhileLoop tree) {
    scan(tree.getCondition());
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:5,代码来源:Analyzer.java

示例11: DoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public JCDoWhileLoop DoLoop(JCStatement body, JCExpression cond) {
	return invoke(DoLoop, body, cond);
}
 
开发者ID:git03394538,项目名称:lombok-ianchiu,代码行数:4,代码来源:JavacTreeMaker.java

示例12: AJCDoWhileLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
public AJCDoWhileLoop(JCDoWhileLoop ltree) {
    super(ltree.body, ltree.cond);
}
 
开发者ID:pcgomes,项目名称:javaparser2jctree,代码行数:4,代码来源:AJCDoWhileLoop.java

示例13: inline

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override
public JCDoWhileLoop inline(Inliner inliner) throws CouldNotResolveImportException {
  return inliner.maker().DoLoop(getStatement().inline(inliner), getCondition().inline(inliner));
}
 
开发者ID:sivakumar-kailasam,项目名称:refactor-faster,代码行数:5,代码来源:UDoWhileLoop.java

示例14: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override public void visitDoLoop(JCDoWhileLoop tree) {
	printNode(tree);
	child("body", tree.body);
	child("cond", tree.cond);
	indent--;
}
 
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:7,代码来源:JcTreePrinter.java

示例15: visitDoLoop

import com.sun.tools.javac.tree.JCTree.JCDoWhileLoop; //导入依赖的package包/类
@Override public void visitDoLoop(JCDoWhileLoop node) {
	DoWhile dw = new DoWhile();
	JCExpression cond = node.getCondition();
	setConversionPositionInfo(dw, "()", getPosition(cond));
	set(node, dw.rawCondition(toTree(removeParens(cond))).rawStatement(toTree(node.getStatement())));
}
 
开发者ID:evant,项目名称:android-retrolambda-lombok,代码行数:7,代码来源:JcTreeConverter.java


注:本文中的com.sun.tools.javac.tree.JCTree.JCDoWhileLoop类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。