1 22 package org.jboss.test.aop.basic; 23 24 28 public class PrivateProtectedPOJO 29 { 30 31 protected PrivateProtectedPOJO() 32 { 33 System.out.println("PrivateProtectedPOJO protected constructor"); 34 } 35 36 private PrivateProtectedPOJO(String s) 37 { 38 System.out.println("PrivateProtectedPOJO private constructor"); 39 } 40 41 public PrivateProtectedPOJO(String s, int i) 42 { 43 System.out.println("PrivateProtectedPOJO public constructor"); 44 new PrivateProtectedPOJO(s); 45 } 46 47 private void privateMethod() 48 { 49 System.out.println("PrivateProtectedPOJO.privateMethod"); 50 } 51 52 protected void protectedMethod() 53 { 54 System.out.println("PrivateProtectedPOJO.protectedMethod"); 55 } 56 57 private static void privateStaticMethod() 58 { 59 System.out.println("PrivateProtectedPOJO.privateStaticMethod"); 60 } 61 62 protected static void protectedStaticMethod() 63 { 64 System.out.println("PrivateProtectedPOJO.protectedStaticMethod"); 65 } 66 67 public void callProtectedMethod() 68 { 69 protectedMethod(); 70 } 71 72 public void callPrivateMethod() 73 { 74 privateMethod(); 75 } 76 77 78 public static void callPrivateStaticMethod() 79 { 80 privateStaticMethod(); 81 } 82 83 public static void callProtectedStaticMethod() 84 { 85 protectedStaticMethod(); 86 } 87 88 public static void callPrivateConstructor() 89 { 90 new PrivateProtectedPOJO("s"); 91 } 92 } 93 | Popular Tags |