[jboss-cvs] JBossAS SVN: r95176 - in projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld: annotated and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 20 11:06:32 EDT 2009


Author: kabir.khan at jboss.com
Date: 2009-10-20 11:06:31 -0400 (Tue, 20 Oct 2009)
New Revision: 95176

Added:
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/AnnotatedBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Child.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/NotAnnotatedBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Parent.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test1.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test2.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test3.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/test/
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/test/AnnotatedTypeTestCase.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanConstructor.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanField.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanMixed.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanAnnotationsFromMetaData.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanInitializerMethod.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanMcConstructor.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWebBeanSetter.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWithPostConstructAndPreDestroy.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/Simple.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBeanConsumer.java
Removed:
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedTypeTestCase.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Child.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/NotAnnotatedBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Parent.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test1.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test2.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test3.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanConstructor.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanField.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanMixed.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanAnnotationsFromMetaData.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanInitializerMethod.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanMcConstructor.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWebBeanSetter.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWithPostConstructAndPreDestroy.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/Simple.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBeanConsumer.java
Modified:
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/AbstractWeldMcTest.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/WeldTestSuite.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/mctowb/test/InjectMcBeansInWeldTestCase.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/FailedBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesConstructorBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesFieldBean.java
   projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/InjectWeldInMcBeansTestCase.java
Log:
[JBKERNEL-51] Move test classes into test/support folders

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/AbstractWeldMcTest.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/AbstractWeldMcTest.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/AbstractWeldMcTest.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -28,13 +28,14 @@
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.BeanManager;
 
+import junit.framework.AssertionFailedError;
+
 import org.jboss.beans.info.spi.BeanAccessMode;
 import org.jboss.beans.metadata.spi.BeanMetaData;
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.kernel.weld.plugins.dependency.WeldKernelControllerContext;
 import org.jboss.test.AbstractTestDelegate;
 import org.jboss.test.kernel.junit.MicrocontainerTest;
-import org.jboss.test.kernel.weld.mctowb.support.wb.ThingConstructor;
 
 /**
  * 

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/WeldTestSuite.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/WeldTestSuite.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/WeldTestSuite.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -24,7 +24,7 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.jboss.test.kernel.weld.annotated.AnnotatedTypeTestCase;
+import org.jboss.test.kernel.weld.annotated.test.AnnotatedTypeTestCase;
 //import org.jboss.test.kernel.weld.beanwrapper.test.BeanImplementationTestCase;
 import org.jboss.test.kernel.weld.mctowb.test.InjectMcBeansInWeldTestCase;
 import org.jboss.test.kernel.weld.wbtomc.test.InjectWeldInMcBeansTestCase;

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,65 +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.kernel.weld.annotated;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
- at Test1("XXX")
- at Test3
-public class AnnotatedBean
-{
-   @Test1("XXX")
-   @Test3
-   int field;
-   
-   @Test1("XXX")
-   @Test3
-   public AnnotatedBean()
-   {
-      
-   }
-   
-   @Test1("XXX")
-   @Test3
-   public AnnotatedBean(@Test1("XXX") @Test3 int i, @Test1("XXX") @Test3 int j)
-   {
-      
-   }
-   
-   @Test1("XXX")
-   @Test3
-   void method()
-   {
-      
-   }
-   
-   @Test1("XXX")
-   @Test3
-   void method(@Test1("XXX") @Test3 int i)
-   {
-      
-   }
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedTypeTestCase.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedTypeTestCase.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedTypeTestCase.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,516 +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.kernel.weld.annotated;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-import javax.enterprise.inject.spi.AnnotatedType;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jboss.annotation.factory.AnnotationCreator;
-import org.jboss.kernel.weld.spi.annotated.MDRAnnotatedTypeFactory;
-import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge;
-import org.jboss.metadata.spi.signature.ConstructorParametersSignature;
-import org.jboss.metadata.spi.signature.ConstructorSignature;
-import org.jboss.metadata.spi.signature.FieldSignature;
-import org.jboss.metadata.spi.signature.MethodParametersSignature;
-import org.jboss.metadata.spi.signature.MethodSignature;
-import org.jboss.test.kernel.weld.AbstractWeldMcTest;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class AnnotatedTypeTestCase extends AbstractWeldMcTest
-{
-   public AnnotatedTypeTestCase(String name)
-   {
-      super(name);
-   }
-   
-   public static Test suite()
-   {
-      return new TestSuite(AnnotatedTypeTestCase.class);
-   }
-
-   public void testNoAnnotationsOnClassNullMetaData() throws Exception
-   {
-      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, null);
-      checkNotAnnotatedNoAnnotations(type);
-   }
-   
-   public void testNoAnnotationsOnClassEmptyMetaData() throws Exception
-   {
-      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, createEmptyMetaData());
-      checkNotAnnotatedNoAnnotations(type);
-   }
-   
-   public void testNoAnnotationsOnClassWithMetaData() throws Exception
-   {
-      MetaData metaData = createMetaDataWithAnnotations(NotAnnotatedBean.class);
-      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, metaData);
-      
-      assertAnnotations(type, "A", Test1.class, Test2.class);
-      
-      assertSize(2, type.getConstructors());
-      for (AnnotatedConstructor<NotAnnotatedBean> ctor : type.getConstructors())
-      {
-         if (ctor.getParameters().size() == 0)
-         {
-            assertAnnotations(ctor, "A", Test1.class, Test2.class);
-         }
-         else
-         {
-            assertSize(2, ctor.getParameters());
-            assertAnnotations(ctor, "A", Test1.class, Test2.class);
-            AnnotatedParameter<NotAnnotatedBean> param1 = ctor.getParameters().get(0);
-            assertAnnotations(param1, "A", Test1.class, Test2.class);
-            AnnotatedParameter<NotAnnotatedBean> param2 = ctor.getParameters().get(1);
-            assertAnnotations(param2, "A", Test1.class, Test2.class);
-         }
-      }
-      
-      assertSize(1, type.getFields());
-      AnnotatedField<? super NotAnnotatedBean> field = type.getFields().iterator().next();
-      assertAnnotations(field, "A", Test1.class, Test2.class);
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<? super NotAnnotatedBean> method : type.getMethods())
-      {
-         if (method.getParameters().size() == 0)
-         {
-            assertAnnotations(method, "A", Test1.class, Test2.class);
-         }
-         else
-         {
-            assertAnnotations(method, "A", Test1.class, Test2.class);
-            assertAnnotations(method.getParameters().iterator().next(), "A", Test1.class, Test2.class);
-         }
-      }
-   }
-   
-   public void testAnnotationsOnClassNullMetaData() throws Exception
-   {
-      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, null);
-      checkAnnotatedBeanNoMetaData(type);
-   }
-   
-   public void testAnnotationsOnClassEmptyMetaData() throws Exception
-   {
-      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, createEmptyMetaData());
-      checkAnnotatedBeanNoMetaData(type);
-   }
-   
-   public void testAnnotationsOnClassWithMetaData() throws Exception
-   {
-      MetaData metaData = createMetaDataWithAnnotations(AnnotatedBean.class);
-      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, metaData);
-      
-      assertAnnotations(type, "A", Test1.class, Test2.class, Test3.class);
-      
-      assertSize(2, type.getConstructors());
-      for (AnnotatedConstructor<AnnotatedBean> ctor : type.getConstructors())
-      {
-         if (ctor.getParameters().size() == 0)
-         {
-            assertAnnotations(ctor, "A", Test1.class, Test2.class, Test3.class);
-
-            //Check the declaring type
-            AnnotatedType<AnnotatedBean> decl = ctor.getDeclaringType();
-            assertEquals(AnnotatedBean.class, decl.getJavaClass());
-            assertAnnotations(decl, "A", Test1.class, Test2.class, Test3.class);
-
-            for (AnnotatedConstructor<AnnotatedBean> innerCtor : decl.getConstructors())
-            {
-               assertAnnotations(innerCtor, "A", Test1.class, Test2.class, Test3.class);
-            }
-         }
-         else
-         {
-            assertSize(2, ctor.getParameters());
-            assertAnnotations(ctor, "A", Test1.class, Test2.class, Test3.class);
-            AnnotatedParameter<AnnotatedBean> param1 = ctor.getParameters().get(0);
-            assertAnnotations(param1, "A", Test1.class, Test2.class, Test3.class);
-            AnnotatedParameter<AnnotatedBean> param2 = ctor.getParameters().get(1);
-            assertAnnotations(param2, "A", Test1.class, Test2.class, Test3.class);
-         }
-      }
-      
-      assertSize(1, type.getFields());
-      AnnotatedField<? super AnnotatedBean> field = type.getFields().iterator().next();
-      assertAnnotations(field, "A", Test1.class, Test2.class, Test3.class);
-      //Check the declaring type
-      AnnotatedType<? super AnnotatedBean> declaring = field.getDeclaringType();
-      assertEquals(AnnotatedBean.class, declaring.getJavaClass());
-      assertAnnotations(declaring, "A", Test1.class, Test2.class, Test3.class);
-      assertAnnotations(declaring.getFields().iterator().next(), "A", Test1.class, Test2.class, Test3.class);
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<? super AnnotatedBean> method : type.getMethods())
-      {
-         if (method.getParameters().size() == 0)
-         {
-            assertAnnotations(method, "A", Test1.class, Test2.class, Test3.class);
-            
-            //Check the declaring type
-            AnnotatedType<? super AnnotatedBean> decl = method.getDeclaringType();
-            assertEquals(AnnotatedBean.class, decl.getJavaClass());
-            assertAnnotations(decl, "A", Test1.class, Test2.class, Test3.class);
-
-            for (AnnotatedMethod<? super AnnotatedBean> innerMethod : decl.getMethods())
-            {
-               assertAnnotations(innerMethod, "A", Test1.class, Test2.class, Test3.class);
-            }
-         }
-         else
-         {
-            assertAnnotations(method, "A", Test1.class, Test2.class, Test3.class);
-            assertAnnotations(method.getParameters().iterator().next(), "A", Test1.class, Test2.class, Test3.class);
-         }
-      }
-   }
-
-   public void testInheritance() throws Exception
-   {
-      AnnotatedType<Child> type = getCurrentManager().createAnnotatedType(Child.class);
-      
-      assertSize(1, type.getConstructors());
-      
-      assertSize(2, type.getFields());
-      for (AnnotatedField<? super Child> field : type.getFields())
-      {
-         if (field.getJavaMember().getName().equals("parent"))
-         {
-            assertEquals(Parent.class, field.getDeclaringType().getJavaClass());
-         }
-         else if (field.getJavaMember().getName().equals("child"))
-         {
-            assertEquals(Child.class, field.getDeclaringType().getJavaClass());
-         }
-         else
-         {
-            fail("Unknown field " + field.getJavaMember());
-         }
-      }
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<? super Child> method : type.getMethods())
-      {
-         if (method.getJavaMember().getName().equals("parentMethod"))
-         {
-            assertEquals(Parent.class, method.getDeclaringType().getJavaClass());
-         }
-         else if (method.getJavaMember().getName().equals("childMethod"))
-         {
-            assertEquals(Child.class, method.getDeclaringType().getJavaClass());
-         }
-         else
-         {
-            fail("Unknown method " + method.getJavaMember());
-         }
-      }
-      
-      type = createAnnotatedTypeForInheritance(type);
-      assertAnnotations(type, null, Test2.class);
-      
-      assertSize(1, type.getConstructors());
-      assertAnnotations(type.getConstructors().iterator().next(), null, Test1.class);
-      
-      assertSize(2, type.getFields());
-      for (AnnotatedField<? super Child> field : type.getFields())
-      {
-         if (field.getJavaMember().getName().equals("parent"))
-         {
-            assertEquals(Parent.class, field.getDeclaringType().getJavaClass());
-            assertAnnotations(field, null, Test2.class);
-            checkAnnotationsOnParentClass(field.getDeclaringType());
-            
-         }
-         else if (field.getJavaMember().getName().equals("child"))
-         {
-            assertEquals(Child.class, field.getDeclaringType().getJavaClass());
-            assertAnnotations(field, null, Test1.class);
-         }
-         else
-         {
-            fail("Unknown field " + field.getJavaMember());
-         }
-      }
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<? super Child> method : type.getMethods())
-      {
-         if (method.getJavaMember().getName().equals("parentMethod"))
-         {
-            assertEquals(Parent.class, method.getDeclaringType().getJavaClass());
-            assertAnnotations(method, null, Test2.class);
-            checkAnnotationsOnParentClass(method.getDeclaringType());
-         }
-         else if (method.getJavaMember().getName().equals("childMethod"))
-         {
-            assertEquals(Child.class, method.getDeclaringType().getJavaClass());
-            assertAnnotations(method, null, Test1.class);
-         }
-         else
-         {
-            fail("Unknown method " + method.getJavaMember());
-         }
-      }
-   }
-   
-   private void checkAnnotationsOnParentClass(AnnotatedType<? super Child> type)
-   {
-      assertEquals(Parent.class, type.getJavaClass());
-      assertAnnotations(type, null, Test2.class);
-
-      assertSize(1, type.getConstructors());
-      assertAnnotations(type.getConstructors().iterator().next(), null, Test1.class);
-
-      assertSize(1, type.getFields());
-      assertAnnotations(type.getFields().iterator().next(), null, Test2.class);
-
-      assertSize(1, type.getMethods());
-      assertAnnotations(type.getMethods().iterator().next(), null, Test2.class);
-   }
-   
-   private void checkNotAnnotatedNoAnnotations(AnnotatedType<?> type)
-   {
-      assertAnnotations(type);
-      
-      assertSize(2, type.getConstructors());
-      for (AnnotatedConstructor<?> ctor : type.getConstructors())
-      {
-         assertAnnotations(ctor);
-         
-         for (AnnotatedParameter<?> param : ctor.getParameters())
-         {
-            assertAnnotations(param);
-         }
-      }
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<?> method : type.getMethods())
-      {
-         assertAnnotations(method);
-         
-         for (AnnotatedParameter<?> param : method.getParameters())
-         {
-            assertAnnotations(param);
-         }
-      }
-      
-      assertSize(1, type.getFields());
-      for (AnnotatedField<?> field : type.getFields())
-      {
-         assertAnnotations(field);
-      }
-   }
-   
-   private void checkAnnotatedBeanNoMetaData(AnnotatedType<?> type)
-   {
-      assertAnnotations(type, "XXX", Test1.class, Test3.class);
-      
-      assertSize(2, type.getConstructors());
-      for (AnnotatedConstructor<?> ctor : type.getConstructors())
-      {
-         assertAnnotations(ctor, "XXX", Test1.class, Test3.class);
-         
-         for (AnnotatedParameter<?> param : ctor.getParameters())
-         {
-            assertAnnotations(param, "XXX", Test1.class, Test3.class);
-         }
-      }
-      
-      assertSize(2, type.getMethods());
-      for (AnnotatedMethod<?> method : type.getMethods())
-      {
-         assertAnnotations(method, "XXX", Test1.class, Test3.class);
-         
-         for (AnnotatedParameter<?> param : method.getParameters())
-         {
-            assertAnnotations(param, "XXX", Test1.class, Test3.class);
-         }
-      }
-      
-      assertSize(1, type.getFields());
-      for (AnnotatedField<?> field : type.getFields())
-      {
-         assertAnnotations(field, "XXX", Test1.class, Test3.class);
-      }
-   }
-   
-   private void assertAnnotations(Annotated annotated)
-   {
-      assertAnnotations(annotated, null);
-   }
-   
-   private void assertAnnotations(Annotated annotated, String test1String, Class<? extends Annotation>...annotations)
-   {
-      Set<Annotation> actual = annotated.getAnnotations();
-      assertEquals(actual.size(), annotations.length);
-      
-      for (Class<? extends Annotation> clazz : annotations)
-      {
-         Annotation found = null;
-         for (Annotation annotation : actual)
-         {
-            if (annotation.annotationType() == clazz)
-            {
-               found = annotation;
-               break;
-            }
-         }
-         
-         if (found == null)
-            fail("Could not find annotation in set of annotations " + clazz.getName());
-         
-         Annotation ann = annotated.getAnnotation(clazz);
-         assertNotNull(ann);
-         assertEquals(found, ann);
-         if (clazz == Test1.class && test1String != null)
-            assertEquals(test1String, ((Test1)ann).value());
-      }
-   }
-   
-   private MetaData createEmptyMetaData()
-   {
-      return new MetaDataRetrievalToMetaDataBridge(new MemoryMetaDataLoader());
-   }
-      
-   private <T> AnnotatedType<T> createAnnotatedType(Class<T> clazz, MetaData metadata) throws Exception
-   {
-      AnnotatedType<T> type = getCurrentManager().createAnnotatedType(clazz);
-      return MDRAnnotatedTypeFactory.getInstance().getAnnotatedType(type, metadata);
-   }
-   
-   private MetaData createMetaDataWithAnnotations(Class<?> clazz) throws Exception
-   {
-      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
-      loader.addAnnotation(createTest1());
-      loader.addAnnotation(createTest2());
-      
-      Constructor<?> ctorNoParams = clazz.getDeclaredConstructor();
-      MemoryMetaDataLoader component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctorNoParams), component);
-      
-      Constructor<?> ctorWithParam = clazz.getDeclaredConstructor(Integer.TYPE, Integer.TYPE);
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctorWithParam), component);
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(ctorWithParam, 0), component);
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(ctorWithParam, 1), component);
-      
-      
-      Field field = clazz.getDeclaredField("field");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new FieldSignature(field), component);
-
-      Method methodNoParams = clazz.getDeclaredMethod("method");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new MethodSignature(methodNoParams), component);
-      
-      Method methodWithParams = clazz.getDeclaredMethod("method", Integer.TYPE);
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new MethodSignature(methodWithParams), component);
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new MethodParametersSignature(methodWithParams, 0), component);
-      
-      
-      return new MetaDataRetrievalToMetaDataBridge(loader);
-   }
-
-   private AnnotatedType<Child> createAnnotatedTypeForInheritance(AnnotatedType<Child> type) throws Exception
-   {
-      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
-      loader.addAnnotation(createTest2());
-      
-      Constructor<Child> ctor = Child.class.getConstructor();
-      MemoryMetaDataLoader component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctor), component);
-      
-      Method childMethod = Child.class.getDeclaredMethod("childMethod");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      loader.addComponentMetaDataRetrieval(new MethodSignature(childMethod), component);
-      
-      Method parentMethod = Parent.class.getDeclaredMethod("parentMethod");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new MethodSignature(parentMethod), component);
-      
-      Field child = Child.class.getDeclaredField("child");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest1());
-      loader.addComponentMetaDataRetrieval(new FieldSignature(child), component);
-      
-      Field parent = Parent.class.getDeclaredField("parent");
-      component = new MemoryMetaDataLoader();
-      component.addAnnotation(createTest2());
-      loader.addComponentMetaDataRetrieval(new FieldSignature(parent), component);
-      
-      return MDRAnnotatedTypeFactory.getInstance().getAnnotatedType(type, new MetaDataRetrievalToMetaDataBridge(loader));
-   }
-   
-   
-
-   private Test1 createTest1() throws Exception
-   {
-      return (Test1)AnnotationCreator.createAnnotation("@" + Test1.class.getName() + "(\"A\")", (ClassLoader)null);
-   }
-   
-   private Test2 createTest2() throws Exception
-   {
-      return (Test2)AnnotationCreator.createAnnotation("@" + Test2.class.getName(), (ClassLoader)null);
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Child.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Child.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Child.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,37 +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.kernel.weld.annotated;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class Child extends Parent
-{
-   int child;
-   
-   void childMethod()
-   {
-      
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/NotAnnotatedBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/NotAnnotatedBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/NotAnnotatedBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,52 +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.kernel.weld.annotated;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class NotAnnotatedBean
-{
-   int field;
-   
-   public NotAnnotatedBean()
-   {
-      
-   }
-   
-   public NotAnnotatedBean(int i, int j)
-   {
-      
-   }
-   
-   void method()
-   {
-      
-   }
-   
-   void method(int i)
-   {
-      
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Parent.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Parent.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Parent.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,37 +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.kernel.weld.annotated;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class Parent
-{
-   int parent;
-   
-   void parentMethod()
-   {
-      
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test1.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test1.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test1.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,35 +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.kernel.weld.annotated;
-
-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 Test1 {
-   String value(); 
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test2.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test2.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test2.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,35 +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.kernel.weld.annotated;
-
-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 Test2 {
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test3.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test3.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test3.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,35 +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.kernel.weld.annotated;
-
-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 Test3 {
-
-}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/AnnotatedBean.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedBean.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/AnnotatedBean.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/AnnotatedBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,65 @@
+/*
+* 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.kernel.weld.annotated.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+ at Test1("XXX")
+ at Test3
+public class AnnotatedBean
+{
+   @Test1("XXX")
+   @Test3
+   int field;
+   
+   @Test1("XXX")
+   @Test3
+   public AnnotatedBean()
+   {
+      
+   }
+   
+   @Test1("XXX")
+   @Test3
+   public AnnotatedBean(@Test1("XXX") @Test3 int i, @Test1("XXX") @Test3 int j)
+   {
+      
+   }
+   
+   @Test1("XXX")
+   @Test3
+   void method()
+   {
+      
+   }
+   
+   @Test1("XXX")
+   @Test3
+   void method(@Test1("XXX") @Test3 int i)
+   {
+      
+   }
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Child.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Child.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Child.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Child.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,37 @@
+/*
+* 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.kernel.weld.annotated.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Child extends Parent
+{
+   int child;
+   
+   void childMethod()
+   {
+      
+   }
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/NotAnnotatedBean.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/NotAnnotatedBean.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/NotAnnotatedBean.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/NotAnnotatedBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.annotated.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class NotAnnotatedBean
+{
+   int field;
+   
+   public NotAnnotatedBean()
+   {
+      
+   }
+   
+   public NotAnnotatedBean(int i, int j)
+   {
+      
+   }
+   
+   void method()
+   {
+      
+   }
+   
+   void method(int i)
+   {
+      
+   }
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Parent.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Parent.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Parent.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Parent.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,37 @@
+/*
+* 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.kernel.weld.annotated.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Parent
+{
+   int parent;
+   
+   void parentMethod()
+   {
+      
+   }
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test1.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test1.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test1.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test1.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.annotated.support;
+
+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 Test1 {
+   String value(); 
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test2.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test2.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test2.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test2.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.annotated.support;
+
+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 Test2 {
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test3.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/Test3.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test3.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/support/Test3.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.annotated.support;
+
+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 Test3 {
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/test/AnnotatedTypeTestCase.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/AnnotatedTypeTestCase.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/test/AnnotatedTypeTestCase.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/annotated/test/AnnotatedTypeTestCase.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,523 @@
+/*
+* 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.kernel.weld.annotated.test;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Annotated;
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+import javax.enterprise.inject.spi.AnnotatedType;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.kernel.weld.spi.annotated.MDRAnnotatedTypeFactory;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge;
+import org.jboss.metadata.spi.signature.ConstructorParametersSignature;
+import org.jboss.metadata.spi.signature.ConstructorSignature;
+import org.jboss.metadata.spi.signature.FieldSignature;
+import org.jboss.metadata.spi.signature.MethodParametersSignature;
+import org.jboss.metadata.spi.signature.MethodSignature;
+import org.jboss.test.kernel.weld.AbstractWeldMcTest;
+import org.jboss.test.kernel.weld.annotated.support.AnnotatedBean;
+import org.jboss.test.kernel.weld.annotated.support.Child;
+import org.jboss.test.kernel.weld.annotated.support.NotAnnotatedBean;
+import org.jboss.test.kernel.weld.annotated.support.Parent;
+import org.jboss.test.kernel.weld.annotated.support.Test1;
+import org.jboss.test.kernel.weld.annotated.support.Test2;
+import org.jboss.test.kernel.weld.annotated.support.Test3;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AnnotatedTypeTestCase extends AbstractWeldMcTest
+{
+   public AnnotatedTypeTestCase(String name)
+   {
+      super(name);
+   }
+   
+   public static Test suite()
+   {
+      return new TestSuite(AnnotatedTypeTestCase.class);
+   }
+
+   public void testNoAnnotationsOnClassNullMetaData() throws Exception
+   {
+      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, null);
+      checkNotAnnotatedNoAnnotations(type);
+   }
+   
+   public void testNoAnnotationsOnClassEmptyMetaData() throws Exception
+   {
+      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, createEmptyMetaData());
+      checkNotAnnotatedNoAnnotations(type);
+   }
+   
+   public void testNoAnnotationsOnClassWithMetaData() throws Exception
+   {
+      MetaData metaData = createMetaDataWithAnnotations(NotAnnotatedBean.class);
+      AnnotatedType<NotAnnotatedBean> type = createAnnotatedType(NotAnnotatedBean.class, metaData);
+      
+      assertAnnotations(type, "A", Test1.class, Test2.class);
+      
+      assertSize(2, type.getConstructors());
+      for (AnnotatedConstructor<NotAnnotatedBean> ctor : type.getConstructors())
+      {
+         if (ctor.getParameters().size() == 0)
+         {
+            assertAnnotations(ctor, "A", Test1.class, Test2.class);
+         }
+         else
+         {
+            assertSize(2, ctor.getParameters());
+            assertAnnotations(ctor, "A", Test1.class, Test2.class);
+            AnnotatedParameter<NotAnnotatedBean> param1 = ctor.getParameters().get(0);
+            assertAnnotations(param1, "A", Test1.class, Test2.class);
+            AnnotatedParameter<NotAnnotatedBean> param2 = ctor.getParameters().get(1);
+            assertAnnotations(param2, "A", Test1.class, Test2.class);
+         }
+      }
+      
+      assertSize(1, type.getFields());
+      AnnotatedField<? super NotAnnotatedBean> field = type.getFields().iterator().next();
+      assertAnnotations(field, "A", Test1.class, Test2.class);
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<? super NotAnnotatedBean> method : type.getMethods())
+      {
+         if (method.getParameters().size() == 0)
+         {
+            assertAnnotations(method, "A", Test1.class, Test2.class);
+         }
+         else
+         {
+            assertAnnotations(method, "A", Test1.class, Test2.class);
+            assertAnnotations(method.getParameters().iterator().next(), "A", Test1.class, Test2.class);
+         }
+      }
+   }
+   
+   public void testAnnotationsOnClassNullMetaData() throws Exception
+   {
+      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, null);
+      checkAnnotatedBeanNoMetaData(type);
+   }
+   
+   public void testAnnotationsOnClassEmptyMetaData() throws Exception
+   {
+      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, createEmptyMetaData());
+      checkAnnotatedBeanNoMetaData(type);
+   }
+   
+   public void testAnnotationsOnClassWithMetaData() throws Exception
+   {
+      MetaData metaData = createMetaDataWithAnnotations(AnnotatedBean.class);
+      AnnotatedType<AnnotatedBean> type = createAnnotatedType(AnnotatedBean.class, metaData);
+      
+      assertAnnotations(type, "A", Test1.class, Test2.class, Test3.class);
+      
+      assertSize(2, type.getConstructors());
+      for (AnnotatedConstructor<AnnotatedBean> ctor : type.getConstructors())
+      {
+         if (ctor.getParameters().size() == 0)
+         {
+            assertAnnotations(ctor, "A", Test1.class, Test2.class, Test3.class);
+
+            //Check the declaring type
+            AnnotatedType<AnnotatedBean> decl = ctor.getDeclaringType();
+            assertEquals(AnnotatedBean.class, decl.getJavaClass());
+            assertAnnotations(decl, "A", Test1.class, Test2.class, Test3.class);
+
+            for (AnnotatedConstructor<AnnotatedBean> innerCtor : decl.getConstructors())
+            {
+               assertAnnotations(innerCtor, "A", Test1.class, Test2.class, Test3.class);
+            }
+         }
+         else
+         {
+            assertSize(2, ctor.getParameters());
+            assertAnnotations(ctor, "A", Test1.class, Test2.class, Test3.class);
+            AnnotatedParameter<AnnotatedBean> param1 = ctor.getParameters().get(0);
+            assertAnnotations(param1, "A", Test1.class, Test2.class, Test3.class);
+            AnnotatedParameter<AnnotatedBean> param2 = ctor.getParameters().get(1);
+            assertAnnotations(param2, "A", Test1.class, Test2.class, Test3.class);
+         }
+      }
+      
+      assertSize(1, type.getFields());
+      AnnotatedField<? super AnnotatedBean> field = type.getFields().iterator().next();
+      assertAnnotations(field, "A", Test1.class, Test2.class, Test3.class);
+      //Check the declaring type
+      AnnotatedType<? super AnnotatedBean> declaring = field.getDeclaringType();
+      assertEquals(AnnotatedBean.class, declaring.getJavaClass());
+      assertAnnotations(declaring, "A", Test1.class, Test2.class, Test3.class);
+      assertAnnotations(declaring.getFields().iterator().next(), "A", Test1.class, Test2.class, Test3.class);
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<? super AnnotatedBean> method : type.getMethods())
+      {
+         if (method.getParameters().size() == 0)
+         {
+            assertAnnotations(method, "A", Test1.class, Test2.class, Test3.class);
+            
+            //Check the declaring type
+            AnnotatedType<? super AnnotatedBean> decl = method.getDeclaringType();
+            assertEquals(AnnotatedBean.class, decl.getJavaClass());
+            assertAnnotations(decl, "A", Test1.class, Test2.class, Test3.class);
+
+            for (AnnotatedMethod<? super AnnotatedBean> innerMethod : decl.getMethods())
+            {
+               assertAnnotations(innerMethod, "A", Test1.class, Test2.class, Test3.class);
+            }
+         }
+         else
+         {
+            assertAnnotations(method, "A", Test1.class, Test2.class, Test3.class);
+            assertAnnotations(method.getParameters().iterator().next(), "A", Test1.class, Test2.class, Test3.class);
+         }
+      }
+   }
+
+   public void testInheritance() throws Exception
+   {
+      AnnotatedType<Child> type = getCurrentManager().createAnnotatedType(Child.class);
+      
+      assertSize(1, type.getConstructors());
+      
+      assertSize(2, type.getFields());
+      for (AnnotatedField<? super Child> field : type.getFields())
+      {
+         if (field.getJavaMember().getName().equals("parent"))
+         {
+            assertEquals(Parent.class, field.getDeclaringType().getJavaClass());
+         }
+         else if (field.getJavaMember().getName().equals("child"))
+         {
+            assertEquals(Child.class, field.getDeclaringType().getJavaClass());
+         }
+         else
+         {
+            fail("Unknown field " + field.getJavaMember());
+         }
+      }
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<? super Child> method : type.getMethods())
+      {
+         if (method.getJavaMember().getName().equals("parentMethod"))
+         {
+            assertEquals(Parent.class, method.getDeclaringType().getJavaClass());
+         }
+         else if (method.getJavaMember().getName().equals("childMethod"))
+         {
+            assertEquals(Child.class, method.getDeclaringType().getJavaClass());
+         }
+         else
+         {
+            fail("Unknown method " + method.getJavaMember());
+         }
+      }
+      
+      type = createAnnotatedTypeForInheritance(type);
+      assertAnnotations(type, null, Test2.class);
+      
+      assertSize(1, type.getConstructors());
+      assertAnnotations(type.getConstructors().iterator().next(), null, Test1.class);
+      
+      assertSize(2, type.getFields());
+      for (AnnotatedField<? super Child> field : type.getFields())
+      {
+         if (field.getJavaMember().getName().equals("parent"))
+         {
+            assertEquals(Parent.class, field.getDeclaringType().getJavaClass());
+            assertAnnotations(field, null, Test2.class);
+            checkAnnotationsOnParentClass(field.getDeclaringType());
+            
+         }
+         else if (field.getJavaMember().getName().equals("child"))
+         {
+            assertEquals(Child.class, field.getDeclaringType().getJavaClass());
+            assertAnnotations(field, null, Test1.class);
+         }
+         else
+         {
+            fail("Unknown field " + field.getJavaMember());
+         }
+      }
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<? super Child> method : type.getMethods())
+      {
+         if (method.getJavaMember().getName().equals("parentMethod"))
+         {
+            assertEquals(Parent.class, method.getDeclaringType().getJavaClass());
+            assertAnnotations(method, null, Test2.class);
+            checkAnnotationsOnParentClass(method.getDeclaringType());
+         }
+         else if (method.getJavaMember().getName().equals("childMethod"))
+         {
+            assertEquals(Child.class, method.getDeclaringType().getJavaClass());
+            assertAnnotations(method, null, Test1.class);
+         }
+         else
+         {
+            fail("Unknown method " + method.getJavaMember());
+         }
+      }
+   }
+   
+   private void checkAnnotationsOnParentClass(AnnotatedType<? super Child> type)
+   {
+      assertEquals(Parent.class, type.getJavaClass());
+      assertAnnotations(type, null, Test2.class);
+
+      assertSize(1, type.getConstructors());
+      assertAnnotations(type.getConstructors().iterator().next(), null, Test1.class);
+
+      assertSize(1, type.getFields());
+      assertAnnotations(type.getFields().iterator().next(), null, Test2.class);
+
+      assertSize(1, type.getMethods());
+      assertAnnotations(type.getMethods().iterator().next(), null, Test2.class);
+   }
+   
+   private void checkNotAnnotatedNoAnnotations(AnnotatedType<?> type)
+   {
+      assertAnnotations(type);
+      
+      assertSize(2, type.getConstructors());
+      for (AnnotatedConstructor<?> ctor : type.getConstructors())
+      {
+         assertAnnotations(ctor);
+         
+         for (AnnotatedParameter<?> param : ctor.getParameters())
+         {
+            assertAnnotations(param);
+         }
+      }
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<?> method : type.getMethods())
+      {
+         assertAnnotations(method);
+         
+         for (AnnotatedParameter<?> param : method.getParameters())
+         {
+            assertAnnotations(param);
+         }
+      }
+      
+      assertSize(1, type.getFields());
+      for (AnnotatedField<?> field : type.getFields())
+      {
+         assertAnnotations(field);
+      }
+   }
+   
+   private void checkAnnotatedBeanNoMetaData(AnnotatedType<?> type)
+   {
+      assertAnnotations(type, "XXX", Test1.class, Test3.class);
+      
+      assertSize(2, type.getConstructors());
+      for (AnnotatedConstructor<?> ctor : type.getConstructors())
+      {
+         assertAnnotations(ctor, "XXX", Test1.class, Test3.class);
+         
+         for (AnnotatedParameter<?> param : ctor.getParameters())
+         {
+            assertAnnotations(param, "XXX", Test1.class, Test3.class);
+         }
+      }
+      
+      assertSize(2, type.getMethods());
+      for (AnnotatedMethod<?> method : type.getMethods())
+      {
+         assertAnnotations(method, "XXX", Test1.class, Test3.class);
+         
+         for (AnnotatedParameter<?> param : method.getParameters())
+         {
+            assertAnnotations(param, "XXX", Test1.class, Test3.class);
+         }
+      }
+      
+      assertSize(1, type.getFields());
+      for (AnnotatedField<?> field : type.getFields())
+      {
+         assertAnnotations(field, "XXX", Test1.class, Test3.class);
+      }
+   }
+   
+   private void assertAnnotations(Annotated annotated)
+   {
+      assertAnnotations(annotated, null);
+   }
+   
+   private void assertAnnotations(Annotated annotated, String test1String, Class<? extends Annotation>...annotations)
+   {
+      Set<Annotation> actual = annotated.getAnnotations();
+      assertEquals(actual.size(), annotations.length);
+      
+      for (Class<? extends Annotation> clazz : annotations)
+      {
+         Annotation found = null;
+         for (Annotation annotation : actual)
+         {
+            if (annotation.annotationType() == clazz)
+            {
+               found = annotation;
+               break;
+            }
+         }
+         
+         if (found == null)
+            fail("Could not find annotation in set of annotations " + clazz.getName());
+         
+         Annotation ann = annotated.getAnnotation(clazz);
+         assertNotNull(ann);
+         assertEquals(found, ann);
+         if (clazz == Test1.class && test1String != null)
+            assertEquals(test1String, ((Test1)ann).value());
+      }
+   }
+   
+   private MetaData createEmptyMetaData()
+   {
+      return new MetaDataRetrievalToMetaDataBridge(new MemoryMetaDataLoader());
+   }
+      
+   private <T> AnnotatedType<T> createAnnotatedType(Class<T> clazz, MetaData metadata) throws Exception
+   {
+      AnnotatedType<T> type = getCurrentManager().createAnnotatedType(clazz);
+      return MDRAnnotatedTypeFactory.getInstance().getAnnotatedType(type, metadata);
+   }
+   
+   private MetaData createMetaDataWithAnnotations(Class<?> clazz) throws Exception
+   {
+      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
+      loader.addAnnotation(createTest1());
+      loader.addAnnotation(createTest2());
+      
+      Constructor<?> ctorNoParams = clazz.getDeclaredConstructor();
+      MemoryMetaDataLoader component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctorNoParams), component);
+      
+      Constructor<?> ctorWithParam = clazz.getDeclaredConstructor(Integer.TYPE, Integer.TYPE);
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctorWithParam), component);
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(ctorWithParam, 0), component);
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new ConstructorParametersSignature(ctorWithParam, 1), component);
+      
+      
+      Field field = clazz.getDeclaredField("field");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new FieldSignature(field), component);
+
+      Method methodNoParams = clazz.getDeclaredMethod("method");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new MethodSignature(methodNoParams), component);
+      
+      Method methodWithParams = clazz.getDeclaredMethod("method", Integer.TYPE);
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new MethodSignature(methodWithParams), component);
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new MethodParametersSignature(methodWithParams, 0), component);
+      
+      
+      return new MetaDataRetrievalToMetaDataBridge(loader);
+   }
+
+   private AnnotatedType<Child> createAnnotatedTypeForInheritance(AnnotatedType<Child> type) throws Exception
+   {
+      MemoryMetaDataLoader loader = new MemoryMetaDataLoader();
+      loader.addAnnotation(createTest2());
+      
+      Constructor<Child> ctor = Child.class.getConstructor();
+      MemoryMetaDataLoader component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      loader.addComponentMetaDataRetrieval(new ConstructorSignature(ctor), component);
+      
+      Method childMethod = Child.class.getDeclaredMethod("childMethod");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      loader.addComponentMetaDataRetrieval(new MethodSignature(childMethod), component);
+      
+      Method parentMethod = Parent.class.getDeclaredMethod("parentMethod");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new MethodSignature(parentMethod), component);
+      
+      Field child = Child.class.getDeclaredField("child");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest1());
+      loader.addComponentMetaDataRetrieval(new FieldSignature(child), component);
+      
+      Field parent = Parent.class.getDeclaredField("parent");
+      component = new MemoryMetaDataLoader();
+      component.addAnnotation(createTest2());
+      loader.addComponentMetaDataRetrieval(new FieldSignature(parent), component);
+      
+      return MDRAnnotatedTypeFactory.getInstance().getAnnotatedType(type, new MetaDataRetrievalToMetaDataBridge(loader));
+   }
+   
+   
+
+   private Test1 createTest1() throws Exception
+   {
+      return (Test1)AnnotationCreator.createAnnotation("@" + Test1.class.getName() + "(\"A\")", (ClassLoader)null);
+   }
+   
+   private Test2 createTest2() throws Exception
+   {
+      return (Test2)AnnotationCreator.createAnnotation("@" + Test2.class.getName(), (ClassLoader)null);
+   }
+}

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/mctowb/test/InjectMcBeansInWeldTestCase.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/mctowb/test/InjectMcBeansInWeldTestCase.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/mctowb/test/InjectMcBeansInWeldTestCase.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -242,6 +242,7 @@
          LifecycleBeanConsumerA consumerA = getWeldBean(LifecycleBeanConsumerA.class);      
          LifecycleBeanConsumerB consumerB = getWeldBean(LifecycleBeanConsumerB.class);
          assertSame(consumerA.bean, consumerB.bean);
+         assertSame(bean, consumerA.bean);
          
          assertEquals(0, LifecycleBean.preDestroy);
          assertEquals(1, LifecycleBean.postConstruct);

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanConstructor.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanConstructor.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanConstructor.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanConstructor.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,56 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalBeanConstructor
+{
+   WebBean bean;
+   
+   WebBean nonAnnotated;
+   
+   @Inject
+   public ExternalBeanConstructor(@Default WebBean bean)
+   {
+      this.bean = bean;
+   }
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getNonAnnotated()
+   {
+      return nonAnnotated;
+   }
+   
+   
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanField.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanField.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanField.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanField.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,48 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalBeanField
+{
+   @Inject @Default WebBean bean;
+   
+   WebBean nonAnnotated;
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getNonAnnotated()
+   {
+      return nonAnnotated;
+   }
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanMixed.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanMixed.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanMixed.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/ExternalBeanMixed.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,61 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ExternalBeanMixed
+{
+   @Inject @Default WebBean fieldBean;
+   
+   WebBean nonAnnotated;
+
+   WebBean constructorBean;
+   
+   @Inject
+   public ExternalBeanMixed(@Default WebBean bean)
+   {
+      this.constructorBean = bean;
+   }
+
+   public WebBean getFieldBean()
+   {
+      return fieldBean;
+   }
+
+   public WebBean getNonAnnotated()
+   {
+      return nonAnnotated;
+   }
+
+   public WebBean getConstructorBean()
+   {
+      return constructorBean;
+   }
+}

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/FailedBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/FailedBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/FailedBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -24,7 +24,6 @@
 import javax.enterprise.inject.Default;
 import javax.inject.Inject;
 
-import org.jboss.test.kernel.weld.wbtomc.test.WebBean;
 
 /**
  * 

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBean.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBean.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBean.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,62 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBean
+{
+   WebBean beanFromConstructor;
+   
+   @Inject @Default
+   WebBean bean;
+   
+   WebBean nonInject;
+   
+   @Inject
+   public McBean(@Default WebBean beanFromConstructor)
+   {
+      this.beanFromConstructor = beanFromConstructor;
+   }
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getBeanFromConstructor()
+   {
+      return beanFromConstructor;
+   }
+
+   public WebBean getNonInject()
+   {
+      return nonInject;
+   }
+}   

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanAnnotationsFromMetaData.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanAnnotationsFromMetaData.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanAnnotationsFromMetaData.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanAnnotationsFromMetaData.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,60 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBeanAnnotationsFromMetaData
+{
+   WebBean beanFromConstructor;
+   
+   /*@Current*/
+   WebBean bean;
+   
+   WebBean nonInject;
+   
+//   /*@Initializer*/
+   public McBeanAnnotationsFromMetaData(/*@Current*/ WebBean beanFromConstructor)
+   {
+      this.beanFromConstructor = beanFromConstructor;
+   }
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getBeanFromConstructor()
+   {
+      return beanFromConstructor;
+   }
+
+   public WebBean getNonInject()
+   {
+      return nonInject;
+   }
+}   

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanInitializerMethod.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanInitializerMethod.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanInitializerMethod.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanInitializerMethod.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,55 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBeanInitializerMethod
+{
+   WebBean bean;
+   
+   WebBean nonInject;
+   
+   @Inject
+   public void initializerMethod(@Default WebBean bean)
+   {
+      this.bean = bean;
+   }
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getNonInject()
+   {
+      return nonInject;
+   }
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanMcConstructor.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanMcConstructor.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanMcConstructor.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanMcConstructor.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,66 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBeanMcConstructor
+{
+   @Inject @Default
+   WebBean bean;
+   
+   Simple simple;
+   
+   WebBean nonInject;
+   
+   public McBeanMcConstructor()
+   {
+      
+   }
+   
+   public McBeanMcConstructor(Simple simple)
+   {
+      this.simple = simple;
+   }
+   
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public WebBean getNonInject()
+   {
+      return nonInject;
+   }
+
+   public Simple getSimple()
+   {
+      return simple;
+   }
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWebBeanSetter.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWebBeanSetter.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWebBeanSetter.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWebBeanSetter.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,54 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBeanWebBeanSetter
+{
+   WebBean bean;
+   
+   WebBean nonInject;
+   
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   @Inject @Default
+   public void setBean(WebBean bean)
+   {
+      this.bean = bean;
+   }
+   
+   public WebBean getNonInject()
+   {
+      return nonInject;
+   }
+}   

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWithPostConstructAndPreDestroy.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWithPostConstructAndPreDestroy.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWithPostConstructAndPreDestroy.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/McBeanWithPostConstructAndPreDestroy.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -0,0 +1,75 @@
+/*
+* 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.kernel.weld.wbtomc.support;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class McBeanWithPostConstructAndPreDestroy
+{
+   @Inject @Default
+   WebBean bean;
+   
+   boolean postConstructCalled;
+   
+   boolean preDestroyCalled;
+   
+   @Inject
+   public McBeanWithPostConstructAndPreDestroy()
+   {
+   }
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+
+   public boolean isPostConstructCalled()
+   {
+      return postConstructCalled;
+   }
+
+   public boolean isPreDestroyCalled()
+   {
+      return preDestroyCalled;
+   }
+
+   @PostConstruct
+   public void postConstruct()
+   {
+      postConstructCalled = true;
+   }
+   
+   @PreDestroy
+   public void preDestroy()
+   {
+      preDestroyCalled = true;
+   }
+}   

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesConstructorBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesConstructorBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesConstructorBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -24,7 +24,6 @@
 import javax.enterprise.inject.Default;
 import javax.inject.Inject;
 
-import org.jboss.test.kernel.weld.wbtomc.test.WebBean;
 
 /**
  * 

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesFieldBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesFieldBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/MissingDependenciesFieldBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -24,7 +24,6 @@
 import javax.enterprise.inject.Default;
 import javax.inject.Inject;
 
-import org.jboss.test.kernel.weld.wbtomc.test.WebBean;
 
 /**
  * 

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/Simple.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/Simple.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/Simple.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/Simple.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.wbtomc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class Simple
+{
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBean.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBean.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBean.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.wbtomc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebBean
+{
+
+}

Copied: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBeanConsumer.java (from rev 95117, projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBeanConsumer.java)
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBeanConsumer.java	                        (rev 0)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/support/WebBeanConsumer.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.wbtomc.support;
+
+import javax.enterprise.inject.Default;
+import javax.inject.Inject;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebBeanConsumer
+{
+   @Inject @Default
+   WebBean bean;
+
+   public WebBean getBean()
+   {
+      return bean;
+   }
+}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanConstructor.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanConstructor.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanConstructor.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,43 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ExternalBeanConstructor
-{
-   WebBean bean;
-   
-   WebBean nonAnnotated;
-   
-   @Inject
-   public ExternalBeanConstructor(@Default WebBean bean)
-   {
-      this.bean = bean;
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanField.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanField.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanField.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,38 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ExternalBeanField
-{
-   @Inject @Default WebBean bean;
-   
-   WebBean nonAnnotated;
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanMixed.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanMixed.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/ExternalBeanMixed.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class ExternalBeanMixed
-{
-   @Inject @Default WebBean fieldBean;
-   
-   WebBean nonAnnotated;
-
-   WebBean constructorBean;
-   
-   @Inject
-   public ExternalBeanMixed(@Default WebBean bean)
-   {
-      this.constructorBean = bean;
-   }
-
-}

Modified: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/InjectWeldInMcBeansTestCase.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/InjectWeldInMcBeansTestCase.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/InjectWeldInMcBeansTestCase.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -49,9 +49,19 @@
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.kernel.weld.plugins.dependency.WeldKernelControllerContext;
 import org.jboss.test.kernel.weld.AbstractWeldMcTest;
+import org.jboss.test.kernel.weld.wbtomc.support.ExternalBeanConstructor;
+import org.jboss.test.kernel.weld.wbtomc.support.ExternalBeanField;
+import org.jboss.test.kernel.weld.wbtomc.support.ExternalBeanMixed;
 import org.jboss.test.kernel.weld.wbtomc.support.FailedBean;
+import org.jboss.test.kernel.weld.wbtomc.support.McBean;
+import org.jboss.test.kernel.weld.wbtomc.support.McBeanAnnotationsFromMetaData;
+import org.jboss.test.kernel.weld.wbtomc.support.McBeanInitializerMethod;
+import org.jboss.test.kernel.weld.wbtomc.support.McBeanMcConstructor;
+import org.jboss.test.kernel.weld.wbtomc.support.McBeanWithPostConstructAndPreDestroy;
 import org.jboss.test.kernel.weld.wbtomc.support.MissingDependenciesConstructorBean;
 import org.jboss.test.kernel.weld.wbtomc.support.MissingDependenciesFieldBean;
+import org.jboss.test.kernel.weld.wbtomc.support.Simple;
+import org.jboss.test.kernel.weld.wbtomc.support.WebBean;
 import org.jboss.testharness.impl.packaging.Artifact;
 
 /**
@@ -82,10 +92,10 @@
       NonContextual<ExternalBeanField> nonContextual = new NonContextual<ExternalBeanField>(getCurrentManager(), ExternalBeanField.class);
       
       ExternalBeanField bean = new ExternalBeanField();
-      assertNull(bean.bean);
+      assertNull(bean.getBean());
       nonContextual.postConstruct(bean);
-      assertNotNull(bean.bean);
-      assertNull(bean.nonAnnotated);
+      assertNotNull(bean.getBean());
+      assertNull(bean.getNonAnnotated());
       nonContextual.preDestroy(bean);
    }
    
@@ -94,10 +104,10 @@
       NonContextual<ExternalBeanField> nonContextual = new NonContextual<ExternalBeanField>(getCurrentManager(), ExternalBeanField.class);
       
       ExternalBeanField bean = nonContextual.produce();
-      assertNull(bean.bean);
+      assertNull(bean.getBean());
       nonContextual.postConstruct(bean);
-      assertNotNull(bean.bean);
-      assertNull(bean.nonAnnotated);
+      assertNotNull(bean.getBean());
+      assertNull(bean.getNonAnnotated());
       nonContextual.preDestroy(bean);
    }
    
@@ -106,8 +116,8 @@
       NonContextual<ExternalBeanConstructor> nonContextual = new NonContextual<ExternalBeanConstructor>(getCurrentManager(), ExternalBeanConstructor.class);
       
       ExternalBeanConstructor bean = nonContextual.produce();
-      assertNotNull(bean.bean);
-      assertNull(bean.nonAnnotated);
+      assertNotNull(bean.getBean());
+      assertNull(bean.getNonAnnotated());
       nonContextual.preDestroy(bean);
    }
    
@@ -116,14 +126,14 @@
       NonContextual<ExternalBeanMixed> nonContextual = new NonContextual<ExternalBeanMixed>(getCurrentManager(), ExternalBeanMixed.class);
       
       ExternalBeanMixed bean = nonContextual.produce();
-      assertNotNull(bean.constructorBean);
-      assertNull(bean.fieldBean);
-      assertNull(bean.nonAnnotated);
+      assertNotNull(bean.getConstructorBean());
+      assertNull(bean.getFieldBean());
+      assertNull(bean.getNonAnnotated());
       
       nonContextual.postConstruct(bean);
-      assertNotNull(bean.constructorBean);
-      assertNotNull(bean.fieldBean);
-      assertNull(bean.nonAnnotated);
+      assertNotNull(bean.getConstructorBean());
+      assertNotNull(bean.getFieldBean());
+      assertNull(bean.getNonAnnotated());
       
       nonContextual.preDestroy(bean);
    }

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,61 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBean
-{
-   WebBean beanFromConstructor;
-   
-   @Inject @Default
-   WebBean bean;
-   
-   WebBean nonInject;
-   
-   @Inject
-   public McBean(@Default WebBean beanFromConstructor)
-   {
-      this.beanFromConstructor = beanFromConstructor;
-   }
-
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   public WebBean getBeanFromConstructor()
-   {
-      return beanFromConstructor;
-   }
-
-   public WebBean getNonInject()
-   {
-      return nonInject;
-   }
-}   

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanAnnotationsFromMetaData.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanAnnotationsFromMetaData.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanAnnotationsFromMetaData.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,59 +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.kernel.weld.wbtomc.test;
-
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBeanAnnotationsFromMetaData
-{
-   WebBean beanFromConstructor;
-   
-   /*@Current*/
-   WebBean bean;
-   
-   WebBean nonInject;
-   
-//   /*@Initializer*/
-   public McBeanAnnotationsFromMetaData(/*@Current*/ WebBean beanFromConstructor)
-   {
-      this.beanFromConstructor = beanFromConstructor;
-   }
-
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   public WebBean getBeanFromConstructor()
-   {
-      return beanFromConstructor;
-   }
-
-   public WebBean getNonInject()
-   {
-      return nonInject;
-   }
-}   

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanInitializerMethod.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanInitializerMethod.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanInitializerMethod.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,54 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBeanInitializerMethod
-{
-   WebBean bean;
-   
-   WebBean nonInject;
-   
-   @Inject
-   public void initializerMethod(@Default WebBean bean)
-   {
-      this.bean = bean;
-   }
-
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   public WebBean getNonInject()
-   {
-      return nonInject;
-   }
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanMcConstructor.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanMcConstructor.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanMcConstructor.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,65 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBeanMcConstructor
-{
-   @Inject @Default
-   WebBean bean;
-   
-   Simple simple;
-   
-   WebBean nonInject;
-   
-   public McBeanMcConstructor()
-   {
-      
-   }
-   
-   public McBeanMcConstructor(Simple simple)
-   {
-      this.simple = simple;
-   }
-   
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   public WebBean getNonInject()
-   {
-      return nonInject;
-   }
-
-   public Simple getSimple()
-   {
-      return simple;
-   }
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWebBeanSetter.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWebBeanSetter.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWebBeanSetter.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,53 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBeanWebBeanSetter
-{
-   WebBean bean;
-   
-   WebBean nonInject;
-   
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   @Inject @Default
-   public void setBean(WebBean bean)
-   {
-      this.bean = bean;
-   }
-   
-   public WebBean getNonInject()
-   {
-      return nonInject;
-   }
-}   

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWithPostConstructAndPreDestroy.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWithPostConstructAndPreDestroy.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/McBeanWithPostConstructAndPreDestroy.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,74 +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.kernel.weld.wbtomc.test;
-
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class McBeanWithPostConstructAndPreDestroy
-{
-   @Inject @Default
-   WebBean bean;
-   
-   boolean postConstructCalled;
-   
-   boolean preDestroyCalled;
-   
-   @Inject
-   public McBeanWithPostConstructAndPreDestroy()
-   {
-   }
-
-   public WebBean getBean()
-   {
-      return bean;
-   }
-
-   public boolean isPostConstructCalled()
-   {
-      return postConstructCalled;
-   }
-
-   public boolean isPreDestroyCalled()
-   {
-      return preDestroyCalled;
-   }
-
-   @PostConstruct
-   public void postConstruct()
-   {
-      postConstructCalled = true;
-   }
-   
-   @PreDestroy
-   public void preDestroy()
-   {
-      preDestroyCalled = true;
-   }
-}   

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/Simple.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/Simple.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/Simple.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,32 +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.kernel.weld.wbtomc.test;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class Simple
-{
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBean.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBean.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBean.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,32 +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.kernel.weld.wbtomc.test;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class WebBean
-{
-
-}

Deleted: projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBeanConsumer.java
===================================================================
--- projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBeanConsumer.java	2009-10-20 14:52:44 UTC (rev 95175)
+++ projects/kernel/trunk/weld-int/src/test/java/org/jboss/test/kernel/weld/wbtomc/test/WebBeanConsumer.java	2009-10-20 15:06:31 UTC (rev 95176)
@@ -1,41 +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.kernel.weld.wbtomc.test;
-
-import javax.enterprise.inject.Default;
-import javax.inject.Inject;
-
-/**
- * 
- * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class WebBeanConsumer
-{
-   @Inject @Default
-   WebBean bean;
-
-   public WebBean getBean()
-   {
-      return bean;
-   }
-}




More information about the jboss-cvs-commits mailing list