[jboss-cvs] JBossAS SVN: r61020 - projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 28 22:06:37 EST 2007


Author: flavia.rainone at jboss.com
Date: 2007-02-28 22:06:37 -0500 (Wed, 28 Feb 2007)
New Revision: 61020

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRule.java
Log:
[JBAOP-37] Reassigned priorities to parameter annotation on overloaded advices (plus, Arg > Args, now)

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRule.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRule.java	2007-03-01 03:05:30 UTC (rev 61019)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/advice/annotation/ParameterAnnotationRule.java	2007-03-01 03:06:37 UTC (rev 61020)
@@ -18,7 +18,7 @@
     */
    JOIN_POINT (
          JoinPoint.class, JoinPointInfo.class, AdviceMethodProperties.JOINPOINT_ARG,
-         100, false, true)
+         700, false, true)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
@@ -31,38 +31,36 @@
     */
    INVOCATION (
          JoinPoint.class, Invocation.class, AdviceMethodProperties.INVOCATION_ARG,
-         100, false, true)
+         700, false, true)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
          return properties.getInvocationType();
       }
    },
-   
+
    /**
-    * Rule for parameter annotation {@link Thrown}.
+    * Rule for parameter annotation {@link Target}.
     */
-   THROWABLE (
-         Thrown.class, Throwable.class, AdviceMethodProperties.THROWABLE_ARG, 40, true,
-         true),
-   
-   /**
-    * Rule for parameter annotation {@link Return}.
-    */
-   RETURN (
-         Return.class, null, AdviceMethodProperties.RETURN_ARG, 40, false, true)
+   TARGET (
+         Target.class, null, AdviceMethodProperties.TARGET_ARG, 300, false, true)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
-         return properties.getJoinpointReturnType();
+         return properties.getTargetType();
       }
+      
+      public boolean lowerRankGrade(AdviceMethodProperties properties)
+      {
+         return !properties.isTargetAvailable();
+      }
    },
-      
+
    /**
     * Rule for parameter annotation {@link Caller}.
     */
    CALLER (
-         Caller.class, null, AdviceMethodProperties.CALLER_ARG, 45, false, true)
+         Caller.class, null, AdviceMethodProperties.CALLER_ARG, 150, false, true)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
@@ -76,27 +74,29 @@
    },
    
    /**
-    * Rule for parameter annotation {@link Target}.
+    * Rule for parameter annotation {@link Thrown}.
     */
-   TARGET (
-         Target.class, null, AdviceMethodProperties.TARGET_ARG, 90, false, true)
+   THROWABLE (
+         Thrown.class, Throwable.class, AdviceMethodProperties.THROWABLE_ARG, 50, true,
+         true),
+   
+   /**
+    * Rule for parameter annotation {@link Return}.
+    */
+   RETURN (
+         Return.class, null, AdviceMethodProperties.RETURN_ARG, 50, false, true)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
-         return properties.getTargetType();
+         return properties.getJoinpointReturnType();
       }
+   },
       
-      public boolean lowerRankGrade(AdviceMethodProperties properties)
-      {
-         return !properties.isTargetAvailable();
-      }
-   },
-   
    /**
     * Rule for parameter annotation {@link Arg}.
     */
    ARG (
-         Arg.class, null, AdviceMethodProperties.ARG_ARG, 1, false, false)
+         Arg.class, null, AdviceMethodProperties.ARG_ARG, 2, false, false)
    {
       public Object getAssignableFrom(AdviceMethodProperties properties)
       {
@@ -108,7 +108,7 @@
     * Rule for parameter annotation {@link Args}.
     */
    ARGS (
-         Args.class, Object[].class, AdviceMethodProperties.ARGS_ARG, 30, false, true)
+         Args.class, Object[].class, AdviceMethodProperties.ARGS_ARG, 1, false, true)
    {
       public boolean lowerRankGrade(AdviceMethodProperties properties)
       {




More information about the jboss-cvs-commits mailing list