[jboss-cvs] JBossAS SVN: r74352 - in projects/aop/trunk/aop/src: main/org/jboss/aop/proxy/container and 4 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 10 08:07:27 EDT 2008


Author: kabir.khan at jboss.com
Date: 2008-06-10 08:07:27 -0400 (Tue, 10 Jun 2008)
New Revision: 74352

Added:
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/JoinPointComparatorTestCase.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/MockJoinPointInfo.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/POJO.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/TestInterceptor.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotation.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotationImpl.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotation.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotationImpl.java
Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
   projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java
   projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java
   projects/aop/trunk/aop/src/main/org/jboss/aop/util/JoinPointComparator.java
   projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java
Log:
[JBAOP-593] In case of metadata at instance level or below, we should only create a proxy if that metadata causes more aspects to be bound

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-06-10 11:09:20 UTC (rev 74351)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/Advisor.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -1543,21 +1543,28 @@
       }
    }
    
-   public boolean hasSameMethodAspects(Advisor other)
+   public boolean hasSameMethodAspectLength(Advisor other)
    {
-      long[] keys = this.methodInfos.infos.keys();
-      for (int i = 0 ; i < keys.length ; i++)
+      if (this.getClazz() != other.getClazz())
       {
-         MethodInfo myInfo = this.getMethodInfo(keys[i]);
-         MethodInfo otherInfo = other.getMethodInfo(keys[i]);
-         
-        if (!JoinPointComparator.hasSameChains(myInfo, otherInfo))
-        {
-           return false;
-        }
+         throw new IllegalArgumentException("The advisors must be of the same type. Mine: " + 
+               this.getClazz().getName() + "; other: " + other.getClazz().getName());
       }
-      return true;
+      
+      long[] myKeys = this.methodInfos.infos.keys();
+      long[] otherKeys = other.methodInfos.keys();
+      return JoinPointComparator.hasSameMethodAspectLength(myKeys, otherKeys, this, other);
    }
    
-
+   public boolean hasSameConstructorAspectLength(Advisor other)
+   {
+      if (this.getClazz() != other.getClazz())
+      {
+         throw new IllegalArgumentException("The advisors must be of the same type. Mine: " + 
+               this.getClazz().getName() + "; other: " + other.getClazz().getName());
+      }
+      ConstructorInfo[] myInfos = this.getConstructorInfos();
+      ConstructorInfo[] otherInfos = other.getConstructorInfos();
+      return JoinPointComparator.hasSameConstructorAspectLength(myInfos, otherInfos);
+   }
 }
\ No newline at end of file

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java	2008-06-10 11:09:20 UTC (rev 74351)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -287,6 +287,36 @@
          instanceContainer = InstanceProxyContainer.createInstanceProxyContainer(classAdvisor, introduction, metaData);
       }
    }
+   
+   public boolean hasMoreAdvicesOrIntroductionsForInstance()
+   {
+      if (classAdvisor == null)
+      {
+         throw new IllegalStateException("initialise() must be called first");
+      }
+      
+      if (instanceContainer == null)
+      {
+         return false;
+      }
+      
+      if (!classAdvisor.hasSameMethodAspectLength(instanceContainer))
+      {
+         return true;
+      }
+      
+      if (!classAdvisor.hasSameConstructorAspectLength(instanceContainer))
+      {
+         return true;
+      }
+      
+      if (instanceContainer.getInterfaceIntroductions().size() > classAdvisor.getInterfaceIntroductions().size())
+      {
+         return true;
+      }
+      return false;
+   }
+   
 }
 
 

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java	2008-06-10 11:09:20 UTC (rev 74351)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -108,13 +108,27 @@
                params.setContainerCache(cache); 
             }
 
-            if (!cache.hasAspects() && !cache.requiresInstanceAdvisor())
+            boolean hasMoreAdvicesOrIntroductionsForInstance = cache.hasMoreAdvicesOrIntroductionsForInstance();
+            
+            if (!cache.hasAspects() && !hasMoreAdvicesOrIntroductionsForInstance)
             {
                return params.getTarget();
             }
             else
             {
-               proxyClass = generateProxy(params);
+               boolean needsProxy = false;
+               if (isAdvised && hasMoreAdvicesOrIntroductionsForInstance)
+               {
+                  needsProxy = true;
+               }
+               else
+               {
+                  needsProxy = true;
+               }
+               if (needsProxy)
+               {
+                  proxyClass = generateProxy(params);
+               }
             }
          }
 

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/util/JoinPointComparator.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/util/JoinPointComparator.java	2008-06-10 11:09:20 UTC (rev 74351)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/util/JoinPointComparator.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -21,7 +21,19 @@
 */ 
 package org.jboss.aop.util;
 
+import java.lang.reflect.Constructor;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.aop.Advisor;
+import org.jboss.aop.ConstructorInfo;
 import org.jboss.aop.JoinPointInfo;
+import org.jboss.aop.MethodInfo;
+import org.jboss.aop.advice.Interceptor;
 
 /**
  * 
@@ -30,69 +42,232 @@
  */
 public class JoinPointComparator
 {
-   public static boolean hasSameChains(JoinPointInfo myInfo, JoinPointInfo otherInfo)
+   public static long[] mergeMethodInfoKeys(long[] myKeys, long[] otherKeys)
    {
-      if (myInfo != null && otherInfo != null)
+      long[] allKeys = null;
+      
+      if (myKeys == null || myKeys.length == 0)
       {
-         if (!hasSameInterceptors(myInfo, otherInfo))
+         allKeys = otherKeys;
+         Arrays.sort(allKeys);
+      }
+      else if (otherKeys == null || otherKeys.length == 0)
+      {
+         allKeys = myKeys;
+         Arrays.sort(allKeys);
+      }
+      else
+      {
+         allKeys = new long[myKeys.length + otherKeys.length];
+         System.arraycopy(myKeys, 0, allKeys, 0, myKeys.length);
+         System.arraycopy(otherKeys, 0, allKeys, myKeys.length, otherKeys.length);
+         Arrays.sort(allKeys);
+         
+         boolean haveDups = false;
+         int i = 0;
+         int peek = 1;
+         int dup = allKeys.length;
+         for ( ; peek < allKeys.length; i++, peek++)
          {
-            return false;
+            if (allKeys[i] == allKeys[peek])
+            {
+               if (!haveDups)
+               {
+                  dup = peek;
+                  haveDups = true;
+               }  
+            }
+            else if (haveDups)
+            {
+                  allKeys[dup++] = allKeys[peek];
+            }
          }
-         if (!hasSameInterceptorChains(myInfo, otherInfo))
+         
+         if (dup != allKeys.length)
          {
-            return false;
+            long[] deduped = new long[dup];
+            System.arraycopy(allKeys, 0, deduped, 0, dup);
+            allKeys = deduped;
          }
       }
+      
+      return allKeys;
+   }   
+   
+   public static int hasSameInterceptorLengths(JoinPointInfo myInfo, JoinPointInfo otherInfo)
+   {
+      if (myInfo != null && otherInfo != null)
+      {
+         if (myInfo.getInterceptors() != null && otherInfo.getInterceptors() != null)
+         {
+            int i = compareLengths(getLengthNullAsZero(myInfo), getLengthNullAsZero(otherInfo));
+            if (i != 0)
+            {
+               return i;
+            }
+         }
+      }
       else if (myInfo == null && otherInfo == null)
       {
          //same
       }
       else
       {
-         return false;
+         if (myInfo == null)
+         {
+            if (getLengthNullAsZero(otherInfo) > 0)
+            {
+               return 1;
+            }
+         }
+         else
+         {
+            if (getLengthNullAsZero(myInfo) > 0)
+            {
+               return -1;
+            }
+         }
       }
-
-      return true;
+      return 0;
    }
    
-   public static boolean hasSameInterceptors(JoinPointInfo myInfo, JoinPointInfo otherInfo)
+   public static boolean hasSameMethodAspectLength(long[] myKeys, long[] otherKeys, Advisor myAdvisor, Advisor otherAdvisor)
    {
-      if (myInfo.getInterceptors() != null && otherInfo.getInterceptors() != null)
+      long[] keys = JoinPointComparator.mergeMethodInfoKeys(myKeys, otherKeys);
+      
+      for (int i = 0 ; i < keys.length ; i++)
       {
-         if (myInfo.getInterceptors().length != otherInfo.getInterceptors().length)
+         MethodInfo myInfo = myAdvisor.getMethodInfo(keys[i]);
+         MethodInfo otherInfo = otherAdvisor.getMethodInfo(keys[i]);
+         
+         if (JoinPointComparator.hasSameInterceptorLengths(myInfo, otherInfo) != 0)
          {
             return false;
          }
-         else if (myInfo.getInterceptors() == null && otherInfo.getInterceptors() == null)
+         
+      }
+      return true;
+
+   }
+   
+   
+   public static boolean hasSameConstructorAspectLength(ConstructorInfo[] myInfos, ConstructorInfo[] otherInfos)
+   {
+      //TODO: GeneratedAdvisor weaving might only be including infos for the woven constructors? 
+      Map<Constructor<?>, ConstructorInfo> myMap = createConstructorInfoMap(myInfos);
+      Map<Constructor<?>, ConstructorInfo> otherMap = createConstructorInfoMap(otherInfos);
+      
+      if (myMap.size() == 0 && otherMap.size() == 0)
+      {
+         return true;
+      }
+      else if (myMap.size() == 0 && otherMap.size() > 0)
+      {
+         if (hasNonNullInfos(otherInfos))
          {
-            //same
+            return false;
          }
-         else
+      }
+      else if (myMap.size() > 0 && otherMap.size() == 0)
+      {
+         if (hasNonNullInfos(myInfos))
          {
             return false;
          }
       }
-      return true;
-   }
-
-   public static boolean hasSameInterceptorChains(JoinPointInfo myInfo, JoinPointInfo otherInfo)
-   {
-      if (myInfo.getInterceptorChain() != null && otherInfo.getInterceptorChain() != null)
+      else
       {
-         if (myInfo.getInterceptorChain().size() != otherInfo.getInterceptorChain().size())
+         Set<ConstructorInfo> nonMatches = new HashSet<ConstructorInfo>();
+         for (Constructor<?> ctor : myMap.keySet())
          {
-            return false;
+            ConstructorInfo myInfo = myMap.get(ctor);
+            ConstructorInfo otherInfo = otherMap.remove(ctor);
+            if (otherInfo != null)
+            {
+               int i = compareLengths(getLengthNullAsZero(myInfo), getLengthNullAsZero(otherInfo));
+               if (i != 0)
+               {
+                  return false;
+               }  
+            }
+            else
+            {
+               nonMatches.add(myInfo);
+            }
          }
-         else if (myInfo.getInterceptorChain() == null && otherInfo.getInterceptorChain() == null)
+         if (otherMap.size() > 0 && hasNonNullInfos(otherMap.values()))
          {
-            //same
+            return false;
          }
-         else
+         if (nonMatches.size() > 0 && hasNonNullInfos(nonMatches))
          {
             return false;
          }
       }
+
       return true;
    }
-
+   
+   private static Map<Constructor<?>, ConstructorInfo> createConstructorInfoMap(ConstructorInfo[] infos)
+   {
+      if (infos == null || infos.length == 0)
+      {
+         return UnmodifiableEmptyCollections.EMPTY_HASHMAP;
+      }
+      Map<Constructor<?>, ConstructorInfo> map = new HashMap<Constructor<?>, ConstructorInfo>(infos.length);
+      for (ConstructorInfo info : infos)
+      {
+         map.put(info.getConstructor(), info);
+      }
+      return map;
+   }
+   
+   private static boolean hasNonNullInfos(JoinPointInfo[] infos)
+   {
+      if (infos.length > 0)
+      {
+         for (JoinPointInfo info : infos)
+         {
+            if (getLengthNullAsZero(info) > 0)
+            {
+               return true;
+            }
+               
+         }
+      }
+      return false;
+   }
+   
+   private static boolean hasNonNullInfos(Collection<ConstructorInfo> infos)
+   {
+      if (infos.size() > 0)
+      {
+         for (JoinPointInfo info : infos)
+         {
+            if (getLengthNullAsZero(info) > 0)
+            {
+               return true;
+            }
+               
+         }
+      }
+      return false;
+   }
+   
+   private static int compareLengths(int mine, int other)
+   {
+      if (mine > other) return -1;
+      if (mine == other) return 0;
+      return 1;
+   }
+   
+   private static int getLengthNullAsZero(JoinPointInfo info)
+   {
+      Interceptor[] icptrs = info.getInterceptors(); 
+      if (icptrs == null)
+      {
+         return 0;
+      }
+      return icptrs.length;
+   }
 }

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/JoinPointComparatorTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/JoinPointComparatorTestCase.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/JoinPointComparatorTestCase.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,361 @@
+/*
+  * 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.joinpointcomparator;
+
+
+import java.lang.reflect.Constructor;
+import java.util.Arrays;
+
+import org.jboss.aop.ConstructorInfo;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.util.JoinPointComparator;
+import org.jboss.test.aop.AOPTestWithSetup;
+
+
+import junit.framework.AssertionFailedError;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+/**
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision: 70829 $
+ */
+public class JoinPointComparatorTestCase extends AOPTestWithSetup
+{
+
+   private static final Constructor<?> CTOR1;
+   private static final Constructor<?> CTOR2;
+   private static final Constructor<?> CTOR3;
+   static
+   {
+      try
+      {
+         CTOR1 = POJO.class.getConstructor();
+         CTOR2 = POJO.class.getConstructor(Integer.TYPE);
+         CTOR3 = POJO.class.getConstructor(Long.TYPE);
+      }
+      catch (SecurityException e)
+      {
+         // AutoGenerated
+         throw new RuntimeException(e);
+      }
+      catch (NoSuchMethodException e)
+      {
+         // AutoGenerated
+         throw new RuntimeException(e);
+      }
+   }
+   
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("JoinPointComparatorTestCase");
+      suite.addTestSuite(JoinPointComparatorTestCase.class);
+      return suite;
+   }
+
+   public JoinPointComparatorTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public void testMergeMethodKeys()
+   {
+      {
+         long[] l1 = new long[] {4, 3, 2, 1};
+         long[] l2 = new long[] {4, 3, 2, 1};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {4, 3, 2, 1};
+         long[] l2 = new long[] {};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {};
+         long[] l2 = new long[] {4, 3, 2, 1};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {4, 3, 2, 1};
+         long[] l2 = null;
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = null;
+         long[] l2 = new long[] {4, 3, 2, 1};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {4, 3, 2, 1};
+         long[] l2 = new long[] {1};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {4};
+         long[] l2 = new long[] {4, 3, 2, 1};
+         assertArray(new long[]{1, 2, 3, 4}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {4, 3, 2, 1};
+         long[] l2 = new long[] {1, 5};
+         assertArray(new long[]{1, 2, 3, 4, 5}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      {
+         long[] l1 = new long[] {5, 4};
+         long[] l2 = new long[] {4, 3, 2,1};
+         assertArray(new long[]{1, 2, 3, 4, 5}, JoinPointComparator.mergeMethodInfoKeys(l1, l2));
+      }      
+      
+      
+   }
+
+   public void testEqualInterceptors()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo(new TestInterceptor());
+      MockJoinPointInfo b = new MockJoinPointInfo(new TestInterceptor());
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(a, b));
+   }
+   
+   public void testBothNullInterceptors()
+   {
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(null, null));      
+   }
+
+   public void testBothZeroLengthChains()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo();
+      assertNotNull(a.getInterceptors());
+      MockJoinPointInfo b = new MockJoinPointInfo();
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(a, b));
+   }
+   
+   public void testBothNullChains()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo();
+      a.setInterceptors(null);
+      MockJoinPointInfo b = new MockJoinPointInfo();
+      a.setInterceptors(null);
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(a, b));
+   }
+   
+   public void testNotEqualInterceptorsA()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo(new TestInterceptor(), new TestInterceptor());
+      MockJoinPointInfo b = new MockJoinPointInfo(new TestInterceptor());
+      assertEquals(-1, JoinPointComparator.hasSameInterceptorLengths(a, b));
+   }
+   
+   public void testNotEqualInterceptorsB()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo(new TestInterceptor());
+      MockJoinPointInfo b = new MockJoinPointInfo(new TestInterceptor(), new TestInterceptor());
+      assertEquals(1, JoinPointComparator.hasSameInterceptorLengths(a, b));
+   }
+   
+   public void testNullA()
+   {
+      MockJoinPointInfo a = null;
+      MockJoinPointInfo b = new MockJoinPointInfo(new TestInterceptor());
+      assertEquals(1, JoinPointComparator.hasSameInterceptorLengths(a, b));      
+   }
+   
+   public void testNullB()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo(new TestInterceptor());
+      MockJoinPointInfo b = null;
+      assertEquals(-1, JoinPointComparator.hasSameInterceptorLengths(a, b));      
+   }
+
+   public void testNullAZeroLengthB()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo();
+      a.setInterceptors(null);
+      MockJoinPointInfo b = new MockJoinPointInfo();
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(a, b));      
+      
+   }
+
+   public void testNullBZeroLengthA()
+   {
+      MockJoinPointInfo a = new MockJoinPointInfo();
+      MockJoinPointInfo b = new MockJoinPointInfo();
+      b.setInterceptors(null);
+      assertEquals(0, JoinPointComparator.hasSameInterceptorLengths(a, b));      
+   }
+
+   public void testEqualConstructorChains()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR3, 3, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 3, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertTrue(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testDifferentConstructorLengthsAEqualChains()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 0, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+   
+      assertTrue(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testDifferentConstructorLengthsAEqualChainsNull()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 0, true),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertTrue(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testDifferentConstructorLengthsBEqualChains()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 0, false),
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertTrue(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testDifferentConstructorLengthsBEqualChainsNull()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 0, true),
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertTrue(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testDifferentConstructorChains()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR1, 1, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR3, 4, false)};
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 3, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertFalse(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   
+   public void testNullConstructorChainA()
+   {
+      ConstructorInfo[] a = null;
+      
+      ConstructorInfo[] b = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 3, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      assertFalse(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   public void testNullConstructorChainB()
+   {
+      ConstructorInfo[] a = new ConstructorInfo[] {
+            createConstructorInfo(CTOR3, 3, false),
+            createConstructorInfo(CTOR2, 2, false),
+            createConstructorInfo(CTOR1, 1, false)};
+      
+      ConstructorInfo[] b = null;
+      
+      assertFalse(JoinPointComparator.hasSameConstructorAspectLength(a, b));
+   }
+   
+   private void assertArray(long[] expected, long[] actual)
+   {
+      if (expected.length != actual.length)
+      {
+         throw new AssertionFailedError("Expected " + Arrays.asList(expected) + " had " + Arrays.asList(actual));
+      }
+      
+      for (int i = 0 ; i < expected.length ; i++)
+      {
+         if (expected[i] != actual[i])
+         {
+            throw new AssertionFailedError("Expected " + Arrays.asList(expected) + " had " + Arrays.asList(actual));
+         }
+      }
+   }
+      
+   private ConstructorInfo createConstructorInfo(Constructor<?> ctor, int length, boolean nullIcptrs)
+   {
+      ConstructorInfo info = new ConstructorInfo();
+      info.setConstructor(ctor);
+      if (length > 0 && nullIcptrs)
+      {
+         throw new IllegalStateException("Cannot have both 0 length and null interceptors");
+      }
+      if (nullIcptrs)
+      {
+         info.setInterceptors(null);
+      }
+      else
+      {
+         Interceptor[] interceptors = new Interceptor[length];
+         for (int i = 0 ; i < length ; i++)
+         {
+            interceptors[i] = new TestInterceptor();
+         }
+         info.setInterceptors(interceptors);   
+      }
+      return info;
+   }
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/MockJoinPointInfo.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/MockJoinPointInfo.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/MockJoinPointInfo.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,52 @@
+/*
+* 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.joinpointcomparator;
+
+import org.jboss.aop.JoinPointInfo;
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Joinpoint;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class MockJoinPointInfo extends JoinPointInfo
+{
+   public MockJoinPointInfo(Interceptor...interceptors)
+   {
+      super.setInterceptors(interceptors);
+   }
+   
+   @Override
+   public JoinPointInfo copy()
+   {
+      return null;
+   }
+
+   @Override
+   protected Joinpoint internalGetJoinpoint()
+   {
+      return null;
+   }
+
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/POJO.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/POJO.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/POJO.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,34 @@
+/*
+* 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.joinpointcomparator;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+   public POJO(){}
+   public POJO(int i){}
+   public POJO(long l){}
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/TestInterceptor.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/TestInterceptor.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/joinpointcomparator/TestInterceptor.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -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.joinpointcomparator;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestInterceptor implements Interceptor
+{
+
+   public String getName()
+   {
+      return null;
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      return null;
+   }
+
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotation.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotation.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotation.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,35 @@
+/*
+* 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.proxy;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface OtherAnnotation {
+
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotationImpl.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotationImpl.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/OtherAnnotationImpl.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,41 @@
+/*
+* 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.proxy;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class OtherAnnotationImpl implements OtherAnnotation
+{
+
+   public Class<? extends Annotation> annotationType()
+   {
+      return OtherAnnotation.class;
+   }
+   
+   
+
+}

Modified: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java	2008-06-10 11:09:20 UTC (rev 74351)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/ProxyTestCase.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -24,6 +24,7 @@
 import java.io.Externalizable;
 import java.io.InputStream;
 import java.io.Serializable;
+import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.rmi.MarshalledObject;
 
@@ -50,6 +51,13 @@
 import org.jboss.aop.proxy.container.ContainerProxyFactory;
 import org.jboss.aop.proxy.container.Delegate;
 import org.jboss.aop.proxy.container.GeneratedAOPProxyFactory;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.plugins.repository.basic.BasicMetaDataRepository;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge;
+import org.jboss.metadata.spi.scope.CommonLevels;
+import org.jboss.metadata.spi.scope.ScopeKey;
 import org.jboss.test.aop.AOPTestWithSetup;
 
 import junit.framework.Test;
@@ -366,17 +374,6 @@
    @SuppressWarnings("unchecked")
    public void testAnnotationsExistInProxy() throws Exception
    {
-      //THis test fails if we run with jboss retro
-      try
-      {
-         Class.forName("org.jboss.lang.ClassRedirects");
-         System.out.println("IGNORING TEST ON JDK 1.4");
-         return;
-      }
-      catch(Exception ignoreWeAreRunningWithJDK5)
-      {
-      }  
-      
       AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
       params.setInterfaces(new Class[]{SomeInterface.class});
       params.setTarget(new AnnotatedPOJO());
@@ -392,19 +389,105 @@
       checkExpectedAnnotations(proxyClass);
    }
    
-    private void checkExpectedAnnotations(Class<?> clazz) throws Exception
+   public void testProxyWithMetaData() throws Exception
    {
-      Annotation ann = clazz.getAnnotation(Annotation.class);
+      AspectManager manager = AspectManager.instance();
+      AspectDefinition def = new AspectDefinition("aspect", Scope.PER_INSTANCE, new GenericAspectFactory(TestInterceptor.class.getName(), null));
+      AdviceFactory advice = new AdviceFactory(def, "invoke");
+      PointcutExpression pointcut = new PointcutExpression("pointcut", "execution(* " + Annotation.class.getName() + "->*(..))");
+      InterceptorFactory[] interceptors = {advice};
+      AdviceBinding binding = new AdviceBinding("binding", pointcut, null, null, interceptors);
+      try
+      {
+         manager.addAspectDefinition(def);
+         manager.addInterceptorFactory(advice.getName(), advice);
+         manager.addPointcut(pointcut);
+         manager.addBinding(binding);
+         
+         AOPProxyFactoryParameters params = new AOPProxyFactoryParameters();
+         params.setTarget(new POJO());
+         
+         GeneratedAOPProxyFactory factory = new GeneratedAOPProxyFactory();
+         POJO plain = (POJO)factory.createAdvisedProxy(params);
+         
+         assertFalse(plain instanceof AspectManaged);
+         
+         MetaData someAnnMD = setupMetaData(POJO.class, new SomeAnnotationImpl());
+         params.setMetaData(someAnnMD);
+         params.setMetaDataHasInstanceLevelData(true);
+         params.setContainerCache(null);
+         POJO instanceAnnotationWithNoBindings = (POJO)factory.createAdvisedProxy(params);
+         assertFalse(instanceAnnotationWithNoBindings instanceof AspectManaged);
+         
+         MetaData annMD = setupMetaData(POJO.class, new AnnotationImpl());
+         params.setMetaData(annMD);
+         params.setMetaDataHasInstanceLevelData(true);
+         params.setContainerCache(null);
+         POJO instanceAnnotationWithBindings = (POJO)factory.createAdvisedProxy(params);
+         assertFalse(instanceAnnotationWithBindings instanceof AspectManaged);
+         assertTrue(TestInterceptor.invoked);
+
+         InterfaceIntroduction intro = new InterfaceIntroduction("intro", "@" + SomeAnnotation.class.getName(), new String[] {SomeInterface.class.getName()});
+         manager.addInterfaceIntroduction(intro);
+         params.setMetaData(someAnnMD);
+         params.setContainerCache(null);
+         POJO introduced = (POJO)factory.createAdvisedProxy(params);
+         assertTrue(introduced instanceof AspectManaged);
+         assertTrue(introduced instanceof SomeInterface);
+      }
+      finally
+      {
+         manager.removeBinding("binding");
+         manager.removePointcut("pointcut");
+         manager.removeInterceptorFactory("aspect");
+         manager.removeInterfaceIntroduction("intro");
+      }
+   }
+   
+   private MetaData setupMetaData(Class<?> clazz, Annotation...annotations) 
+   {
+      MutableMetaDataRepository repository = new BasicMetaDataRepository();
+      
+      ScopeKey scopeKey = ScopeKey.DEFAULT_SCOPE.clone();
+      scopeKey.addScope(CommonLevels.INSTANCE, "Test");
+      scopeKey.addScope(CommonLevels.CLASS, clazz.getName());
+      scopeKey.addScope(CommonLevels.WORK, String.valueOf(hashCode()));
+      ScopeKey mutableScope = new ScopeKey(CommonLevels.INSTANCE, "Test".toString());
+      MemoryMetaDataLoader mutable = new MemoryMetaDataLoader(mutableScope);
+      repository.addMetaDataRetrieval(mutable);
+      addClassAnnotations(clazz, mutable, annotations);
+      
+      MetaData metadata = new MetaDataRetrievalToMetaDataBridge(mutable); 
+      
+      return metadata;
+   }
+   
+   private void addClassAnnotations(Class<?> clazz, MemoryMetaDataLoader mutable, Annotation[] extraAnnotations)
+   {
+      Annotation[] anns = clazz.getAnnotations();
+      for (Annotation ann : anns)
+      {
+         mutable.addAnnotation(ann);
+      }
+      for (Annotation ann : extraAnnotations)
+      {
+         mutable.addAnnotation(ann);
+      }
+   }
+   
+   private void checkExpectedAnnotations(Class<?> clazz) throws Exception
+   {
+      org.jboss.test.aop.proxy.Annotation ann = clazz.getAnnotation(org.jboss.test.aop.proxy.Annotation.class);
       assertNotNull(ann);
 
       Method getter = clazz.getMethod("getX");
-      assertNotNull(getter.getAnnotation(Annotation.class));
+      assertNotNull(getter.getAnnotation(org.jboss.test.aop.proxy.Annotation.class));
       
       Method setter = clazz.getMethod("setX", Object.class);
-      assertNotNull(setter.getAnnotation(Annotation.class));
+      assertNotNull(setter.getAnnotation(org.jboss.test.aop.proxy.Annotation.class));
       assertEquals(1, setter.getParameterTypes().length);
       assertEquals(1, setter.getParameterAnnotations().length);
       assertEquals(1, setter.getParameterAnnotations()[0].length);
-      assertEquals(Annotation.class, setter.getParameterAnnotations()[0][0].annotationType());
+      assertEquals(org.jboss.test.aop.proxy.Annotation.class, setter.getParameterAnnotations()[0][0].annotationType());
    }
 }

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotation.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotation.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotation.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,35 @@
+/*
+* 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.proxy;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface SomeAnnotation {
+
+}

Added: projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotationImpl.java
===================================================================
--- projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotationImpl.java	                        (rev 0)
+++ projects/aop/trunk/aop/src/test/org/jboss/test/aop/proxy/SomeAnnotationImpl.java	2008-06-10 12:07:27 UTC (rev 74352)
@@ -0,0 +1,41 @@
+/*
+* 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.proxy;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SomeAnnotationImpl implements SomeAnnotation
+{
+
+   public Class<? extends Annotation> annotationType()
+   {
+      return SomeAnnotation.class;
+   }
+   
+   
+
+}




More information about the jboss-cvs-commits mailing list