1 22 package org.jboss.test.aop.jdk15.annotated.declare; 23 24 import org.jboss.aop.pointcut.Pointcut; 25 import org.jboss.aop.Aspect; 26 import org.jboss.aop.DeclareError; 27 import org.jboss.aop.DeclareWarning; 28 29 34 @Aspect (scope=org.jboss.aop.advice.Scope.PER_VM) 35 public class DeclareAspect 36 { 37 @DeclareError (expr="call(* org.jboss.test.aop.jdk15.annotated.declare.POJO->someMethod()) AND withincode(* org.jboss.test.aop.jdk15.annotated.declare.POJO->otherMethod())", msg="Should not happen") 38 Pointcut error; 39 40 @DeclareWarning (expr="call(* org.jboss.test.aop.jdk15.annotated.declare.POJO->otherMethod()) AND withincode(* org.jboss.test.aop.jdk15.annotated.declare.POJO->someMethod())", msg="Expected annotated warning") 41 Pointcut warning; 42 } 43 | Popular Tags |