1 package testlib; 2 3 import java.io.IOException ; 4 5 public class MethodsChange 6 { 7 private int priv; 8 9 static 10 { 11 System.out.println("static initializer"); 12 } 13 14 { 15 System.out.println("non-static initializer"); 16 } 17 18 public MethodsChange() 19 { 20 priv = 2; 21 } 22 23 protected MethodsChange(int initialpriv) 24 { 25 priv = initialpriv; 26 } 27 28 public int getPriv() 29 { 30 return priv; 31 } 32 33 public int getPriv2() 34 { 35 return priv; 36 } 37 38 public Integer getPrivAsInteger() 39 { 40 return new Integer (priv); 41 } 42 43 public Number getPrivAsNumber() 44 { 45 return new Integer (priv); 46 } 47 48 public void printPriv() 49 { 50 System.out.println(priv); 51 } 52 53 public void removedMethod(String x) 54 { 55 } 56 57 public void weakenParamType(String s) 58 { 59 } 60 61 public void strengthenParamType(Object s) 62 { 63 } 64 65 public void changeParamType(String s) 66 { 67 } 68 69 public void throwIOException() throws IOException 70 { 71 throw new java.io.IOException (); 72 } 73 74 public void throwException() throws Exception 75 { 76 throw new java.io.IOException (); 77 } 78 79 public void throwException2() throws Exception 80 { 81 throw new Exception (); 82 } 83 84 public void throwRuntimeException() throws RuntimeException 85 { 86 throw new RuntimeException (); 87 } 88 89 public void throwNoRuntimeException() 90 { 91 } 92 93 public void throwNoException() 94 { 95 } 96 97 98 public void becomesDeprecated() 99 { 100 } 101 102 107 public void becomesUndeprecated() 108 { 109 } 110 111 public final void becomesNonFinal() 112 { 113 } 114 115 public void becomesFinal() 116 { 117 } 118 } 119 | Popular Tags |