KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jdiff > MemberDiff


1 package jdiff;
2
3 import java.util.*;
4 import com.sun.javadoc.*;
5
6 /**
7  * The changes between two class constructor, method or field members.
8  *
9  * See the file LICENSE.txt for copyright details.
10  * @author Matthew Doar, doar@pobox.com
11  */

12 class MemberDiff {
13
14     /** The name of the member. */
15     public String JavaDoc name_;
16
17     /**
18      * The old member type. For methods, this is the return type.
19      */

20     public String JavaDoc oldType_ = null;
21     /**
22      * The new member type. For methods, this is the return type.
23      */

24     public String JavaDoc newType_ = null;
25
26     /** The old signature. Null except for methods. */
27     public String JavaDoc oldSignature_ = null;
28     /** The new signature. Null except for methods. */
29     public String JavaDoc newSignature_ = null;
30     
31     /**
32      * The old list of exceptions. Null except for methods and constructors.
33      */

34     public String JavaDoc oldExceptions_ = null;
35     /**
36      * The new list of exceptions. Null except for methods and constructors.
37      */

38     public String JavaDoc newExceptions_ = null;
39     
40     /**
41      * A string describing the changes in documentation.
42      */

43     public String JavaDoc documentationChange_ = null;
44
45     /**
46      * A string describing the changes in modifiers.
47      * Changes can be in whether this is abstract, static, final, and in
48      * its visibility.
49      * Null if no change.
50      */

51     public String JavaDoc modifiersChange_ = null;
52
53     /**
54      * The class name where the new member is defined.
55      * Null if no change in inheritance.
56      */

57     public String JavaDoc inheritedFrom_ = null;
58
59     /** Default constructor. */
60     public MemberDiff(String JavaDoc name) {
61         name_ = name;
62     }
63
64     /** Add a change in the modifiers. */
65     public void addModifiersChange(String JavaDoc commonModifierChanges) {
66         if (commonModifierChanges != null) {
67             if (modifiersChange_ == null)
68                 modifiersChange_ = commonModifierChanges;
69             else
70                 modifiersChange_ += " " + commonModifierChanges;
71         }
72     }
73 }
74
Popular Tags