[jboss-cvs] JBossAS SVN: r70909 - in projects/aop/trunk/aop: src/main/org/jboss/aop and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Mar 17 10:07:50 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-03-17 10:07:50 -0400 (Mon, 17 Mar 2008)
New Revision: 70909

Added:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java
Removed:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Advisor.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnotationRepository.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/JoinPointInfo.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Readme.txt
Modified:
   projects/aop/trunk/aop/build-tests-jdk50.xml
   projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
   projects/aop/trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java
Log:
More tests for EJB3 compatibility

Modified: projects/aop/trunk/aop/build-tests-jdk50.xml
===================================================================
--- projects/aop/trunk/aop/build-tests-jdk50.xml	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/build-tests-jdk50.xml	2008-03-17 14:07:50 UTC (rev 70909)
@@ -882,6 +882,7 @@
                <include name="org/jboss/test/aop/unit/assignability/*Test.class"/>
                <exclude name="org/jboss/test/aop/unit/assignability/ParameterizedTypeTest.class"/>
                <exclude name="org/jboss/test/aop/unit/assignability/VariableTargetAlgorithmTest.class"/>
+               <include name="org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.class"/>
             </fileset>
          </batchtest>
       </junit>

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -359,9 +359,9 @@
       if (annotations.isDisabled(annotation))
          return null;
 
-      T value = annotations.resolveTypedClassAnnotation(annotation);
-      if (clazz == null) return null;
-      if (value == null && metadata == null)
+      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
+      T value = (T)annotations.resolveClassAnnotation(annotation);
+      if (value == null && clazz != null && metadata == null)
       {
          value = AnnotationElement.getVisibleAnnotation(clazz, annotation);
       }
@@ -447,7 +447,8 @@
       if (annotations.isDisabled(m,annotation))
          return null;
 
-      T value = annotations.resolveTypedAnnotation(m, annotation);
+      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
+      T value = (T)annotations.resolveAnnotation(m, annotation);
       if (value == null && metadata == null) 
       {
          value = AnnotationElement.getVisibleAnnotation(m, annotation);
@@ -495,7 +496,8 @@
          }
       }
       
-      value = annotations.resolveTypedAnnotation(f, annotation);
+      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
+      value = (T)annotations.resolveAnnotation(f, annotation);
       if (value == null && metadata == null)
       {
          value = AnnotationElement.getVisibleAnnotation(f, annotation);
@@ -522,7 +524,8 @@
          }
       }
       
-      value = annotations.resolveTypedAnnotation(c, annotation);
+      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
+      value = (T)annotations.resolveAnnotation(c, annotation);
       if (value == null && metadata == null)
       {
          value = AnnotationElement.getVisibleAnnotation(c, annotation);

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -100,6 +100,9 @@
       return ann;
    }
 
+   /**
+    * Overridden by EJB3
+    */
    public Object resolveAnnotation(Member m, Class<? extends Annotation> annotation)
    {
       return resolveTypedAnnotation(m, annotation);

Deleted: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Advisor.java	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Advisor.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -1,67 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-/**
- * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class Advisor<T>
-{
-   org.jboss.aop.Advisor advisor = null;
-   Method m;
-   Constructor<?> c;
-   Field f;
-   
-   @SuppressWarnings("unused")
-   public void test()
-   {
-      Class<?> clazz = advisor.getClazz();
-   }
-   
-   public org.jboss.aop.Advisor getAdvisor()
-   {
-      return advisor;
-   }
-   
-   @SuppressWarnings("unchecked")
-   protected Class<? extends T> getBeanClass()
-   {
-      return getAdvisor().getClazz();
-   }
-
-   @SuppressWarnings("unused")
-   public void testResolveAnnotation(Class<? extends Annotation> annotation)
-   {
-      Object o = advisor.resolveAnnotation(annotation);
-      o = advisor.resolveAnnotation(c, annotation);
-      o = advisor.resolveAnnotation(m, annotation);
-      advisor.resolveAnnotation(f, annotation);
-   }
-}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Ann.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public @interface Ann 
+{
+   String value();
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnImpl.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnImpl implements Ann
+{
+   String val;
+   
+   public AnnImpl(String val)
+   {
+      this.val = val;
+   }
+   
+   public String value()
+   {
+      return val;
+   }
+
+   public Class<? extends Annotation> annotationType()
+   {
+      return Ann.class;
+   }
+}

Deleted: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnotationRepository.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnotationRepository.java	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/AnnotationRepository.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -1,46 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-
-/**
- * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class AnnotationRepository extends org.jboss.aop.annotation.AnnotationRepository
-{
-
-   public <A extends Annotation> A resolveAnnotation(Class<?> cls, Class<A> annotationType)
-   {
-      return null;
-   }
-   
-   public <A extends Annotation> A resolveAnnotation(Class<?> cls, Member member, Class<A> annotationType)
-   {
-      return null;
-   }
-
-}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/EJB3CompatibilityTestCase.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.AspectManager;
+
+import junit.framework.TestCase;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class EJB3CompatibilityTestCase extends TestCase
+{
+   public void testAnnotationRepository() throws Exception
+   {
+      @SuppressWarnings("unchecked")
+      TestAdvisor advisor = new TestAdvisor("XXX", AspectManager.instance());
+      Ann ann = (Ann)advisor.resolveAnnotation(Ann.class);
+      assertNotNull(ann);
+      assertEquals("Clazz", ann.value());
+      
+      Method m = this.getClass().getMethods()[0];
+      ann = (Ann)advisor.resolveAnnotation(m, Ann.class);
+      assertNotNull(ann);
+      assertEquals("Member", ann.value());
+   }
+}

Deleted: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/JoinPointInfo.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/JoinPointInfo.java	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/JoinPointInfo.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -1,45 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source.
-* Copyright 2006, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
-
-import java.lang.reflect.Method;
-
-import org.jboss.aop.advice.Interceptor;
-
-/**
- * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class JoinPointInfo
-{
-   org.jboss.aop.MethodInfo info;
-   @SuppressWarnings("unused")
-   public void test()
-   {
-      Interceptor[] interceptor = info.interceptors;
-      Method method = info.unadvisedMethod;
-   }
-   
-   
-}

Deleted: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Readme.txt
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Readme.txt	2008-03-17 13:23:59 UTC (rev 70908)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/Readme.txt	2008-03-17 14:07:50 UTC (rev 70909)
@@ -1 +0,0 @@
-This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
\ No newline at end of file

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAdvisor.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import org.jboss.aop.AspectManager;
+import org.jboss.aop.ClassContainer;
+
+/**
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAdvisor<T> extends ClassContainer
+{
+   public TestAdvisor(String name, AspectManager manager)
+   {
+      super(name, manager);
+      super.annotations = new TestAnnotationRepository();
+   }
+
+   org.jboss.aop.Advisor advisor = null;
+   Method m;
+   Constructor<?> c;
+   Field f;
+   
+   @SuppressWarnings("unused")
+   public void test()
+   {
+      Class<?> clazz = advisor.getClazz();
+   }
+   
+   public org.jboss.aop.Advisor getAdvisor()
+   {
+      return advisor;
+   }
+   
+   @SuppressWarnings("unchecked")
+   protected Class<? extends T> getBeanClass()
+   {
+      return getAdvisor().getClazz();
+   }
+
+   @SuppressWarnings("unused")
+   public void testResolveAnnotation(Class<? extends Annotation> annotation)
+   {
+      Object o = advisor.resolveAnnotation(annotation);
+      o = advisor.resolveAnnotation(c, annotation);
+      o = advisor.resolveAnnotation(m, annotation);
+      advisor.resolveAnnotation(f, annotation);
+   }
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestAnnotationRepository.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Member;
+
+import org.jboss.aop.annotation.AnnotationRepository;
+
+/**
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestAnnotationRepository extends AnnotationRepository
+{
+
+   @Override
+   public Object resolveClassAnnotation(Class<? extends Annotation> annotation)
+   {
+      return new AnnImpl("Clazz");
+   }
+
+   @SuppressWarnings("unchecked")
+   public Object resolveAnnotation(Member m, Class annotation)
+   {
+      return new AnnImpl("Member");
+   }
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/ejb3dependencies/TestJoinPointInfo.java	2008-03-17 14:07:50 UTC (rev 70909)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.ejb3dependencies;
+
+import java.lang.reflect.Method;
+
+import org.jboss.aop.advice.Interceptor;
+
+/**
+ * This test is not currently meant to run. It is there to ensure that we don't break EJB3's dependencies
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestJoinPointInfo
+{
+   org.jboss.aop.MethodInfo info;
+   @SuppressWarnings("unused")
+   public void test()
+   {
+      Interceptor[] interceptor = info.interceptors;
+      Method method = info.unadvisedMethod;
+   }
+   
+   
+}




More information about the jboss-cvs-commits mailing list