1 22 package org.jboss.aop.advice; 23 24 import org.jboss.aop.Advisor; 25 import org.jboss.aop.joinpoint.Joinpoint; 26 27 33 public class PerClassAdvice 34 { 35 public static Interceptor generate(Joinpoint joinpoint, Advisor advisor, String adviceName, AspectDefinition def) throws Exception 36 { 37 Interceptor interceptor = advisor.getAdviceInterceptor(def, adviceName, joinpoint); 38 if (interceptor != null) return interceptor; 39 advisor.addPerClassAspect(def); 40 Object aspect = advisor.getPerClassAspect(def); 41 interceptor = PerVmAdvice.generateInterceptor(joinpoint, aspect, adviceName); 42 advisor.addAdviceInterceptor(def, adviceName, interceptor, joinpoint); 43 return interceptor; 44 } 45 46 47 } 48 | Popular Tags |