[jboss-cvs] JBossAS SVN: r75671 - in trunk/testsuite/src/main/org/jboss/test/aop: jdk15annotated and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 11 04:51:40 EDT 2008


Author: stalep
Date: 2008-07-11 04:51:39 -0400 (Fri, 11 Jul 2008)
New Revision: 75671

Added:
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedAspectFactory.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTester.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTesterMBean.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnotherPOJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectFromFactory.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerClass.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerInstance.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerVM.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CFlowAspect.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ComparableMixin.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptor.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptorFactory.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/EmptyInterface.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ExternalizableMixin.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Interceptions.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationPOJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroductionAspect.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/MyAnnotation.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO2.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO2.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence1.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence2.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceAspect1.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor1.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor2.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparePOJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparedPOJO.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/SimpleDynamicCFlow.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/TypedefAspect.java
   trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/VariaPOJO.java
Log:
[JBAS-5757] the annotated tests


Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedAspectFactory.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedAspectFactory.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedAspectFactory.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,84 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Advisor;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.joinpoint.Joinpoint;
+
+/**
+ * AspectFactory annotated with @Aspect.
+ * @author Flavia Rainone
+ */
+ at Aspect (scope = Scope.PER_VM)
+public class AnnotatedAspectFactory implements AspectFactory
+{
+   public static final String NAME = "Annotated Aspect Factory";
+   private static AspectFromFactory aspectCreated = null;
+   
+   public Object createPerVM()
+   {
+      aspectCreated = new AspectFromFactory();
+      return aspectCreated;
+   }
+
+   public Object createPerClass(Advisor advisor)
+   {
+      throw new RuntimeException("Invalid scope PER_CLASS");
+   }
+
+   public Object createPerInstance(Advisor advisor,
+         InstanceAdvisor instanceAdvisor)
+   {
+      throw new RuntimeException("Invalid scope PER_INSTANCE");
+   }
+
+   public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
+   {
+      throw new RuntimeException("Invalid scope PER_JOINPOINT");
+   }
+
+   public Object createPerJoinpoint(Advisor advisor,
+         InstanceAdvisor instanceAdvisor, Joinpoint jp)
+   {
+      throw new RuntimeException("Invalid scope PER_JOINPOINT");
+   }
+
+   public String getName()
+   {
+      return NAME;
+   }
+   
+   public static boolean isAspectCreated()
+   {
+      return aspectCreated != null; 
+   }
+   
+   static AspectFromFactory getAspectCreated()
+   {
+      return aspectCreated;
+   }
+   
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedAspectFactory.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTester.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTester.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTester.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,380 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Advised;
+import org.jboss.aop.Advisor;
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AdviceBinding;
+import org.jboss.aop.advice.AdviceFactory;
+import org.jboss.aop.advice.AspectDefinition;
+
+/**
+ * 
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision$
+ */
+public class AnnotatedTester implements AnnotatedTesterMBean
+{
+  
+     public void testBinding() throws Exception
+   {
+      System.out.println("***** testBinding() ****");
+      AspectPerVM vm = null;
+      AspectPerClass perClass = null;
+      AspectPerClass perClass2 = null;
+
+      try
+      {
+         System.out.println("---- POJO ---");
+         POJO pojo = new POJO();
+         pojo.field++;
+         pojo.someMethod();
+         System.out.println("---- POJO2 ---");
+         POJO2 pojo2 = new POJO2();
+         pojo2.field++;
+         pojo2.someMethod();
+
+         System.out.println("-- get stats --");
+         vm = (AspectPerVM) AspectManager.instance().getPerVMAspect("org.jboss.test.aop.jdk15annotated.AspectPerVM");
+         System.out.println("perVM stats: " + vm.constructorCalled + " " + vm.methodCalled + " " + vm.fieldRead + " " + vm.fieldWrite);
+         assertEquals(2, vm.constructorCalled);
+         assertEquals(2, vm.methodCalled);
+         assertEquals(2, vm.fieldRead);
+         assertEquals(2, vm.fieldWrite);
+
+         Advisor advisor = ((Advised) pojo)._getAdvisor();
+         perClass = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
+         System.out.println("POJO perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
+         assertEquals(1, perClass.constructorCalled);
+         assertEquals(1, perClass.methodCalled);
+         assertEquals(1, perClass.fieldRead);
+         assertEquals(1, perClass.fieldWrite);
+
+         advisor = ((Advised) pojo2)._getAdvisor();
+         perClass2 = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
+         System.out.println("POJO2 perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
+         assertEquals(1, perClass2.constructorCalled);
+         assertEquals(1, perClass2.methodCalled);
+         assertEquals(1, perClass2.fieldRead);
+         assertEquals(1, perClass2.fieldWrite);
+
+         InstanceAdvisor ia = ((Advised) pojo)._getInstanceAdvisor();
+         AspectPerInstance perInstance = (AspectPerInstance) ia.getPerInstanceAspect("org.jboss.test.aop.jdk15annotated.AspectPerInstance");
+         System.out.println("pojo perInstance stats: " + perInstance.methodCalled + " " + perInstance.fieldRead + " " + perInstance.fieldWrite);
+         assertEquals(1, perInstance.methodCalled);
+         assertEquals(1, perInstance.fieldRead);
+         assertEquals(1, perInstance.fieldWrite);
+
+         ia = ((Advised) pojo2)._getInstanceAdvisor();
+         perInstance = (AspectPerInstance) ia.getPerInstanceAspect("org.jboss.test.aop.jdk15annotated.AspectPerInstance");
+         System.out.println("pojo2 perInstance stats: " + perInstance.methodCalled + " " + perInstance.fieldRead + " " + perInstance.fieldWrite);
+         assertEquals(1, perInstance.methodCalled);
+         assertEquals(1, perInstance.fieldRead);
+         assertEquals(1, perInstance.fieldWrite);
+      }
+      finally
+      {
+         if (vm != null) vm.reset();
+         if (perClass != null) perClass.reset();
+         if (perClass2 != null) perClass2.reset();
+      }
+   }
+
+   public void testCompostition() throws Exception
+   {
+      AspectPerVM vm = null;
+      try
+      {
+         System.out.println("***** testCompostition() ****");
+         System.out.println("---- AnotherPOJO ---");
+         AnotherPOJO apojo = new AnotherPOJO();
+         apojo.field++;
+         apojo.someMethod();
+
+         vm = (AspectPerVM) AspectManager.instance().getPerVMAspect("org.jboss.test.aop.jdk15annotated.AspectPerVM");
+         assertEquals(4, vm.anotherPOJOAccess);
+      }
+      finally
+      {
+         if (vm != null) vm.reset();
+      }
+   }
+
+   public void testMixin() throws Exception
+   {
+      System.out.println("***** testMixin() ****");
+      ExternalizableMixin.write = false;
+      ExternalizableMixin.read = false;
+      NoInterfacesPOJO pojo = new NoInterfacesPOJO();
+
+      pojo.stuff = "hello world";
+      java.rmi.MarshalledObject mo = new java.rmi.MarshalledObject(pojo);
+      pojo = (NoInterfacesPOJO)mo.get();
+      System.out.println("deserialized pojo2.stuff2: " + pojo.stuff);
+      assertTrue("writeExternal was not called", ExternalizableMixin.write);
+      assertTrue("readExternal was not called", ExternalizableMixin.read);
+
+      ExternalizableMixin.write = false;
+      ExternalizableMixin.read = false;
+      NoInterfacesPOJO2 pojo2 = new NoInterfacesPOJO2();
+
+      pojo2.stuff = "whatever";
+      java.rmi.MarshalledObject mo2 = new java.rmi.MarshalledObject(pojo2);
+      pojo2 = (NoInterfacesPOJO2)mo2.get();
+      System.out.println("deserialized pojo2.stuff2: " + pojo2.stuff);
+      assertTrue("writeExternal was not called for pojo2", ExternalizableMixin.write);
+      assertTrue("readExternal was not called for pojo2", ExternalizableMixin.read);
+      
+      ComparableMixin.COMPARED = false;
+      ((Comparable<Object>) pojo2).compareTo(null);
+      assertTrue("mixin method was not called", ComparableMixin.COMPARED);
+   }
+
+   public void testIntroduction() throws Exception
+   {
+      System.out.println("***** testIntroduction() ****");
+      NoInterfacesPOJO pojo = new NoInterfacesPOJO();
+
+      try
+      {
+         EmptyInterface eif = (EmptyInterface)pojo;
+      }
+      catch(Exception e)
+      {
+         throw new RuntimeException("pojo does not implement EmptyInterface");
+      }
+
+      NoInterfacesPOJO2 pojo2 = new NoInterfacesPOJO2();
+
+
+      try
+      {
+         EmptyInterface eif = (EmptyInterface)pojo2;
+      }
+      catch(Exception e)
+      {
+         throw new RuntimeException("pojo2 does not implement EmptyInterface");
+      }
+
+   }
+
+   public void testInterceptorDef()throws Exception
+   {
+      System.out.println("***** testInterceptorDef() ****");
+
+      CountingInterceptor.count = 0;
+      VariaPOJO pojo = new VariaPOJO();
+      pojo.methodWithInterceptor();
+      System.out.println("Count: " + CountingInterceptor.count);
+      assertEquals("execution of POJO.methodWithInterceptor() was not intercepted", 1, CountingInterceptor.count);
+
+      CountingInterceptor.count = 0;
+      pojo.methodWithInterceptorFactory();
+      System.out.println("Count: " + CountingInterceptor.count);
+      assertEquals("execution of POJO.methodWithInterceptorFactory() was not intercepted", 1, CountingInterceptor.count);
+   }
+
+   public void testTypedef()throws Exception
+   {
+      System.out.println("***** testTypedef() ****");
+
+      VariaPOJO pojo = new VariaPOJO();
+      pojo.methodWithTypedef();
+      System.out.println("Intercepted: " + TypedefAspect.intercepted);
+      assertTrue("execution of POJO.methodWithTypedef() was not intercepted", TypedefAspect.intercepted);
+   }
+
+   public void testCFlow()throws Exception
+   {
+      System.out.println("***** testCFlow() ****");
+
+      CFlowAspect.cflowAccess = 0;
+
+      VariaPOJO pojo = new VariaPOJO();
+      pojo.cflowMethod1();
+      assertEquals("Wrong number of interceptions 1) for cflow Advice", 1, CFlowAspect.cflowAccess);
+
+      CFlowAspect.cflowAccess = 0;
+      pojo.cflowMethod2();
+      System.out.println("ints: " + CFlowAspect.cflowAccess);
+      assertEquals("Wrong number of interceptions 2) for cflow Advice", 1, CFlowAspect.cflowAccess );
+
+   }
+
+   public void testPrepare()throws Exception
+   {
+      System.out.println("***** testPrepare() ****");
+      PreparePOJO pojo = new PreparePOJO();
+      pojo.someMethod();
+
+      Advised advised = (Advised)pojo;
+      Advisor advisor = advised._getAdvisor();
+   }
+
+   public void testPrepareAtClassLevel() throws Exception
+   {
+      System.out.println("***** testPrepareAtClassLevel() ****");
+      PreparedPOJO pojo = new PreparedPOJO();
+      pojo.someMethod();
+
+      Advised advised = (Advised)pojo;
+      Advisor advisor = advised._getAdvisor();
+   }
+
+   public void testDynamicCFlow()throws Exception
+   {
+      System.out.println("***** testDynamicCFlow() ****");
+
+      CFlowAspect.cflowAccess = 0;
+
+      VariaPOJO pojo = new VariaPOJO();
+      pojo.dynamicCFlowMethod();
+      assertEquals("Wrong number of interceptions for dynamic cflow Advice", 0, CFlowAspect.cflowAccess);
+
+      SimpleDynamicCFlow.execute = true;
+      pojo.dynamicCFlowMethod();
+      assertEquals("Wrong number of interceptions for dynamic cflow Advice", 1, CFlowAspect.cflowAccess);
+
+      SimpleDynamicCFlow.execute = false;
+      pojo.dynamicCFlowMethod();
+      assertEquals("Wrong number of interceptions for dynamic cflow Advice (2)", 1, CFlowAspect.cflowAccess);
+   }
+
+   public void testAnnotationIntroduction() throws Exception
+   {
+      System.out.println("***** testAnnotationIntroduction() ****");
+      IntroducedAnnotationPOJO pojo = new IntroducedAnnotationPOJO();
+      assertNull("IntroducedAnnotationPOJO should not have had a constructor annotation", IntroducedAnnotationInterceptor.lastMyAnnotation);
+
+      pojo.annotationIntroductionMethod();
+      MyAnnotation annotation = IntroducedAnnotationInterceptor.lastMyAnnotation;
+      assertNotNull("IntroducedAnnotationPOJO.annotationIntroductionMethod() should have had a method annotation", annotation);
+      assertEquals("Wrong value for MyAnnotation.string()", "hello", annotation.string());
+      assertEquals("Wrong value for MyAnnotation.integer()", 5, annotation.integer());
+      assertEquals("Wrong value for MyAnnotation.bool()", true, annotation.bool());
+      pojo.noAnnotationIntroductionMethod();
+      assertNull("IntroducedAnnotationPOJO.noAnnotationIntroductionMethod() should not have had a method annotation", IntroducedAnnotationInterceptor.lastMyAnnotation);
+   }
+
+   public void testPrecedence() throws Exception
+   {
+      System.out.println("***** testPrecedence() ****");
+      VariaPOJO pojo = new VariaPOJO();
+
+      pojo.precedenceMethod();
+      java.util.ArrayList intercepted = Interceptions.intercepted;
+      assertEquals("Wrong number of interceptions", 4 ,intercepted.size());
+
+      int precedenceIntercptor1 = intercepted.indexOf("PrecedenceInterceptor1");
+      int precedenceAspect_advice1 = intercepted.indexOf("PrecedenceAspect1.advice1");
+      int precedenceAspect_advice2 = intercepted.indexOf("PrecedenceAspect1.advice2");
+      int precedenceIntercptor2 = intercepted.indexOf("PrecedenceInterceptor2");
+      
+      assertTrue("PrecedenceInterceptor1 must come before PrecedenceInterceptor2 as defined in Precedence1", precedenceIntercptor1 < precedenceIntercptor2);
+      
+      assertEquals("PrecedenceInterceptor2 must be the last element", 3, precedenceIntercptor2);
+      assertTrue("PrecedenceInterceptor.advice2 must come before PrecedenceInterceptor.advice1 as defined in Precedence2", precedenceAspect_advice2 < precedenceAspect_advice1);
+      assertTrue("PrecedenceInterceptor.advice1 must come before PrecedenceInterceptor.advice1 as defined in Precedence2", precedenceAspect_advice1 < precedenceIntercptor2);
+   }
+
+   /**
+    * Tests the annotation of an aspect factory as @Aspect.
+    */
+   public void testAspectFactory() throws Exception
+   {
+      AdviceBinding binding = new AdviceBinding(
+            "execution(void *PreparedPOJO->someMethod(..))", null);
+      AspectDefinition aspectDefinition = AspectManager.instance()
+            .getAspectDefinition(AnnotatedAspectFactory.class.getName());
+      assertNotNull(aspectDefinition);
+      binding.addInterceptorFactory(new AdviceFactory(aspectDefinition,
+            "advice"));
+      AspectManager.instance().addBinding(binding);
+
+      PreparedPOJO pojo = new PreparedPOJO();
+      pojo.someMethod();
+      assertTrue(AnnotatedAspectFactory.isAspectCreated());
+      assertTrue(AnnotatedAspectFactory.getAspectCreated().isAdvised());
+      AspectManager.instance().removeBinding(binding.getName());
+   }
+
+   private void assertEquals(int expected, int current)
+   {
+      assertEquals("Expected value " + expected + ", was " + current, expected, current);
+   }
+
+   private void assertEquals(String output, int expected, int current)
+   {
+     if(expected != current)
+       throw new RuntimeException(output);
+   }
+
+   private void assertEquals(String expected, String current)
+   {
+      assertEquals("Expected value " + expected + ", was " + current, expected, current);
+   }
+
+   private void assertEquals(String output, String expected, String current)
+   {
+     if(!expected.equals(current))
+       throw new RuntimeException(output);
+   }
+
+   private void assertEquals(String output, boolean expected, boolean current)
+   {
+     if(expected != current)
+       throw new RuntimeException(output);
+   }
+
+   private void assertTrue(boolean b)
+   {
+      assertTrue("Expected true", b);
+   }
+
+   private void assertTrue(String output, boolean b)
+   {
+     if(!b)
+       throw new RuntimeException(output);
+   }
+
+   private void assertNotNull(Object o)
+   {
+      assertNotNull("Expected not null", o);
+   }
+
+   private void assertNotNull(String output, Object o)
+   {
+     if(o == null)
+       throw new RuntimeException(output);
+   }
+
+   private void assertNull(String output, Object o)
+   {
+      if(o != null)
+         throw new RuntimeException(output);
+   }
+
+}
+
+

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTesterMBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTesterMBean.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnnotatedTesterMBean.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,46 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ * 
+ * @author <a href="stale.pedersen at jboss.org">Stale W. Pedersen</a>
+ * @version $Revision$
+ */
+public interface AnnotatedTesterMBean
+{
+   void testBinding() throws Exception;
+   void testCompostition() throws Exception;
+   void testMixin() throws Exception;
+   void testIntroduction() throws Exception;
+   void testInterceptorDef()throws Exception;
+   void testTypedef()throws Exception;
+   void testCFlow()throws Exception;
+   void testPrepare()throws Exception;
+   void testPrepareAtClassLevel() throws Exception;
+   void testDynamicCFlow()throws Exception;
+   void testAnnotationIntroduction() throws Exception;
+   void testPrecedence() throws Exception;
+   void testAspectFactory() throws Exception;
+
+}
+ 

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnotherPOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnotherPOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnotherPOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,44 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Kab
+ * Date: 15-Sep-2004
+ * Time: 21:18:26
+ * To change this template use File | Settings | File Templates.
+ */
+public class AnotherPOJO {
+
+   public AnotherPOJO()
+   {
+      System.out.println("AnotherPOJO someMethod()");
+   }
+
+   public int field;
+
+   public void someMethod()
+   {
+      System.out.println("AnotherPOJO someMethod()");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AnotherPOJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectFromFactory.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectFromFactory.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectFromFactory.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,44 @@
+/*
+ * 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.jdk15annotated;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * Aspect generated by AnnotatedAspectFactory.
+ * @author Flavia Rainone
+ */
+public class AspectFromFactory
+{
+   boolean advised = false;
+
+   public Object advice(Invocation invocation) throws Throwable
+   {
+      advised = true;
+      return invocation.invokeNext();
+   }
+
+   public boolean isAdvised()
+   {
+      return advised;
+   }
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectFromFactory.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerClass.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerClass.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerClass.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,83 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Bind;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.joinpoint.ConstructorInvocation;
+import org.jboss.aop.joinpoint.FieldReadInvocation;
+import org.jboss.aop.joinpoint.FieldWriteInvocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 46162 $
+ */
+ at Aspect(scope = Scope.PER_CLASS)
+        public class AspectPerClass
+{
+   public int constructorCalled;
+   public int methodCalled;
+   public int fieldRead;
+   public int fieldWrite;
+
+   @Bind(pointcut = "execution(org.jboss.test.aop.jdk15annotated.POJO*->new())")
+           public Object constructorAdvice(ConstructorInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerClass.constructorAdvice accessing: " + invocation.getConstructor().toString());
+      constructorCalled++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "execution(void org.jboss.test.aop.jdk15annotated.POJO*->someMethod())")
+           public Object methodAdvice(MethodInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerClass.methodAdvice accessing: " + invocation.getMethod().toString());
+      methodCalled++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "set(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+           public Object fieldAdvice(FieldWriteInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerClass.fieldAdvice writing to field: " + invocation.getField().getName());
+      fieldWrite++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "get(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+           public Object fieldAdvice(FieldReadInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerClass.fieldAdvice reading field: " + invocation.getField().getName());
+      fieldRead++;
+      return invocation.invokeNext();
+   }
+
+   public void reset()
+   {
+      constructorCalled = 0;
+      methodCalled = 0;
+      fieldRead = 0;
+      fieldWrite = 0;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerClass.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerInstance.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerInstance.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerInstance.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,65 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Bind;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.joinpoint.FieldReadInvocation;
+import org.jboss.aop.joinpoint.FieldWriteInvocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 46162 $
+ */
+ at Aspect(scope = Scope.PER_INSTANCE)
+        public class AspectPerInstance
+{
+   public int methodCalled;
+   public int fieldRead;
+   public int fieldWrite;
+
+   @Bind(pointcut = "execution(void org.jboss.test.aop.jdk15annotated.POJO*->someMethod())")
+           public Object methodAdvice(MethodInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerInstance.methodAdvice accessing: " + invocation.getMethod().toString());
+      methodCalled++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "set(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+           public Object fieldAdvice(FieldWriteInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerInstance.fieldAdvice writing to field: " + invocation.getField().getName());
+      fieldWrite++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "get(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+           public Object fieldAdvice(FieldReadInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerInstance.fieldAdvice reading field: " + invocation.getField().getName());
+      fieldRead++;
+      return invocation.invokeNext();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerInstance.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerVM.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerVM.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerVM.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,117 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Bind;
+import org.jboss.aop.PointcutDef;
+import org.jboss.aop.Prepare;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.joinpoint.ConstructorInvocation;
+import org.jboss.aop.joinpoint.FieldReadInvocation;
+import org.jboss.aop.joinpoint.FieldWriteInvocation;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+import org.jboss.aop.pointcut.Pointcut;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 62884 $
+ */
+ at Aspect(scope = Scope.PER_VM)
+        public class AspectPerVM
+{
+   public int constructorCalled;
+   public int methodCalled;
+   public int fieldRead;
+   public int fieldWrite;
+   public int anotherPOJOAccess;
+
+   @PointcutDef("execution(org.jboss.test.aop.jdk15annotated.AnotherPOJO->new(..))")
+   public static Pointcut anotherPOJOConstructors;
+
+   @PointcutDef("get(* org.jboss.test.aop.jdk15annotated.AnotherPOJO->field)")
+   public static Pointcut anotherPOJOFieldReads;
+
+   @PointcutDef("set(* org.jboss.test.aop.jdk15annotated.AnotherPOJO->field)")
+   public static Pointcut anotherPOJOFieldWrites;
+
+   @PointcutDef("execution(* org.jboss.test.aop.jdk15annotated.AnotherPOJO->*(..))")
+   public static Pointcut anotherPOJOPublicMethods;
+
+   @PointcutDef("org.jboss.test.aop.jdk15annotated.AspectPerVM.anotherPOJOFieldWrites OR org.jboss.test.aop.jdk15annotated.AspectPerVM.anotherPOJOFieldReads")
+   public static Pointcut anotherPOJOFields;
+
+   @Prepare ("all(org.jboss.test.aop.jdk15annotated.PreparePOJO)")
+   public static Pointcut preparePOJO;
+
+
+   @Bind(pointcut = "execution(org.jboss.test.aop.jdk15annotated.POJO*->new())")
+   public Object constructorAdvice(ConstructorInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerVM.constructorAdvice accessing: " + invocation.getConstructor().toString());
+      constructorCalled++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "execution(void org.jboss.test.aop.jdk15annotated.POJO*->someMethod())")
+   public Object methodAdvice(MethodInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerVM.methodAdvice accessing: " + invocation.getMethod().toString());
+      methodCalled++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "set(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+   public Object fieldAdvice(FieldWriteInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerVM.fieldAdvice writing to field: " + invocation.getField().getName());
+      fieldWrite++;
+      return invocation.invokeNext();
+   }
+
+   @Bind(pointcut = "get(* org.jboss.test.aop.jdk15annotated.POJO*->field)")
+   public Object fieldAdvice(FieldReadInvocation invocation) throws Throwable
+   {
+      System.out.println("AspectPerVM.fieldAdvice reading field: " + invocation.getField().getName());
+      fieldRead++;
+      return invocation.invokeNext();
+   }
+
+    @Bind(pointcut = "org.jboss.test.aop.jdk15annotated.AspectPerVM.anotherPOJOFields OR org.jboss.test.aop.jdk15annotated.AspectPerVM.anotherPOJOConstructors OR org.jboss.test.aop.jdk15annotated.AspectPerVM.anotherPOJOPublicMethods")
+    public Object anotherPOJOAdvice(Invocation invocation) throws Throwable
+    {
+       System.out.println("AspectPerVM.anotherPOJOAdvice");
+       anotherPOJOAccess++;
+       return invocation.invokeNext();
+    }
+
+    public void reset()
+    {
+       constructorCalled = 0;
+       methodCalled = 0;
+       fieldRead = 0;
+       fieldWrite = 0;
+       anotherPOJOAccess = 0;
+    }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/AspectPerVM.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CFlowAspect.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CFlowAspect.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CFlowAspect.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,62 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.*;
+import org.jboss.aop.advice.Scope;
+import org.jboss.aop.joinpoint.*;
+import org.jboss.aop.pointcut.CFlowStack;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ *
+ */
+ at Aspect(scope = Scope.PER_VM)
+public class CFlowAspect
+{
+   public static int cflowAccess;
+
+   @CFlowStackDef (cflows={@CFlowDef(expr = "void org.jboss.test.aop.jdk15annotated.VariaPOJO->cflowMethod1()", called=true), @CFlowDef(expr = "void org.jboss.test.aop.jdk15annotated.VariaPOJO->cflowMethod2()", called=true)})
+   public static CFlowStack cf1And2Stack;
+
+   @CFlowStackDef (cflows={@CFlowDef(expr = "void org.jboss.test.aop.jdk15annotated.VariaPOJO->cflowMethod1()", called=false), @CFlowDef(expr = "void org.jboss.test.aop.jdk15annotated.VariaPOJO->cflowMethod2()", called=true)})
+   public static CFlowStack cfNot1And2Stack;
+
+
+   @org.jboss.aop.Bind (pointcut="execution(void org.jboss.test.aop.jdk15annotated.VariaPOJO*->privateMethod())", cflow="(org.jboss.test.aop.jdk15annotated.CFlowAspect.cf1And2Stack OR org.jboss.test.aop.jdk15annotated.CFlowAspect.cfNot1And2Stack)")
+   public Object cflowAdvice(Invocation invocation) throws Throwable
+   {
+      System.out.println("CFlowAspect.cflowAdvice");
+      cflowAccess++;
+      return invocation.invokeNext();
+   }
+
+   @org.jboss.aop.Bind (pointcut="execution(void org.jboss.test.aop.jdk15annotated.VariaPOJO*->dynamicCFlowMethod())", cflow="org.jboss.test.aop.jdk15annotated.SimpleDynamicCFlow")
+   public Object dynamicCFlowAdvice(Invocation invocation) throws Throwable
+   {
+      System.out.println("CFlowAspect.dynamicCFlowAdvice");
+      cflowAccess++;
+      return invocation.invokeNext();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CFlowAspect.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ComparableMixin.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ComparableMixin.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ComparableMixin.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,38 @@
+/*
+ * 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.jdk15annotated;
+
+/**
+ * Mixin that implements the <code>Comparable</code> interface.
+ * 
+ * @author  <a href="flavia.rainone at jboss.com">Flavia Rainone</a>
+ */
+public class ComparableMixin implements Comparable<Object>
+{
+   static boolean COMPARED = false;
+   
+   public int compareTo(Object o)
+   {
+      COMPARED = true;
+      return 0;
+   }
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ComparableMixin.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptor.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptor.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptor.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,50 @@
+/*
+  * 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.jdk15annotated;
+
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 62884 $
+ */
+ at org.jboss.aop.InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
+ at org.jboss.aop.Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO*->methodWithInterceptor())")
+public class CountingInterceptor implements org.jboss.aop.advice.Interceptor
+{
+
+   public String getName()
+   {
+      return "CountingInterceptor";
+   }
+
+   public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
+   {
+      System.out.println("CountingInterceptor interception: " + invocation.getClass().getName());
+      count++;
+      System.out.println("CountingInterceptor.count:" + count);
+      return invocation.invokeNext();
+   }
+
+   public static int count;
+}
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptor.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptorFactory.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptorFactory.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptorFactory.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,67 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.InstanceAdvisor;
+import org.jboss.aop.advice.AspectFactory;
+import org.jboss.aop.joinpoint.Joinpoint;
+
+/**
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at org.jboss.aop.InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
+ at org.jboss.aop.Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO*->methodWithInterceptorFactory())")
+public class CountingInterceptorFactory implements AspectFactory
+{
+   public Object createPerVM()
+   {
+      return new CountingInterceptor();
+   }
+
+   public Object createPerClass(Advisor advisor)
+   {
+      return new CountingInterceptor();
+   }
+
+   public Object createPerInstance(Advisor advisor, InstanceAdvisor instanceAdvisor)
+   {
+      return new CountingInterceptor();
+   }
+
+   public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
+   {
+      return new CountingInterceptor();
+   }
+
+   public Object createPerJoinpoint(Advisor advisor, InstanceAdvisor instanceAdvisor, Joinpoint jp)
+   {
+      return new CountingInterceptor();
+   }
+
+   public String getName()
+   {
+      return getClass().getName();
+   }
+}
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/CountingInterceptorFactory.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/EmptyInterface.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/EmptyInterface.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/EmptyInterface.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,32 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public interface EmptyInterface
+{
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/EmptyInterface.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ExternalizableMixin.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ExternalizableMixin.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ExternalizableMixin.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,62 @@
+/*
+  * 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.jdk15annotated;
+
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public class ExternalizableMixin implements Externalizable
+{
+   public static boolean read = false;
+   public static boolean write = false;
+
+   NoInterfacesPOJO pojo;
+   
+   public ExternalizableMixin(NoInterfacesPOJO pojo)
+   {
+      System.out.println("ExternalizableMixin constructor");
+      this.pojo = pojo;
+   }
+
+   public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
+   {
+      System.out.println("ExternalizableMixin readExternal");
+      read = true;
+      pojo.stuff = in.readUTF();  
+   }
+   
+   public void writeExternal(ObjectOutput out) throws IOException
+   {
+      System.out.println("ExternalizableMixin writeExternal");
+      write = true;
+      out.writeUTF(pojo.stuff);
+   }
+   
+   
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/ExternalizableMixin.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Interceptions.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Interceptions.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Interceptions.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,51 @@
+/*
+  * 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.jdk15annotated;
+
+import java.util.ArrayList;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 70829 $
+ */
+ at SuppressWarnings({"unused", "unchecked"})
+public class Interceptions
+{
+   static ArrayList intercepted = new ArrayList();
+   
+   public static void add(String name)
+   {
+      System.out.println("Adding (a) " + name);
+      intercepted.add(name);
+   }
+   
+   public static ArrayList getIntercepted()
+   {
+      return intercepted;
+   }
+   
+   public static void reset()
+   {
+      intercepted = new ArrayList();
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationInterceptor.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,77 @@
+/*
+  * 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.jdk15annotated;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.jboss.aop.AnnotationIntroductionDef;
+import org.jboss.aop.Bind;
+import org.jboss.aop.InterceptorDef;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.annotation.AnnotationElement;
+import org.jboss.aop.introduction.AnnotationIntroduction;
+import org.jboss.aop.joinpoint.ConstructorInvocation;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.joinpoint.MethodInvocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 70829 $
+ */
+ at SuppressWarnings({"unused", "unchecked"})
+ at InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
+ at Bind (pointcut="all(org.jboss.test.aop.jdk15annotated.IntroducedAnnotationPOJO)")
+      public class IntroducedAnnotationInterceptor implements Interceptor
+{
+   @AnnotationIntroductionDef (expr="method(* org.jboss.test.aop.jdk15annotated.IntroducedAnnotationPOJO->annotationIntroductionMethod())", invisible=false, annotation="@org.jboss.test.aop.jdk15annotated.MyAnnotation (string='hello', integer=5, bool=true)")
+   public static AnnotationIntroduction annotationIntroduction;
+
+   public static MyAnnotation lastMyAnnotation;
+
+   public String getName()
+   {
+      return "TestAnnotationInterceptor";
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      System.out.println("IntroducedInterceptor");
+      if (invocation instanceof MethodInvocation)
+      {
+         Method method = ((MethodInvocation)invocation).getMethod();
+         System.out.println("executing method " + method.toString());
+         MyAnnotation myAnn = (MyAnnotation)AnnotationElement.getAnyAnnotation(method, MyAnnotation.class);
+         lastMyAnnotation = myAnn;
+      }
+      else if (invocation instanceof ConstructorInvocation)
+      {
+         Constructor constructor = ((ConstructorInvocation)invocation).getConstructor();
+         System.out.println("executing constructor " + constructor);
+         MyAnnotation myAnn = (MyAnnotation)AnnotationElement.getAnyAnnotation(constructor, MyAnnotation.class);
+         lastMyAnnotation = myAnn;
+      }
+
+      return invocation.invokeNext();
+   }
+}

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationPOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationPOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationPOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,46 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public class IntroducedAnnotationPOJO
+{
+   public IntroducedAnnotationPOJO()
+   {
+      System.out.println("IntroducedAnnotationPOJO constructor");
+   }
+
+   public void annotationIntroductionMethod()
+   {
+      System.out.println("IntroducedAnnotationPOJO annotationIntroductionMethod");
+   }
+
+   public void noAnnotationIntroductionMethod()
+   {
+      System.out.println("IntroducedAnnotationPOJO noAnnotationIntroductionMethod");
+   }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroducedAnnotationPOJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroductionAspect.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroductionAspect.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroductionAspect.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,56 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Mixin;
+import org.jboss.aop.Introduction;
+import org.jboss.aop.Aspect;
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 59530 $
+ */
+ at Aspect (scope=org.jboss.aop.advice.Scope.PER_VM)
+public class IntroductionAspect
+{
+   @Mixin (target=org.jboss.test.aop.jdk15annotated.NoInterfacesPOJO.class, interfaces={java.io.Externalizable.class})
+   public static ExternalizableMixin createExternalizableMixin(NoInterfacesPOJO pojo) {
+       return new ExternalizableMixin(pojo);
+   }
+   
+   @Mixin (target=org.jboss.test.aop.jdk15annotated.NoInterfacesPOJO2.class, interfaces={Comparable.class})
+   public static ComparableMixin createComparableMixin() {
+       return new ComparableMixin();
+   }
+   
+   @Introduction (target=org.jboss.test.aop.jdk15annotated.NoInterfacesPOJO.class, interfaces={org.jboss.test.aop.jdk15annotated.EmptyInterface.class})
+   public static Object noInterfacesPOJOIntro;
+
+   @Mixin (typeExpression="has(* *->pojoInterfaces2Method(..))", interfaces={java.io.Externalizable.class}, isTransient=false)
+   public static ExternalizableMixin createExternalizableMixin2(NoInterfacesPOJO pojo) {
+       return new ExternalizableMixin(pojo);
+   }
+   
+   @Introduction (typeExpression="has(* *->pojoInterfaces2Method(..))", interfaces={org.jboss.test.aop.jdk15annotated.EmptyInterface.class})
+   public static Object noInterfacesPOJO2Intro;
+
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/IntroductionAspect.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/MyAnnotation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/MyAnnotation.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/MyAnnotation.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,37 @@
+/*
+  * 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.jdk15annotated;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at Retention (RetentionPolicy.RUNTIME)
+public @interface MyAnnotation {
+   String string();
+   int integer();
+   boolean bool();
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/MyAnnotation.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,32 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public class NoInterfacesPOJO
+{
+   public String stuff;
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO2.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO2.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO2.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,34 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public class NoInterfacesPOJO2 extends NoInterfacesPOJO
+{
+   public void pojoInterfaces2Method()
+   {
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/NoInterfacesPOJO2.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,44 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 46162 $
+ */
+public class POJO
+{
+   public POJO()
+   {
+      System.out.println("POJO empty constructor");
+   }
+
+   public int field;
+
+   public void someMethod()
+   {
+      System.out.println("POJO someMethod");
+   }
+}
+
+
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO2.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO2.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO2.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,44 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 46162 $
+ */
+public class POJO2
+{
+   public POJO2()
+   {
+      System.out.println("POJO2 empty constructor");
+   }
+
+   public int field;
+
+   public void someMethod()
+   {
+      System.out.println("POJO2 someMethod");
+   }
+}
+
+
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/POJO2.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence1.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence1.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence1.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,39 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.PrecedenceInterceptor;
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 62884 $
+ */
+ at org.jboss.aop.Precedence
+public class Precedence1
+{
+   
+   @PrecedenceInterceptor
+   PrecedenceInterceptor1 precedenceInterceptor1;
+
+   @PrecedenceInterceptor
+   PrecedenceInterceptor2 precedenceInterceptor2;
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence1.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence2.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence2.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence2.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,42 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.PrecedenceAdvice;
+import org.jboss.aop.PrecedenceInterceptor;
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 63365 $
+ */
+ at org.jboss.aop.Precedence
+public class Precedence2
+{
+   @PrecedenceAdvice ("advice2")
+   PrecedenceAspect1 advice1;
+
+   @PrecedenceAdvice ("advice1")
+   PrecedenceAspect1 advice2;
+   
+   @PrecedenceInterceptor
+   PrecedenceInterceptor2 precedenceInterceptor2;
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/Precedence2.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceAspect1.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceAspect1.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceAspect1.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,50 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Bind;
+import org.jboss.aop.joinpoint.Invocation;
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at Aspect (scope=org.jboss.aop.advice.Scope.PER_VM)
+public class PrecedenceAspect1
+{
+   @Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO->precedenceMethod())")
+   public Object advice1(Invocation invocation) throws Throwable
+   {
+      Interceptions.add("PrecedenceAspect1.advice1");
+      System.out.println("PrecedenceAspect1.advice1");
+      return invocation.invokeNext();
+   }
+
+   @Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO->precedenceMethod())")
+   public Object advice2(Invocation invocation) throws Throwable
+   {
+      Interceptions.add("PrecedenceAspect1.advice2");
+      System.out.println("PrecedenceAspect1.advice2");
+      return invocation.invokeNext();
+   }
+}
\ No newline at end of file


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceAspect1.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor1.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor1.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor1.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,50 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Bind;
+import org.jboss.aop.InterceptorDef;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
+ at Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO->precedenceMethod())")
+public class PrecedenceInterceptor1 implements Interceptor
+{
+
+   public String getName()
+   {
+      return "PrecedenceInterceptor1";
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      Interceptions.add("PrecedenceInterceptor1");
+      System.out.println("PrecedenceInterceptor1");
+      return invocation.invokeNext();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor1.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor2.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor2.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor2.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,50 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Bind;
+import org.jboss.aop.InterceptorDef;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at InterceptorDef (scope=org.jboss.aop.advice.Scope.PER_VM)
+ at Bind (pointcut="execution(* org.jboss.test.aop.jdk15annotated.VariaPOJO->precedenceMethod())")
+public class PrecedenceInterceptor2 implements Interceptor
+{
+
+   public String getName()
+   {
+      return "PrecedenceInterceptor2";
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      Interceptions.add("PrecedenceInterceptor2");
+      System.out.println("PrecedenceInterceptor2");
+      return invocation.invokeNext();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PrecedenceInterceptor2.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparePOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparePOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparePOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,36 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+public class PreparePOJO
+{
+   public void someMethod()
+   {
+      System.out.println("PreparePOJO someMethod()");
+   }
+}
+


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparePOJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparedPOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparedPOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparedPOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,36 @@
+/*
+  * 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.jdk15annotated;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 62884 $ 
+ */
+ at org.jboss.aop.Prepare ("all(this)")
+public class PreparedPOJO
+{
+   public void someMethod()
+   {
+      System.out.println("PreparedPOJO someMethod");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/PreparedPOJO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/SimpleDynamicCFlow.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/SimpleDynamicCFlow.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/SimpleDynamicCFlow.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,42 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.DynamicCFlowDef;
+import org.jboss.aop.joinpoint.Invocation;
+import org.jboss.aop.pointcut.DynamicCFlow;
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+ */
+ at DynamicCFlowDef
+public class SimpleDynamicCFlow implements DynamicCFlow
+{
+   public static boolean execute = false;
+
+   public boolean shouldExecute(Invocation invocation)
+   {
+      return execute;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/SimpleDynamicCFlow.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/TypedefAspect.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/TypedefAspect.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/TypedefAspect.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -0,0 +1,50 @@
+/*
+  * 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.jdk15annotated;
+
+import org.jboss.aop.Aspect;
+import org.jboss.aop.Bind;
+import org.jboss.aop.TypeDef;
+import org.jboss.aop.pointcut.Typedef;
+import org.jboss.aop.joinpoint.Invocation;
+
+
+/**
+ *
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46162 $
+*/
+ at Aspect (scope=org.jboss.aop.advice.Scope.PER_VM)
+public class TypedefAspect
+{
+   public static boolean intercepted;
+
+   @TypeDef ("class(org.jboss.test.aop.jdk15annotated.VariaPOJO)")
+   public static Typedef myTypedef;
+
+    @Bind (pointcut="execution(* $typedef{org.jboss.test.aop.jdk15annotated.TypedefAspect.myTypedef}->methodWithTypedef())")
+    public Object typedefAdvice(Invocation invocation) throws Throwable
+   {
+      intercepted = true;
+      return invocation.invokeNext();
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/TypedefAspect.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/VariaPOJO.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/VariaPOJO.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/VariaPOJO.java	2008-07-11 08:51:39 UTC (rev 75671)
@@ -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.jdk15annotated;
+
+/**
+*
+* @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+* @version $Revision: 46162 $
+*/
+public class VariaPOJO
+{
+   public void methodWithInterceptor()
+   {
+      System.out.println("POJO methodWithInterceptor");
+   }
+
+   public void methodWithInterceptorFactory()
+   {
+      System.out.println("POJO methodWithInterceptorFactory");
+   }
+
+   public void methodWithTypedef()
+   {
+      System.out.println("POJO methodWithTypedef");
+   }
+   
+   public void cflowMethod1()
+   {
+      System.out.println("POJO cflowMethod1");
+      cflowMethod2();
+   }
+
+   public void cflowMethod2()
+   {
+      System.out.println("POJO cflowMethod2");
+      privateMethod();
+   }
+
+   public void dynamicCFlowMethod()
+   {
+      System.out.println("POJO dynamicCFlowMethod");
+   }
+
+   
+   private void privateMethod()
+   {
+       System.out.println("POJO privateMethod");
+   }
+
+   public void precedenceMethod()
+   {
+      System.out.println("POJO precedenceMethod");
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/aop/jdk15annotated/VariaPOJO.java
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-cvs-commits mailing list