public final void insertBefore(final T existingItem, final T newItem) { _node.insertChildBefore(existingItem, newItem, _role); } }
public final void insertBefore(final T existingItem, final T newItem) { _node.insertChildBefore(existingItem, newItem, _role); } }
public final void insertBefore(final T existingItem, final T newItem) { _node.insertChildBefore(existingItem, newItem, _role); } }
public final <T extends AstNode> void insertChildAfter(final AstNode previousSibling, final T child, final Role<T> role) { insertChildBefore( previousSibling == null || previousSibling.isNull() ? _firstChild : previousSibling._nextSibling, child, role ); }
public final <T extends AstNode> void insertChildAfter(final AstNode previousSibling, final T child, final Role<T> role) { insertChildBefore( previousSibling == null || previousSibling.isNull() ? _firstChild : previousSibling._nextSibling, child, role ); }
public final <T extends AstNode> void insertChildAfter(final AstNode previousSibling, final T child, final Role<T> role) { insertChildBefore( previousSibling == null || previousSibling.isNull() ? _firstChild : previousSibling._nextSibling, child, role ); }
@SafeVarargs public final <T extends AstNode> void insertChildrenBefore(final AstNode nextSibling, final Role<T> role, final T... children) { VerifyArgument.notNull(children, "children"); for (final T child : children) { insertChildBefore(nextSibling, child, role); } }
@SafeVarargs public final <T extends AstNode> void insertChildrenBefore(final AstNode nextSibling, final Role<T> role, final T... children) { VerifyArgument.notNull(children, "children"); for (final T child : children) { insertChildBefore(nextSibling, child, role); } }
@SafeVarargs public final <T extends AstNode> void insertChildrenBefore(final AstNode nextSibling, final Role<T> role, final T... children) { VerifyArgument.notNull(children, "children"); for (final T child : children) { insertChildBefore(nextSibling, child, role); } }
public final WhileStatement transformContinueOuter(final WhileStatement loop) { final Match m = CONTINUE_OUTER_PATTERN.match(loop); if (!m.success()) { return loop; } final LabelStatement label = (LabelStatement) m.get("label").iterator().next(); label.remove(); loop.getParent().insertChildBefore(loop, label, BlockStatement.STATEMENT_ROLE); return loop; }
public final WhileStatement transformContinueOuter(final WhileStatement loop) { final Match m = CONTINUE_OUTER_PATTERN.match(loop); if (!m.success()) { return loop; } final LabelStatement label = (LabelStatement) m.get("label").iterator().next(); label.remove(); loop.getParent().insertChildBefore(loop, label, BlockStatement.STATEMENT_ROLE); return loop; }
public final WhileStatement transformContinueOuter(final WhileStatement loop) { final Match m = CONTINUE_OUTER_PATTERN.match(loop); if (!m.success()) { return loop; } final LabelStatement label = (LabelStatement) m.get("label").iterator().next(); label.remove(); loop.getParent().insertChildBefore(loop, label, BlockStatement.STATEMENT_ROLE); return loop; }
public static void replaceAll(final AstNode tree) { for (final AstNode node : tree.getDescendants()) { if (node instanceof CommentStatement) { node.getParent().insertChildBefore( node, new Comment(((CommentStatement) node).getComment()), Roles.COMMENT ); node.remove(); } } }
public static void replaceAll(final AstNode tree) { for (final AstNode node : tree.getDescendants()) { if (node instanceof CommentStatement) { node.getParent().insertChildBefore( node, new Comment(((CommentStatement) node).getComment()), Roles.COMMENT ); node.remove(); } } }
public static void replaceAll(final AstNode tree) { for (final AstNode node : tree.getDescendants()) { if (node instanceof CommentStatement) { node.getParent().insertChildBefore( node, new Comment(((CommentStatement) node).getComment()), Roles.COMMENT ); node.remove(); } } }
forLoop.getParent().insertChildBefore(forLoop, tempOuter, BlockStatement.STATEMENT_ROLE); forLoop.remove();
forLoop.getParent().insertChildBefore(forLoop, tempOuter, BlockStatement.STATEMENT_ROLE); forLoop.remove();
declaration.putUserData(Keys.VARIABLE, null); doWhile.getParent().insertChildBefore(doWhile, declaration, BlockStatement.STATEMENT_ROLE);
declaration.putUserData(Keys.VARIABLE, null); doWhile.getParent().insertChildBefore(doWhile, declaration, BlockStatement.STATEMENT_ROLE);
declaration.putUserData(Keys.VARIABLE, null); doWhile.getParent().insertChildBefore(doWhile, declaration, BlockStatement.STATEMENT_ROLE);