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]; }
@Override public void visitAssert(JCAssert tree) { aPrint("assert "); print(tree.cond); if (tree.detail != null) { print(" : "); print(tree.detail); } println(";", tree); }
public void visitAssert(JCAssert that) { try { print("JCAssert:"); } catch (Exception e) { } super.visitAssert(that); }
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); } }
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; }
private boolean matchAssert(JCAssert t1, JCAssert t2) { return treesMatch(t1.cond, t2.cond) && treesMatch(t1.detail, t2.detail); }
public JCAssert Assert(JCExpression cond, JCExpression detail) { return invoke(Assert, cond, detail); }
public AJCAssert(JCAssert ltree) { super(ltree.cond, ltree.detail); }
public AJCAssert(JCAssert ltree, String lcomment) { this(ltree); setComment(lcomment); }
@Override public void visitAssert(JCAssert tree) { printNode(tree); child("cond", tree.cond); child("detail", tree.detail); indent--; }
@Override public void visitAssert(JCAssert node) { set(node, new Assert().rawAssertion(toTree(node.getCondition())).rawMessage(toTree(node.getDetail()))); }