|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectastcentric.structure.transformation.AbstractTransformation
astcentric.structure.transformation.CreateNode
public class CreateNode
Transformation which creates a new plain Node in an AST.
| Field Summary |
|---|
| Fields inherited from class astcentric.structure.transformation.AbstractTransformation |
|---|
_ast |
| Constructor Summary | |
|---|---|
CreateNode(AST ast,
Node parent,
int childIndex)
Creates an instance for the specified AST, parent node, and child index. |
|
| Method Summary | |
|---|---|
void |
transform(ScratchPad scratchPad,
Feedback feedback)
Performs the transformation. |
void |
undo()
Reverts the transformation performed by the transform method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CreateNode(AST ast,
Node parent,
int childIndex)
ast - A non-null unsealed AST object.parent - The parent node. Can be null if the root
should be created.childIndex - Index of the child to be created.| Method Detail |
|---|
public void transform(ScratchPad scratchPad,
Feedback feedback)
Transformation
scratchPad - Scratch pad for objects needed between different
transformations (e.g. copy-paste). Can be null if
not needed. Implementations who need a scratch pad should
throw an IllegalArgumentException if missing.feedback - Call-back object for user feedback.
Can be null.public void undo()
TransformationAST and ScratchPad
have to be the same as before invoking transform().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||