1 Reply Latest reply on Nov 5, 2003 6:12 PM by adegbile

    Pointcut types

    sradford

      Hi,

      Can anyone explain the difference between the InterceptorPointcut and the other ones (ClassPointcut, MethodPointcut, and FieldPointcut - as they seem to just do what InterceptorPointcut does)?

      Regards,

      Sean

        • 1. Re: Pointcut types
          adegbile

          Hi Sean,

          This is an extra from my notes on the Jboss AOP Framework

          The class AspectXmlLoader will help in the understaonding of the pointcuts

          AspectXmlLoader: Loaded and deploys all Aspect configuration information. The main methods to understand are

          public static void deployInterceptorPointcut (Element pointcut) throws Exception. InterceptorPointcut configuration is delegated to deployInterceptorPointcut of the AspectManager. This method deploys the InterceptorPointcut by delegating the AspectManager method addInterceptorPointcut, after creating an InterceptorPointcut. The InterceptorPointcut is loaded using the method loadInterceptorsElement. Also the following attributes are extracted class (optional), group (optional), fieldFilter, methodFilter, constructorFilter of the element <interceptor-pointcut>


          ClassPointcut configuration is delegated to depoydeployInterceptorPointcut. This method deploys a Caller Pointcut using the following attributes "class", "withinMethodName", "calledClass", "calledMethodName" and "group" delegated to the method addCallerPointcut of the AspectManager.

          MethodPointcut configuration is delegated to the method deployMethodPointcut. Deploys a MethodPointcut by delegating to the AspectManager.addInterceptorPointcut, after creating
          a MethodPointcut using the attributes "class", "methodName", "group", "attr" and "methodFilter" of the element <method-pointcut>

          CallerPointcut configuration is delegated to the method deployCallerPointcut. This method deploys a Caller Pointcut using the following attributes "class", "withinMethodName", "calledClass", "calledMethodName" and "group" delegated to the method addCallerPointcut of the AspectManager.

          FieldPointcut configuration is delegated to the method deployFieldPointcut. This method deploys Field Pointcut by delegating to the method addInterceptorPointcut of Aspect Manager using the new FieldPointcut. The following attributes were extracted from the element namely class, fieldName, group, attr and fieldFilter of <field-pointcut> and <method-pointcut> jboss-aop.xml file

          ConstructorPointcut configuration is delegated to the method deployConstructorPointcut. This method deploys a Constructor Pointcut by creating a new ConstructorPointcut and delegating to the method addInterceptorPointcut of the AspectManager. The following attributes are extracted "class", "group", "attr", "constructorFilter" from the element

          Regards
          Adeyemi E Adegbile