1 8 package test.mixin.perclass; 9 10 13 public class MyImpl implements Introductions, Cloneable { 14 15 public MyImpl(Class targetClass) { 16 } 17 18 public void NOT_IN_MIXIN_INTF() { 19 } 20 21 public void noArgs() throws RuntimeException { 23 } 24 25 public long longArg(long arg) { 26 return arg; 27 } 28 29 public int intArg(int arg) { 30 return arg; 31 } 32 33 public short shortArg(short arg) { 34 return arg; 35 } 36 37 public double doubleArg(double arg) { 38 return arg; 39 } 40 41 public float floatArg(float arg) { 42 return arg; 43 } 44 45 public byte byteArg(byte arg) { 46 return arg; 47 } 48 49 public boolean booleanArg(boolean arg) { 50 return arg; 51 } 52 53 public char charArg(char arg) { 54 return arg; 55 } 56 57 public Object objectArg(Object arg) { 58 return arg; 59 } 60 61 public String [] arrayArg(String [] arg) { 62 return arg; 63 } 64 65 public int variousArguments1(String str, int i, float f, Object o, long l) throws RuntimeException { 66 return str.hashCode() + i + (int) f + o.hashCode() + (int) l; 67 } 68 69 public int variousArguments2(float f, int i, String str1, Object o, long l, String str2) 70 throws RuntimeException { 71 return (int) f + i + str1.hashCode() + o.hashCode() + (int) l + str2.hashCode(); 72 } 73 74 public void getVoid() throws RuntimeException { 75 } 76 77 public long getLong() throws RuntimeException { 78 return 1L; 79 } 80 81 public int getInt() throws RuntimeException { 82 return 1; 83 } 84 85 public short getShort() throws RuntimeException { 86 return 1; 87 } 88 89 public double getDouble() throws RuntimeException { 90 return 1.1D; 91 } 92 93 public float getFloat() throws RuntimeException { 94 return 1.1F; 95 } 96 97 public byte getByte() throws RuntimeException { 98 return Byte.parseByte("1"); 99 } 100 101 public char getChar() throws RuntimeException { 102 return 'A'; 103 } 104 105 public boolean getBoolean() throws RuntimeException { 106 return true; 107 } 108 109 public void exceptionThrower() throws Throwable { 110 throw new UnsupportedOperationException ("this is a test"); 111 } 112 113 public void exceptionThrowerChecked() throws CheckedException { 114 throw new CheckedException(); 115 } 116 } 117 118 | Popular Tags |