tzh
2024-08-20 ca8393c352368485bcb8b277004fdb0c6cb572c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package jdiff;
 
import java.util.*;
import com.sun.javadoc.*;
 
/**
 * The changes between two class constructor, method or field members.
 *
 * See the file LICENSE.txt for copyright details.
 * @author Matthew Doar, mdoar@pobox.com
 */
class MemberDiff {
 
    /** The name of the member. */
    public String name_;
 
    /** 
     * The old member type. For methods, this is the return type. 
     */
    public String oldType_ = null;
    /** 
     * The new member type. For methods, this is the return type.
     */
    public String newType_ = null;
 
    /** The old signature. Null except for methods. */
    public String oldSignature_ = null;
    /** The new signature. Null except for methods. */
    public String newSignature_ = null;
    
    /** 
     * The old list of exceptions. Null except for methods and constructors. 
     */
    public String oldExceptions_ = null;
    /** 
     * The new list of exceptions. Null except for methods and constructors. 
     */
    public String newExceptions_ = null;
    
    /** 
     * A string describing the changes in documentation. 
     */
    public String documentationChange_ = null;
 
    /**
     * A string describing the changes in modifiers.      
     * Changes can be in whether this is abstract, static, final, and in 
     * its visibility.
     * Null if no change. 
     */
    public String modifiersChange_ = null;
 
    /**
     * The class name where the new member is defined.
     * Null if no change in inheritance. 
     */
    public String inheritedFrom_ = null;
 
    /** Default constructor. */
    public MemberDiff(String name) {
        name_ = name;
    }   
 
    /** Add a change in the modifiers. */
    public void addModifiersChange(String commonModifierChanges) {
        if (commonModifierChanges != null) {
            if (modifiersChange_ == null)
                modifiersChange_ = commonModifierChanges;
            else
                modifiersChange_ += " " + commonModifierChanges;
        }
    }
}