01: /*
02: * Author: Chris Seguin
03: *
04: * This software has been developed under the copyleft
05: * rules of the GNU General Public License. Please
06: * consult the GNU General Public License for more
07: * details about use and distribution of this software.
08: */
09: package org.acm.seguin.refactor.type;
10:
11: import net.sourceforge.jrefactory.ast.ASTName;
12: import net.sourceforge.jrefactory.ast.SimpleNode;
13: import org.acm.seguin.refactor.TransformAST;
14:
15: /**
16: * This object will add a new interface to the implements clause of a class
17: * declaration. If no implements clause exists, one will be added.
18: *
19: *@author Grant Watson
20: *@created December 1, 2000
21: */
22: public class AddImplementedInterfaceTransform extends TransformAST {
23: private ASTName m_interfaceName;
24:
25: /**
26: * Constructor for the AddImplementsTransform object
27: *
28: *@param interfaceName Description of Parameter
29: */
30: public AddImplementedInterfaceTransform(ASTName interfaceName) {
31: m_interfaceName = interfaceName;
32: }
33:
34: /**
35: * Description of the Method
36: *
37: *@param root Description of Parameter
38: */
39: public void update(SimpleNode root) {
40: AddImplementedInterfaceVisitor aiiv = new AddImplementedInterfaceVisitor();
41: root.jjtAccept(aiiv, m_interfaceName);
42: }
43:
44: }
|