org.deft.extension.tools.astmodifier
Class ASTModifier
java.lang.Object
org.deft.extension.tools.astmodifier.ASTModifier
public class ASTModifier
- extends java.lang.Object
Provides modification operation on a AST.
- Author:
- Martin Heinzerling
Method Summary |
void |
appendAfter(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
|
void |
appendBefore(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
|
void |
changeToComment(org.deft.repository.ast.TreeNode ast,
XPath location,
int width,
CommentTypeVisitor v)
|
void |
replace(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
|
void |
replaceList(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int width,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASTModifier
public ASTModifier(SyntaxCheckerVisitor sc)
appendAfter
public void appendAfter(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
- Parameters:
location
- to insert the treenode
appendBefore
public void appendBefore(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
- Parameters:
location
- to insert the treenode
replace
public void replace(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
- Parameters:
location
- to replace the treenode
replaceList
public void replaceList(org.deft.repository.ast.TreeNode ast,
org.deft.repository.ast.TreeNode insert,
XPath location,
int width,
int emptyLinesBefore,
int emptyLinesAfter,
int spacesBefore,
int spacesAfter)
- Parameters:
location
- to replace the treenodewidth
- -1 all following sibling
changeToComment
public void changeToComment(org.deft.repository.ast.TreeNode ast,
XPath location,
int width,
CommentTypeVisitor v)
- Parameters:
location
- to replacewidth
- -1 all following sibling