本文整理汇总了Java中com.sun.tools.javac.tree.JCTree.JCAssert类的典型用法代码示例。如果您正苦于以下问题:Java JCAssert类的具体用法?Java JCAssert怎么用?Java JCAssert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JCAssert类属于com.sun.tools.javac.tree.JCTree包,在下文中一共展示了JCAssert类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: diffAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
protected int diffAssert(JCAssert oldT, JCAssert newT, int[] bounds) {
int localPointer = bounds[0];
// cond
int[] condBounds = getBounds(oldT.cond);
copyTo(localPointer, condBounds[0]);
localPointer = diffTree(oldT.cond, newT.cond, condBounds);
// detail
if (oldT.detail != newT.detail) {
if (oldT.detail == null) {
copyTo(localPointer, condBounds[1]);
localPointer = condBounds[1];
printer.print(" : ");
printer.print(newT.detail);
} else {
int[] detailBounds = getBounds(oldT.detail);
if (newT.detail == null) {
copyTo(localPointer, condBounds[1]);
localPointer = detailBounds[1];
} else {
copyTo(localPointer, detailBounds[0]);
localPointer = diffTree(oldT.detail, newT.detail, detailBounds);
}
}
}
copyTo(localPointer, bounds[1]);
return bounds[1];
}
示例2: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert tree) {
aPrint("assert ");
print(tree.cond);
if (tree.detail != null) {
print(" : ");
print(tree.detail);
}
println(";", tree);
}
示例3: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert that) {
try {
print("JCAssert:");
} catch (Exception e) {
}
super.visitAssert(that);
}
示例4: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
try {
print("assert ");
printExpr(tree.cond);
if (tree.detail != null) {
print(" : ");
printExpr(tree.detail);
}
print(";");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
示例5: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
try {
print("assert ");
printExpr(tree.cond);
if (tree.detail != null) {
print(" : ");
printExpr(tree.detail);
}
print(";");
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
示例6: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public void visitAssert(JCAssert tree) {
attribExpr(tree.cond, env, syms.booleanType);
if (tree.detail != null) {
chk.checkNonVoid(tree.detail.pos(), attribExpr(tree.detail, env));
}
result = null;
}
示例7: matchAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
private boolean matchAssert(JCAssert t1, JCAssert t2) {
return treesMatch(t1.cond, t2.cond) && treesMatch(t1.detail, t2.detail);
}
示例8: Assert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public JCAssert Assert(JCExpression cond, JCExpression detail) {
return invoke(Assert, cond, detail);
}
示例9: AJCAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
public AJCAssert(JCAssert ltree) {
super(ltree.cond, ltree.detail);
}
示例10: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert tree) {
printNode(tree);
child("cond", tree.cond);
child("detail", tree.detail);
indent--;
}
示例11: visitAssert
import com.sun.tools.javac.tree.JCTree.JCAssert; //导入依赖的package包/类
@Override public void visitAssert(JCAssert node) {
set(node, new Assert().rawAssertion(toTree(node.getCondition())).rawMessage(toTree(node.getDetail())));
}