[jboss-cvs] JBossAS SVN: r88327 - in projects/aop/branches/Branch_2_1/aop/src: test/java/org/jboss/test/aop/precedence and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu May 7 01:56:47 EDT 2009
Author: flavia.rainone at jboss.com
Date: 2009-05-07 01:56:46 -0400 (Thu, 07 May 2009)
New Revision: 88327
Added:
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedencePOJO.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedenceTestCase.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor4.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor5.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor6.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor7.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor8.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect4.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect5.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect6.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect7.java
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect8.java
Modified:
projects/aop/branches/Branch_2_1/aop/src/resources/test/precedence/jboss-aop.xml
projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/Interceptions.java
Log:
[JBAOP-726] Added tests that reproduce the bug to precedence package.
Modified: projects/aop/branches/Branch_2_1/aop/src/resources/test/precedence/jboss-aop.xml
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/resources/test/precedence/jboss-aop.xml 2009-05-07 05:56:13 UTC (rev 88326)
+++ projects/aop/branches/Branch_2_1/aop/src/resources/test/precedence/jboss-aop.xml 2009-05-07 05:56:46 UTC (rev 88327)
@@ -105,5 +105,94 @@
<advice aspect="org.jboss.test.aop.precedence.LastAspect2" name="advice"/>
</bind>
+ <!-- NO PRECEDENCE TESTS -->
-</aop>
+ <interceptor class="org.jboss.test.aop.precedence.SimpleInterceptor4" scope="PER_VM"/>
+ <interceptor class="org.jboss.test.aop.precedence.SimpleInterceptor5" scope="PER_CLASS"/>
+ <interceptor class="org.jboss.test.aop.precedence.SimpleInterceptor6" scope="PER_INSTANCE"/>
+ <interceptor class="org.jboss.test.aop.precedence.SimpleInterceptor7" scope="PER_JOINPOINT"/>
+ <interceptor class="org.jboss.test.aop.precedence.SimpleInterceptor8"/>
+ <aspect class="org.jboss.test.aop.precedence.TestAspect4" scope="PER_VM"/>
+ <aspect class="org.jboss.test.aop.precedence.TestAspect5" scope="PER_CLASS"/>
+ <aspect class="org.jboss.test.aop.precedence.TestAspect6" scope="PER_INSTANCE"/>
+ <aspect class="org.jboss.test.aop.precedence.TestAspect7" scope="PER_JOINPOINT"/>
+ <aspect class="org.jboss.test.aop.precedence.TestAspect8"/>
+
+ <bind pointcut="execution(org.jboss.test.aop.precedence.NoPrecedencePOJO->new())">
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor4"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor5"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor6"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor7"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor8"/>
+ </bind>
+
+ <bind pointcut="execution(org.jboss.test.aop.precedence.NoPrecedencePOJO->new())">
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect6" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect5" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect7" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect8" name="advice"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->oneMethod())">
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor4"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect6" name="advice"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor5"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor6"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->oneMethod())">
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect5" name="advice"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor7"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect7" name="advice"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor8"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect8" name="advice"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->twoMethod()) OR call(* org.jboss.test.aop.precedence.NoPrecedencePOJO->fiveMethod())">
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice2"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice3"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect5" name="advice"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->twoMethod()) OR call(* org.jboss.test.aop.precedence.NoPrecedencePOJO->fiveMethod())">
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect7" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect8" name="advice"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor4"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor5"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor6"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->threeMethod()) OR call(org.jboss.test.aop.precedence.NoPrecedencePOJO->new(java.lang.String))">
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor5"/>
+ </bind>
+
+ <bind pointcut="execution(* org.jboss.test.aop.precedence.NoPrecedencePOJO->threeMethod()) OR call(org.jboss.test.aop.precedence.NoPrecedencePOJO->new(java.lang.String))">
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor4"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice2"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice3"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect7" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect8" name="advice"/>
+ </bind>
+
+ <bind pointcut="field(int org.jboss.test.aop.precedence.NoPrecedencePOJO->var)">
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor8"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor7"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor6"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor5"/>
+ <interceptor-ref name="org.jboss.test.aop.precedence.SimpleInterceptor4"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect6" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect4" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect5" name="advice"/>
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect7" name="advice"/>
+ </bind>
+
+ <bind pointcut="field(int org.jboss.test.aop.precedence.NoPrecedencePOJO->var)">
+ <advice aspect="org.jboss.test.aop.precedence.TestAspect8" name="advice"/>
+ </bind>
+
+
+</aop>
\ No newline at end of file
Modified: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/Interceptions.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/Interceptions.java 2009-05-07 05:56:13 UTC (rev 88326)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/Interceptions.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -28,23 +28,22 @@
* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
* @version $Revision$
*/
- at SuppressWarnings({"unchecked"})
public class Interceptions
{
- static ArrayList intercepted = new ArrayList();
+ static ArrayList<String> intercepted = new ArrayList<String>();
public static void add(String name)
{
intercepted.add(name);
}
- public static ArrayList getIntercepted()
+ public static ArrayList<String> getIntercepted()
{
return intercepted;
}
public static void reset()
{
- intercepted = new ArrayList();
+ intercepted = new ArrayList<String>();
}
}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedencePOJO.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedencePOJO.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedencePOJO.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 87953 $
+ */
+public class NoPrecedencePOJO
+{
+ public int var;
+
+ public NoPrecedencePOJO()
+ {
+ System.out.println("*** POJO constructor");
+ }
+
+ public NoPrecedencePOJO(String arg)
+ {
+ System.out.println("*** No Precedence POJO called constructor");
+ }
+
+ public static NoPrecedencePOJO factoryMethod()
+ {
+ return new NoPrecedencePOJO("factory");
+ }
+
+ public void oneMethod()
+ {
+ System.out.println("*** No Precedence POJO oneMethod");
+ }
+
+ public void twoMethod()
+ {
+ System.out.println("*** No Precedence POJO twoMethod");
+ }
+
+ public void threeMethod()
+ {
+ System.out.println("*** No Precedence POJO threeMethod");
+ }
+
+ public void fourMethod()
+ {
+ System.out.println("*** No Precedence POJO fourMethod");
+ this.fiveMethod();
+ }
+
+ public void fiveMethod()
+ {
+ System.out.println("*** No Precedence POJO fiveMethod");
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedenceTestCase.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedenceTestCase.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/NoPrecedenceTestCase.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.test.aop.AOPTestWithSetup;
+
+/**
+ * Tests if, when no precedence rule has been declared, the expected advice order
+ * is the same order they were declared in the bindings.
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class NoPrecedenceTestCase extends AOPTestWithSetup
+{
+ private NoPrecedencePOJO pojo;
+
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite("NoPrecedenceTestCase");
+ suite.addTestSuite(NoPrecedenceTestCase.class);
+ return suite;
+ }
+
+ public NoPrecedenceTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ pojo = new NoPrecedencePOJO();
+ Interceptions.reset();
+ }
+
+ public void testConstructor() throws Exception
+ {
+ System.out.println("*** Invoke constructor");
+ new NoPrecedencePOJO();
+ //Don't list per_instance aspects for constructor
+ checkInterceptions("SimpleInterceptor4", "SimpleInterceptor5",
+ "SimpleInterceptor7", "SimpleInterceptor8", "TestAspect4.advice",
+ "TestAspect5.advice", "TestAspect7.advice", "TestAspect8.advice");
+ }
+
+ @SuppressWarnings("all")
+ public void testFieldRead()
+ {
+ System.out.println("*** Invoke field read");
+ int i = pojo.var;
+ checkInterceptions("SimpleInterceptor8", "SimpleInterceptor7",
+ "SimpleInterceptor6", "SimpleInterceptor5", "SimpleInterceptor4",
+ "TestAspect6.advice", "TestAspect4.advice", "TestAspect5.advice",
+ "TestAspect7.advice", "TestAspect8.advice");
+ }
+
+ public void testFieldWrite()
+ {
+ System.out.println("*** Invoke field write");
+ Interceptions.reset();
+ pojo.var = 1;
+ checkInterceptions("SimpleInterceptor8", "SimpleInterceptor7",
+ "SimpleInterceptor6", "SimpleInterceptor5", "SimpleInterceptor4",
+ "TestAspect6.advice", "TestAspect4.advice", "TestAspect5.advice",
+ "TestAspect7.advice", "TestAspect8.advice");
+ }
+
+ public void testOneMethodExecution()
+ {
+ System.out.println("*** Invoke oneMethod");
+ pojo.oneMethod();
+ checkInterceptions("SimpleInterceptor4", "TestAspect6.advice",
+ "SimpleInterceptor5", "TestAspect4.advice", "SimpleInterceptor6",
+ "TestAspect5.advice", "SimpleInterceptor7", "TestAspect7.advice",
+ "SimpleInterceptor8", "TestAspect8.advice");
+ }
+
+ public void testTwoMethodExecution()
+ {
+ pojo.twoMethod();
+ checkInterceptions("TestAspect4.advice", "TestAspect4.advice2",
+ "TestAspect4.advice3", "TestAspect5.advice", "TestAspect7.advice",
+ "TestAspect8.advice", "SimpleInterceptor4", "SimpleInterceptor5",
+ "SimpleInterceptor6");
+ }
+
+ public void testThreeMethodExecution()
+ {
+ pojo.threeMethod();
+ checkInterceptions("SimpleInterceptor5", "SimpleInterceptor4",
+ "TestAspect4.advice", "TestAspect4.advice2", "TestAspect4.advice3",
+ "TestAspect7.advice", "TestAspect8.advice");
+ }
+
+ public void testFiveMethodCall()
+ {
+ pojo.fourMethod();
+ checkInterceptions("TestAspect4.advice", "TestAspect4.advice2",
+ "TestAspect4.advice3", "TestAspect5.advice", "TestAspect7.advice",
+ "TestAspect8.advice", "SimpleInterceptor4", "SimpleInterceptor5",
+ "SimpleInterceptor6");
+ }
+
+ public void testConstructorCall()
+ {
+ NoPrecedencePOJO.factoryMethod();
+ checkInterceptions("SimpleInterceptor5", "SimpleInterceptor4",
+ "TestAspect4.advice", "TestAspect4.advice2", "TestAspect4.advice3",
+ "TestAspect7.advice", "TestAspect8.advice");
+ }
+
+ private void checkInterceptions(String... expected)
+ {
+ List<String> intercepted = Interceptions.intercepted;
+ assertEquals("Wrong number of interceptions", expected.length, intercepted.size());
+
+ for (int i = 0 ; i < expected.length ; i++)
+ {
+ assertEquals("Wrong interception at index " + i, expected[i], intercepted.get(i));
+ }
+ }
+}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor4.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor4.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor4.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class SimpleInterceptor4 implements Interceptor
+{
+ public String getName() { return "SimpleInterceptor4"; }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ System.out.println("SimpleInterceptor4");
+ Interceptions.add("SimpleInterceptor4");
+ return invocation.invokeNext();
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor5.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor5.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor5.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class SimpleInterceptor5 implements Interceptor
+{
+ public String getName() { return "SimpleInterceptor5"; }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ System.out.println("SimpleInterceptor5");
+ Interceptions.add("SimpleInterceptor5");
+ return invocation.invokeNext();
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor6.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor6.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor6.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class SimpleInterceptor6 implements Interceptor
+{
+ public String getName() { return "SimpleInterceptor6"; }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ System.out.println("SimpleInterceptor6");
+ Interceptions.add("SimpleInterceptor6");
+ return invocation.invokeNext();
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor7.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor7.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor7.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class SimpleInterceptor7 implements Interceptor
+{
+ public String getName() { return "SimpleInterceptor7"; }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ System.out.println("SimpleInterceptor7");
+ Interceptions.add("SimpleInterceptor7");
+ return invocation.invokeNext();
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor8.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor8.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/SimpleInterceptor8.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ *
+ * @author <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class SimpleInterceptor8 implements Interceptor
+{
+ public String getName() { return "SimpleInterceptor8"; }
+
+ public Object invoke(Invocation invocation) throws Throwable
+ {
+ System.out.println("SimpleInterceptor8");
+ Interceptions.add("SimpleInterceptor8");
+ return invocation.invokeNext();
+ }
+}
\ No newline at end of file
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect4.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect4.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect4.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 37406 $
+ */
+public class TestAspect4
+{
+ public Object advice(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect4.advice");
+ Interceptions.add("TestAspect4.advice");
+ return invocation.invokeNext();
+
+ }
+
+ public Object advice2(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect4.advice2");
+ Interceptions.add("TestAspect4.advice2");
+ return invocation.invokeNext();
+
+ }
+
+ public Object advice3(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect4.advice3");
+ Interceptions.add("TestAspect4.advice3");
+ return invocation.invokeNext();
+ }
+}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect5.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect5.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect5.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 37406 $
+ */
+public class TestAspect5
+{
+ public Object advice(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect5.advice");
+ Interceptions.add("TestAspect5.advice");
+ return invocation.invokeNext();
+
+ }
+}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect6.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect6.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect6.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 37406 $
+ */
+public class TestAspect6
+{
+ public Object advice(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect6.advice");
+ Interceptions.add("TestAspect6.advice");
+ return invocation.invokeNext();
+
+ }
+}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect7.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect7.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect7.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 37406 $
+ */
+public class TestAspect7
+{
+ public Object advice(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect7.advice");
+ Interceptions.add("TestAspect7.advice");
+ return invocation.invokeNext();
+
+ }
+}
Added: projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect8.java
===================================================================
--- projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect8.java (rev 0)
+++ projects/aop/branches/Branch_2_1/aop/src/test/java/org/jboss/test/aop/precedence/TestAspect8.java 2009-05-07 05:56:46 UTC (rev 88327)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.aop.precedence;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 37406 $
+ */
+public class TestAspect8
+{
+ public Object advice(Invocation invocation)throws Throwable
+ {
+ System.out.println("TestAspect8.advice");
+ Interceptions.add("TestAspect8.advice");
+ return invocation.invokeNext();
+
+ }
+}
More information about the jboss-cvs-commits
mailing list