1 22 package org.jboss.aop.pointcut; 23 24 import java.lang.reflect.AccessibleObject ; 25 import java.lang.reflect.Constructor ; 26 import java.lang.reflect.Field ; 27 import java.lang.reflect.Method ; 28 import org.jboss.aop.Advisor; 29 import javassist.CtConstructor; 30 import javassist.CtField; 31 import javassist.CtMethod; 32 import javassist.NotFoundException; 33 import javassist.expr.MethodCall; 34 import javassist.expr.NewExpr; 35 36 42 public interface Pointcut 43 { 44 String getName(); 45 46 boolean softMatch(Advisor advisor); 47 48 boolean matchesExecution(Advisor advisor, CtMethod m) throws NotFoundException; 49 boolean matchesExecution(Advisor advisor, CtConstructor c) throws NotFoundException; 50 boolean matchesConstruction(Advisor advisor, CtConstructor c) throws NotFoundException; 51 boolean matchesGet(Advisor advisor, CtField f) throws NotFoundException; 52 boolean matchesSet(Advisor advisor, CtField f) throws NotFoundException; 53 boolean matchesCall(Advisor callingAdvisor, MethodCall methodCall) throws NotFoundException; 54 boolean matchesCall(Advisor callingAdvisor, NewExpr methodCall) throws NotFoundException; 55 56 PointcutMethodMatch matchesExecution(Advisor advisor, Method m); 57 boolean matchesExecution(Advisor advisor, Constructor c); 58 boolean matchesConstruction(Advisor advisor, Constructor c); 59 boolean matchesGet(Advisor advisor, Field f); 60 boolean matchesSet(Advisor advisor, Field f); 61 boolean matchesCall(Advisor advisor, AccessibleObject within, Class calledClass, Method calledMethod); 62 boolean matchesCall(Advisor advisor, AccessibleObject within, Class calledClass, Constructor calledCon); 63 64 String getExpr(); 65 66 } 67 | Popular Tags |