[jboss-cvs] JBossAS SVN: r61067 - projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Mar 2 23:33:46 EST 2007


Author: flavia.rainone at jboss.com
Date: 2007-03-02 23:33:46 -0500 (Fri, 02 Mar 2007)
New Revision: 61067

Modified:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/OverloadedThrowingAspect.java
Log:
[JBAOP-37] Overloaded throwing test case scenario is set up (for @JoinPoint, @Thrown, @Arg and
@Args parameters; plus, this scenario contains interface hierarchy for @Arg parameters)

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/OverloadedThrowingAspect.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/OverloadedThrowingAspect.java	2007-03-03 04:31:17 UTC (rev 61066)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/beforeafterArgs/OverloadedThrowingAspect.java	2007-03-03 04:33:46 UTC (rev 61067)
@@ -23,12 +23,16 @@
 
 import org.jboss.aop.JoinPointInfo;
 import org.jboss.aop.advice.annotation.Arg;
+import org.jboss.aop.advice.annotation.Args;
 import org.jboss.aop.advice.annotation.JoinPoint;
 import org.jboss.aop.advice.annotation.Thrown;
 
 /**
- * Aspect used on overloaded throwing advice tests.
- *
+ * Aspect used on overloaded throwing advice tests (for JoinPoint, Thrown, Arg and
+ * Args tests).
+ * 
+ * This class includes both class and interface hierarchy on multiple Arg parameters.
+ * 
  * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
  */
 public class OverloadedThrowingAspect
@@ -40,184 +44,9 @@
       throwing1 = null;
    }
 
-   // TODO finish this test when we can define the throwing to catch POJOException
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1, @Arg Implementor arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface,Implementor";
-   }
+   /* THROWING1 ADVICE */
    
    public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg Interface arg1, @Arg Implementor arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,Interface,Implementor";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1, @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface,SubInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1, @Arg Object arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface,Object";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg,
-         @Arg Implementor implementor)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface,Implementor";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg Interface arg1, @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,Interface,SubInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg1,
-         @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface,SubInterface";
-   }
-
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg1, @Arg Object arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface,Object";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg Interface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,Interface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1, 
-         @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg Interface arg1, @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,Interface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg1, 
-         @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1, @Arg Implementor arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SubInterface,Implementor";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg Interface arg1, @Arg Implementor arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,Interface,Implementor";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1, @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SubInterface,SubInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1, @Arg Object arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SubInterface,Object";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg,
-         @Arg Implementor implementor)
-   {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface,Implementor";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SubInterface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg Interface arg1, @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,Interface,SubInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg1,
-         @Arg SubInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface,SubInterface";
-   }
-
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg1, @Arg Object arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface,Object";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg Interface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,Interface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1, 
-         @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SubInterface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg1, @Arg Interface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface,Interface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg Interface arg1, @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,Interface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg1, 
-         @Arg SuperInterface arg2)
-   {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface,SuperInterface";
-   }
-   
-   public void throwing1(@JoinPoint JoinPointInfo joinpoint,
          @Thrown Throwable thrown, @Arg SubInterface arg1, @Arg Implementor arg2)
    {
       throwing1 = "JoinPointInfo,Throwable,SubInterface,Implementor";
@@ -394,102 +223,196 @@
    }
    
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown POJOException thrown, @Arg SubInterface arg1)
+         @Thrown Throwable thrown, @Arg SubInterface arg1)
    {
-      throwing1 = "JoinPointInfo,POJOException,SubInterface";
+      throwing1 = "JoinPointInfo,Throwable,SubInterface";
    }
 
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown POJOException thrown, @Arg Implementor arg1)
+         @Thrown Throwable thrown, @Arg Implementor arg2)
    {
-      throwing1 = "JoinPointInfo,POJOException,Implementor";
+      throwing1 = "JoinPointInfo,Throwable,Implementor";
    }
    
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown POJOException thrown, @Arg Interface arg1)
+         @Thrown Throwable thrown, @Arg Interface arg1)
    {
-      throwing1 = "JoinPointInfo,POJOException,Interface";
+      throwing1 = "JoinPointInfo,Throwable,Interface";
    }
 
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown POJOException thrown, @Arg Object arg1)
+         @Thrown Throwable thrown, @Arg Object arg2)
    {
-      throwing1 = "JoinPointInfo,POJOException,Object";
+      throwing1 = "JoinPointInfo,Throwable,Object";
    }
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown POJOException thrown, @Arg SuperInterface arg1)
+         @Thrown Throwable thrown, @Arg SuperInterface arg1)
    {
-      throwing1 = "JoinPointInfo,POJOException,SuperInterface";
+      throwing1 = "JoinPointInfo,Throwable,SuperInterface";
    }
    
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Exception thrown, @Arg SubInterface arg1)
+         @Thrown Throwable thrown, @Args Object[] args)
    {
-      throwing1 = "JoinPointInfo,Exception,SubInterface";
+      throwing1 = "JoinPointInfo,Throwable,Object[]";
    }
-
+   
    public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Exception thrown, @Arg Implementor arg1)
+         @Thrown Object thrown, @Args Object[] args)
    {
-      throwing1 = "JoinPointInfo,Exception,Implementor";
+      throwing1 = "JoinPointInfo,Object,Object[]";
    }
    
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Exception thrown, @Arg Interface arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1,
+         @Arg Implementor arg2)
    {
-      throwing1 = "JoinPointInfo,Exception,Interface";
+      throwing1 = "Throwable,SubInterface,Implementor";
    }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1,
+         @Arg Object arg2)
+   {
+      throwing1 = "Throwable,SubInterface,Object";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1,
+         @Arg SubInterface arg2)
+   {
+      throwing1 = "Throwable,SubInterface,SubInterface";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg Interface arg1,
+         @Arg Implementor arg2)
+   {
+      throwing1 = "Throwable,Interface,Implementor";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg Interface arg1,
+         @Arg SubInterface arg2)
+   {
+      throwing1 = "Throwable,Interface,SubInterface";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1,
+         @Arg Interface arg2)
+   {
+      throwing1 = "Throwable,SubInterface,Interface";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg,
+         @Arg Implementor implementor)
+   {
+      throwing1 = "Throwable,SuperInterface,Implementor";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1, 
+         @Arg SuperInterface arg2)
+   {
+      throwing1 = "Throwable,SubInterface,SuperInterface";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg Interface arg1,
+         @Arg Interface arg2)
+   {
+      throwing1 = "Throwable,Interface,Interface";
+   }
 
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Exception thrown, @Arg Object arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg1,
+         @Arg Object arg2)
    {
-      throwing1 = "JoinPointInfo,Exception,Object";
+      throwing1 = "Throwable,SuperInterface,Object";
    }
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Exception thrown, @Arg SuperInterface arg1)
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg1,
+         @Arg SubInterface arg2)
    {
-      throwing1 = "JoinPointInfo,Exception,SuperInterface";
+      throwing1 = "Throwable,SuperInterface,SubInterface";
    }
    
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Throwable thrown, @Arg SubInterface arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg Interface arg1,
+         @Arg SuperInterface arg2)
    {
-      throwing1 = "JoinPointInfo,Throwable,SubInterface";
+      throwing1 = "Throwable,Interface,SuperInterface";
    }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg1,
+         @Arg Interface arg2)
+   {
+      throwing1 = "Throwable,SuperInterface,Interface";
+   }
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg1, 
+         @Arg SuperInterface arg2)
+   {
+      throwing1 = "Throwable,SuperInterface,SuperInterface";
+   }
+   
+   public void throwing1(@Thrown Object thrown, @Arg SubInterface arg1,
+         @Arg Implementor arg2)
+   {
+      throwing1 = "Object,SubInterface,Implementor";
+   }
 
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Throwable thrown, @Arg Implementor arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg Implementor arg2)
    {
-      throwing1 = "JoinPointInfo,Throwable,Implementor";
+      throwing1 = "Throwable,Implementor";
    }
    
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Throwable thrown, @Arg Interface arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg SubInterface arg1)
    {
-      throwing1 = "JoinPointInfo,Throwable,Interface";
+      throwing1 = "Throwable,SubInterface";
    }
 
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Throwable thrown, @Arg Object arg1)
+   public void throwing1(@Thrown Throwable thrown, @Arg Object arg2)
    {
-      throwing1 = "JoinPointInfo,Throwable,Object";
+      throwing1 = "Throwable,Object";
    }
-   public void throwing1(@JoinPoint JoinPointInfo joinPoint,
-         @Thrown Throwable thrown, @Arg SuperInterface arg1)
+   
+   public void throwing1(@Thrown Throwable thrown, @Arg Interface arg1)
    {
-      throwing1 = "JoinPointInfo,Throwable,SuperInterface";
+      throwing1 = "Throwable,Interface";
    }
    
-   public void throwing1(@Thrown POJOException thrown)
+   public void throwing1(@Thrown Throwable thrown, @Arg SuperInterface arg1)
    {
-      throwing1 = "POJOException";
+      throwing1 = "Throwable,SuperInterface";
    }
+
+   public void throwing1(@Thrown Object thrown, @Arg Implementor arg2)
+   {
+      throwing1 = "Object,Implementor";
+   }
+      
+   public void throwing1(@Thrown Object thrown, @Arg SubInterface arg1)
+   {
+      throwing1 = "Object,SubInterface";
+   }
+
+   public void throwing1(@Thrown Object thrown, @Arg Object arg2)
+   {
+      throwing1 = "Object,Object";
+   }
    
-   public void throwing1(@Thrown Exception thrown)
+   public void throwing1(@Thrown Object thrown, @Arg Interface arg1)
    {
-      throwing1 = "Exception";
+      throwing1 = "Object,Interface";
    }
+
+   public void throwing1(@Thrown Object thrown, @Arg SuperInterface arg1)
+   {
+      throwing1 = "Object,SuperInterface";
+   }
    
+   public void throwing1(@Thrown Throwable thrown, @Args Object[] args)
+   {
+      throwing1 = "Throwable,Object[]";
+   }
+   
+   public void throwing1(@Thrown Object thrown, @Args Object[] args)
+   {
+      throwing1 = "Object,Object[]";
+   }
+   
    public void throwing1(@Thrown Throwable thrown)
    {
       throwing1 = "Throwable";




More information about the jboss-cvs-commits mailing list