1 22 package org.jboss.test.aop.constructortarget; 23 24 import org.jboss.aop.joinpoint.ConstructorInvocation; 25 26 32 public class AspectTarget 33 { 34 static boolean intercepted; 35 public Object constructor(ConstructorInvocation ci) throws Throwable  36 { 37 intercepted = true; 38 if(ci.getTargetObject() != null) 39 { 40 throw new Throwable ("TargetObject should be null"); 41 } 42 Object o = ci.invokeNext(); 43 44 if(ci.getTargetObject() != o) 45 { 46 throw new Throwable ("TargetObject should be null"); 47 } 48 49 return o; 50 } 51 52 } 53 | Popular Tags |