01: package org.acm.seguin.refactor.type;
02:
03: import net.sourceforge.jrefactory.ast.ASTName;
04: import org.acm.seguin.summary.TypeSummary;
05:
06: /**
07: * Object responsible for renaming a type
08: *
09: *@author Chris Seguin
10: *@created September 18, 1999
11: */
12: public class RenameTypeData {
13: // Instance Variables
14: private ASTName oldName;
15: private ASTName newName;
16: private TypeSummary summary;
17:
18: /**
19: * Constructor for the RenameTypeData object
20: *
21: *@param oldValue The old name
22: *@param newValue The new name
23: *@param init Description of Parameter
24: */
25: public RenameTypeData(ASTName oldValue, ASTName newValue,
26: TypeSummary init) {
27: oldName = oldValue;
28: newName = newValue;
29: summary = init;
30: }
31:
32: /**
33: * Constructor for the RenameTypeData object
34: *
35: *@param oldValue The old name
36: *@param newValue The new name
37: *@param init Description of Parameter
38: */
39: public RenameTypeData(String oldValue, String newValue,
40: TypeSummary init) {
41: oldName = new ASTName();
42: oldName.addNamePart(oldValue);
43: newName = new ASTName();
44: newName.addNamePart(newValue);
45: summary = init;
46: }
47:
48: /**
49: * Return the oldname
50: *
51: *@return the old name
52: */
53: public ASTName getOld() {
54: return oldName;
55: }
56:
57: /**
58: * Return the new name
59: *
60: *@return the new name
61: */
62: public ASTName getNew() {
63: return newName;
64: }
65:
66: /**
67: * Get the type summary associated with the type
68: *
69: *@return the type summary
70: */
71: public TypeSummary getTypeSummary() {
72: return summary;
73: }
74: }
|