KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ChangedPackage > ChangedClassModifiers


1 package ChangedPackage;
2
3 import java.io.*;
4
5 /**
6  * NEW: The changes in this class are to do with changes in deprecation,
7  * modifiers, or exceptions.
8  */

9 public abstract class ChangedClassModifiers {
10
11     /** This constructor should remain unchanged. */
12     public ChangedClassModifiers() {
13     }
14
15     /**
16      * This constructor should have been changed from protected to public.
17      */

18     public ChangedClassModifiers(int removed) {
19     }
20
21     /**
22      * This constructor should have been deprecated.
23      *
24      * @deprecated Deprecated to test JDiff.
25      */

26     public ChangedClassModifiers(int a, int b) {
27     }
28
29     /**
30      * This constructor should have been changed from deprecated to
31      * non-deprecated.
32      */

33     public ChangedClassModifiers(int a, String JavaDoc b) {
34     }
35
36     /**
37      * This constructor should have removed exceptions.
38      */

39     public ChangedClassModifiers(long a) {
40     }
41     /** This constructor should have added exceptions. */
42     public ChangedClassModifiers(long a, long b) throws Exception JavaDoc, IOException, FileNotFoundException {
43     }
44     /** This constructor should have changed exceptions. */
45     public ChangedClassModifiers(long a, long b, long c) throws Exception JavaDoc, IOException {
46     }
47
48     /** This method should remain unchanged. */
49     public void UnchangedMethod() {
50     }
51
52     /** This method should have been changed from static to non-static. */
53     public void MethodBecomesNonStatic() {
54     }
55     /** This method should have been changed from non-static to static. */
56     public static void MethodBecomesStatic() {
57     }
58
59     /** This method should have been changed from abstract to non-abstract. */
60     public void MethodBecomesNonAbstract() {
61     }
62     /** This method should have been changed from non-abstract to abstract. */
63     public abstract void MethodBecomesAbstract();
64
65     /** This method should have removed exceptions. */
66     public void MethodRemovesExceptions() {
67     }
68
69     /** This method should have added exceptions. */
70     public void MethodAddsExceptions() throws Exception JavaDoc, IOException, FileNotFoundException {
71     }
72
73     /**
74      * This method should have changed exceptions. In fact, the
75      * exceptions' order was just reversed.
76      */

77     public void MethodChangesExceptions() throws IOException, Exception JavaDoc {
78     }
79
80     /** This method should have changed exceptions. */
81     public void MethodChangesExceptions2() throws Exception JavaDoc, IOException {
82     }
83
84     /** This method should have changed from native to non-native. */
85     public void MethodChangesNativeToNonNative() {
86     }
87     /** This method should have changed from non-native to native. */
88     public native void MethodChangesNonNativeToNative();
89
90     /** This method should have changed from synchronized to non-synchronized. */
91     public void MethodChangesSynchronizedToNonSynchronized() {
92     }
93     /** This method should have changed from non-synchronized to synchronized. */
94     public synchronized void MethodChangesNonSynchronizedToSynchronized() {
95     }
96
97     /** This field should remain unchanged. */
98     public boolean unchanged;
99
100     /** This field should have been changed from final to non-final. */
101     public boolean changedFinalToNonFinal = false;
102     /** This field should have been changed from final to non-final. */
103     public final boolean changedNonFinalToFinal = false;
104
105     /** This field should have been changed from public to protected. */
106     protected String JavaDoc fromPublicToProtected;
107     /** This field should have been changed from protected to public. */
108     public String JavaDoc fromProtectedToPublic;
109
110     /** This field should have been changed from static to non-static. */
111     String JavaDoc fromStaticToNonStatic;
112     /** This field should have been changed from non-static to static. */
113     static String JavaDoc fromNonStaticToStatic;
114
115     /** This field should have been changed from transient to non-transient. */
116     String JavaDoc fromTransientToNonTransient;
117     /** This field should have been changed from non-transient to transient. */
118     transient String JavaDoc fromNonTransientToTransient;
119
120     /** This field should have been changed from volatile to non-volatile. */
121     String JavaDoc fromVolatileToNonVolatile;
122     /** This field should have been changed from non-volatile to volatile. */
123     volatile String JavaDoc fromNonVolatileToVolatile;
124
125 }
126
Popular Tags