1 22 package org.jboss.test.aop.basic; 23 24 import java.io.NotSerializableException ; 25 26 30 public class POJO 31 { 32 33 public int notMatchedField = 10; 34 private int privateField = 5; 35 protected int protectedField = 5; 36 public static int staticField = 5; 37 private String remoteValue; 38 private boolean foo; 39 private String [] arrayTest; 40 41 public POJO() 42 { 43 if (1 == 0) 44 System.out.println(foo + " " + arrayTest); 45 } 46 47 48 public POJO(String s) 49 { 50 System.out.println("POJO Constructor: " + s); 51 remoteValue = s; 52 } 53 54 public POJO(int i) throws SomeException, ClassCastException 55 { 56 System.out.println("POJO Constructor: " + i); 57 } 58 59 public void someMethod() 60 { 61 System.out.println("POJO.someMethod"); 62 } 63 64 public void anotherMethod() 65 { 66 System.out.println("POJO.anotherMethod"); 67 } 68 69 public static void staticMethod() 70 { 71 System.out.println("POJO.staticMethod"); 72 } 73 74 public void accessField() 75 { 76 privateField += 1; 77 System.out.println("privateField = " + privateField); 78 } 79 80 public void accessStaticField() 81 { 82 staticField += 1; 83 System.out.println("staticField = " + staticField); 84 } 85 86 public String remoteTest() 87 { 88 return remoteValue; 89 } 90 91 public void throwException() throws SomeException 92 { 93 throw new SomeException(); 94 } 95 96 public void withSomeException() throws SomeException 97 { 98 System.out.println("POJO.withSomeException"); 99 } 100 101 public void withExceptionAndOthers(String s) throws SomeException, NotSerializableException 102 { 103 System.out.println("POJO.withExceptionAndOthers"); 104 } 105 106 public void withExceptionAndOthers(int i) throws SomeException, NotSerializableException 107 { 108 System.out.println("POJO.withExceptionAndOthers"); 109 } 110 111 public void withClassCastException(int i) throws SomeException, NotSerializableException , ClassCastException 112 { 113 System.out.println("POJO.withClassCastException"); 114 } 115 116 } 117 118 | Popular Tags |