protected int diffSynchronized(JCSynchronized oldT, JCSynchronized newT, int[] bounds) { int localPointer = bounds[0]; // lock int[] lockBounds = getBounds(oldT.lock); copyTo(localPointer, lockBounds[0]); localPointer = diffTree(oldT.lock, newT.lock, lockBounds); // body int[] bodyBounds = getBounds(oldT.body); copyTo(localPointer, bodyBounds[0]); int oldIndent = newT.body.hasTag(Tag.BLOCK) ? -1 : printer.indent(); localPointer = diffTree(oldT.body, newT.body, bodyBounds); if (!newT.body.hasTag(Tag.BLOCK)) printer.undent(oldIndent); copyTo(localPointer, bounds[1]); return bounds[1]; }
public void visitSynchronized(JCSynchronized tree) { try { print("synchronized "); if (PARENS.equals(treeTag(tree.lock))) { printExpr(tree.lock); } else { print("("); printExpr(tree.lock); print(")"); } print(" "); printStat(tree.body); } catch (IOException e) { throw new UncheckedIOException(e); } }
public void visitSynchronized(JCSynchronized tree) { try { print("synchronized "); if (tree.lock.getTag() == JCTree.PARENS) { printExpr(tree.lock); } else { print("("); printExpr(tree.lock); print(")"); } print(" "); printStat(tree.body); } catch (IOException e) { throw new UncheckedIOException(e); } }
public void visitSynchronized(JCSynchronized tree) { try { print("synchronized "); if (getTag(tree.lock) == PARENS) { printExpr(tree.lock); } else { print("("); printExpr(tree.lock); print(")"); } print(" "); printStat(tree.body); } catch (IOException e) { throw new UncheckedIOException(e); } }
@Override public void visitSynchronized(JCSynchronized tree) { aPrint("synchronized "); if (tree.lock instanceof JCParens) { print(tree.lock); } else { print("("); print(tree.lock); print(")"); } print(" "); print(tree.body); }
public void visitSynchronized(JCSynchronized that) { try { print("JCSynchronized:"); } catch (Exception e) { } super.visitSynchronized(that); }
@Override public Choice<State<JCSynchronized>> visitSynchronized( final SynchronizedTree node, State<?> state) { return chooseSubtrees( state, s -> unifyExpression(node.getExpression(), s), s -> unifyStatement(node.getBlock(), s), (expr, block) -> maker().Synchronized(expr, (JCBlock) block)); }
private boolean matchSynchronized(JCSynchronized t1, JCSynchronized t2) { return treesMatch(t1.lock, t2.lock) && treesMatch(t1.body, t2.body); }
public JCSynchronized Synchronized(JCExpression lock, JCBlock body) { return invoke(Synchronized, lock, body); }
public AJCSynchronized(JCSynchronized ltree) { super(ltree.lock, ltree.body); }
public AJCSynchronized(JCSynchronized ltree, String lcomment) { this(ltree); setComment(lcomment); }
@Override public JCSynchronized inline(Inliner inliner) throws CouldNotResolveImportException { return inliner.maker().Synchronized( getExpression().inline(inliner), getBlock().inline(inliner)); }
@Override public void visitSynchronized(JCSynchronized tree) { printNode(tree); child("lock", tree.lock); child("body", tree.body); indent--; }
@Override public void visitSynchronized(JCSynchronized node) { Synchronized s = new Synchronized(); JCExpression cond = node.getExpression(); setConversionPositionInfo(s, "()", getPosition(cond)); set(node, s.rawLock(toTree(removeParens(cond))).rawBody(toTree(node.getBlock()))); }
@Override public JCSynchronized inline(Inliner inliner) throws CouldNotResolveImportException { return inliner .maker() .Synchronized(getExpression().inline(inliner), getBlock().inline(inliner)); }
public void visitSynchronized(JCSynchronized tree) { chk.checkRefType(tree.pos(), attribExpr(tree.lock, env)); attribStat(tree.body, env); result = null; }