KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ChangedPackage > ChangedMethods


1 package ChangedPackage;
2
3 /**
4  * NEW: The changes in this class are to do with changes in methods,
5  * when mutiple methods have the same name.
6  */

7 public class ChangedMethods {
8
9     /** This constructor should remain unchanged. */
10     public ChangedMethods() {
11     }
12
13     /** This method should remain unchanged. */
14     public void UnchangedMethod() {
15     }
16
17     // Test of changing one method in multiple methods
18

19     /** This method should have been unchanged. */
20     public void MethodA() {
21     }
22     /**
23      * NEW: This method should have been changed with the addition of a long
24      * parameter.
25      */

26     public void MethodA(char a, long newParam) {
27     }
28     /** This method should have been unchanged. */
29     public void MethodA(char a, int b) {
30     }
31
32     // Test of changing two methods in multiple methods
33

34     /** This method should have been unchanged. */
35     public void MethodB() {
36     }
37     /**
38      * NEW: This method should have been changed with the addition of a long
39      * parameter.
40      */

41     public void MethodB(char a, long newParam) {
42     }
43     /**
44      * NEW: This method should have been changed with the addition of a String
45      * parameter.
46      */

47     public void MethodB(char a, int b, String JavaDoc newStringParam) {
48     }
49
50     // Test of changing all methods in multiple methods
51

52     /**
53      * NEW: This method should have been changed with the addition of a byte
54      * parameter.
55      */

56     public void MethodC(byte newByteParam) {
57     }
58     /**
59      * NEW: This method should have been changed with the addition of a long
60      * parameter.
61      */

62     public void MethodC(char a, long newParam) {
63     }
64     /**
65      * NEW: This method should have been changed with the addition of a String
66      * parameter.
67      */

68     public void MethodC(char a, int b, String JavaDoc newStringParam) {
69     }
70
71     /** NEW: This method should have had a long parameter removed. */
72     public String JavaDoc MethodWithRemovedParam(int a, /* long b,*/ int c) {
73         return "foo";
74     }
75 }
76
Popular Tags