org.acm.seguin.refactor.method
Class InvokeMovedMethodTransform

java.lang.Object
  extended by org.acm.seguin.refactor.TransformAST
      extended by org.acm.seguin.refactor.method.InvokeMovedMethodTransform

public class InvokeMovedMethodTransform
extends TransformAST

Adds an abstract method to the class

Author:
Chris Seguin

Field Summary
protected  MethodSummary methodSummary
          Description of the Field
 
Constructor Summary
InvokeMovedMethodTransform(MethodSummary init, Summary destination)
          Constructor for the InvokeMovedMethodTransform object
 
Method Summary
protected  void addBody(net.sourceforge.jrefactory.ast.SimpleNode methodDecl, int index)
          Adds the body of the method
protected  int addExceptions(net.sourceforge.jrefactory.ast.SimpleNode methodDecl, int index)
          Adds the exceptions to the node
protected  void addReturn(net.sourceforge.jrefactory.ast.SimpleNode methodDecl, int index)
          Adds the return to the method declaration
protected  net.sourceforge.jrefactory.ast.ASTNameList createExceptions(java.util.Iterator iter)
          Creates the exceptions
protected  net.sourceforge.jrefactory.ast.ASTFormalParameters createParameters()
          Creates the parameters
protected  boolean isAbstract()
          Determines if the method is abstract
 void update(net.sourceforge.jrefactory.ast.SimpleNode root)
          Update the syntax tree
 
Methods inherited from class org.acm.seguin.refactor.TransformAST
copyModifiers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodSummary

protected MethodSummary methodSummary
Description of the Field

Constructor Detail

InvokeMovedMethodTransform

public InvokeMovedMethodTransform(MethodSummary init,
                                  Summary destination)
Constructor for the InvokeMovedMethodTransform object

Parameters:
init - The signature of the method that we are adding
destination - Description of Parameter
Method Detail

isAbstract

protected boolean isAbstract()
Determines if the method is abstract

Returns:
true if the method is abstract

addBody

protected void addBody(net.sourceforge.jrefactory.ast.SimpleNode methodDecl,
                       int index)
Adds the body of the method

Parameters:
methodDecl - The feature to be added to the Body attribute
index - The feature to be added to the Body attribute

update

public void update(net.sourceforge.jrefactory.ast.SimpleNode root)
Update the syntax tree

Specified by:
update in class TransformAST
Parameters:
root - the root of the syntax tree

addReturn

protected void addReturn(net.sourceforge.jrefactory.ast.SimpleNode methodDecl,
                         int index)
Adds the return to the method declaration

Parameters:
methodDecl - The feature to be added to the Return attribute
index - The feature to be added to the Return attribute

createParameters

protected net.sourceforge.jrefactory.ast.ASTFormalParameters createParameters()
Creates the parameters

Returns:
Description of the Returned Value

createExceptions

protected net.sourceforge.jrefactory.ast.ASTNameList createExceptions(java.util.Iterator iter)
Creates the exceptions

Parameters:
iter - Description of Parameter
Returns:
Description of the Returned Value

addExceptions

protected int addExceptions(net.sourceforge.jrefactory.ast.SimpleNode methodDecl,
                            int index)
Adds the exceptions to the node

Parameters:
methodDecl - The feature to be added to the Exceptions attribute
index - The feature to be added to the Exceptions attribute
Returns:
Description of the Returned Value