[webbeans-commits] Webbeans SVN: r2829 - in ri/trunk: impl/src/main/java/org/jboss/webbeans/bean and 7 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Sun Jun 14 16:29:44 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-06-14 16:29:43 -0400 (Sun, 14 Jun 2009)
New Revision: 2829

Added:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableTransformer.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java
Removed:
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/AnnotatedAdaptor.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolovableTransformer.java
Modified:
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java
   ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/FacadeBeanResolvableTransformer.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ForwardingResolvable.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolvable.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBType.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
   ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
   ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java
Log:
Start to merge Annotated* into core

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/Annotated.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,12 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package javax.enterprise.inject.spi;
 
 import java.lang.annotation.Annotation;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Type;
 import java.util.Set;
 
-public interface Annotated {
-    public Type getType();
-    public <T extends Annotation> T getAnnotation(Class<T> annotationType);
-    public Set<Annotation> getAnnotations();
-    public boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
+/**
+ * The metadata for an annotated element which can be parsed by the
+ * {@link BeanManager}.
+ * 
+ * The semantics are similar to {@link AnnotatedElement}.
+ * 
+ * 
+ * @author Pete Muir
+ * @author Clint Popetz
+ * 
+ */
+public interface Annotated
+{
+
+   /**
+    * Get the type of the annotated element
+    * 
+    * @return the type
+    */
+   public Type getBaseType();
+
+   /**
+    * Get all types the base type should be considered assignable to
+    * 
+    * @return a set of types the base type should be considered assignable to
+    */
+   public Set<Type> getTypeClosure();
+
+   /**
+    * Get the annotation instance on the annoated element for a given annotation
+    * type.
+    * 
+    * @param <T> the type of the annotation
+    * @param annotationType the class object of the annotation type
+    * @return the annotation instance, or null if no annotation is present for
+    *         the given annotationType
+    */
+   public <T extends Annotation> T getAnnotation(Class<T> annotationType);
+
+   /**
+    * Get all the annotation instances on the annotated element
+    * 
+    * @return the annotation instances, or an empty set if no annotations are
+    *         present
+    */
+   public Set<Annotation> getAnnotations();
+
+   /**
+    * Determine if an annotation is present on the annotated element
+    * 
+    * @param annotationType the annotation type to check for
+    * @return true if the annotation is present
+    */
+   public boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedCallable.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,7 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package javax.enterprise.inject.spi;
 
+import java.lang.reflect.Member;
 import java.util.List;
 
-public interface AnnotatedCallable<X> extends AnnotatedMember<X> {
-    public List<AnnotatedParameter<X>> getParameters();
+/**
+ * The metadata for a callable member which can be parsed by the
+ * {@link BeanManager}.
+ * 
+ * The semantics are similar to {@link Member}
+ * 
+ * @author Pete Muir
+ * 
+ * @param <X> the type of the member
+ */
+public interface AnnotatedCallable<X> extends AnnotatedMember<X>
+{
+
+   /**
+    * Get the parameters of the callable member
+    * 
+    * @return the parameters
+    */
+   public List<AnnotatedParameter<X>> getParameters();
+
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedConstructor.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,3 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package javax.enterprise.inject.spi;
 
 import java.lang.reflect.Constructor;
@@ -2,4 +19,22 @@
 
-public interface AnnotatedConstructor<X> extends AnnotatedCallable<X> {
-    public Constructor<X> getJavaMember();
+/**
+ * The metadata for an annotated constructor which can be parsed by the
+ * {@link BeanManager}.
+ * 
+ * The semantics are similar to {@link Constructor}
+ * 
+ * @author Pete Muir
+ * 
+ * @param <X> the type of declaring class
+ */
+public interface AnnotatedConstructor<X> extends AnnotatedCallable<X>
+{
+
+   /**
+    * Get the underlying {@link Constructor} instance
+    * 
+    * @return the constructor instance
+    */
+   public Constructor<X> getJavaMember();
+
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedField.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,7 +1,41 @@
+
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package javax.enterprise.inject.spi;
 
 import java.lang.reflect.Field;
+import java.lang.reflect.Member;
 
+/**
+ * The metadata for an annotated field which can be parsed by the {@link BeanManager}
+ * 
+ * The semantics are similar to {@link Field}
+ * 
+ * @author Pete Muir
+ *
+ * @param <X> the type of the field
+ */
 public interface AnnotatedField<X> extends AnnotatedMember<X> {
-    public Field getJavaMember();
+
+   /**
+    * Get the underlying {@link Member} instance
+    * 
+    * @return the member instance
+    */
+   public Field getJavaMember();
+
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMember.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,3 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package javax.enterprise.inject.spi;
 
 import java.lang.reflect.Member;
@@ -2,6 +19,32 @@
 
-public interface AnnotatedMember<X> extends Annotated {
-    public Member getJavaMember();
-    public boolean isStatic();
-    public AnnotatedType<X> getDeclaringType();
+/**
+ * The metadata for an annotated member which can be parsed by the
+ * {@link BeanManager}.
+ * 
+ * The semantics are similar to {@link Member}
+ * 
+ * @author Pete Muir
+ * 
+ * @param <X> the type of the member
+ */
+public interface AnnotatedMember<X> extends Annotated 
+{
+   /**
+    * Get the underlying {@link Member} instance
+    * 
+    * @return the member
+    */
+   public Member getJavaMember();
+
+   /**
+    * Determine if the member is static
+    * @return
+    */
+   public boolean isStatic();
+
+   /**
+    * Get the type which declares this member
+    * @return the type of which declares this member
+    */
+   public AnnotatedType<X> getDeclaringType();
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedMethod.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,3 +1,19 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package javax.enterprise.inject.spi;
 
 import java.lang.reflect.Method;
@@ -2,4 +18,21 @@
 
-public interface AnnotatedMethod<X> extends AnnotatedCallable<X> {
-    public Method getJavaMember();
+/**
+ * The metadata for an annotated method which can be parsed by the
+ * {@link BeanManager}
+ * 
+ * The semantics are similar to {@link Method}
+ * 
+ * @author Pete Muir
+ * 
+ * @param <X> the return type of the method
+ */
+public interface AnnotatedMethod<X> extends AnnotatedCallable<X>
+{
+
+   /**
+    * Get the underlying {@link Method} instance
+    * 
+    * return the method
+    */
+   public Method getJavaMember();
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedParameter.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,6 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package javax.enterprise.inject.spi;
 
-public interface AnnotatedParameter<X> extends Annotated {
-    public int getPosition();
-    public AnnotatedCallable<X> getDeclaringCallable();
+/**
+ * The metadata for an annotated parameter which can be parsed by the
+ * {@link BeanManager}
+ * 
+ * @author Pete Muir
+ * 
+ * @param <X> the type of the parameter
+ */
+public interface AnnotatedParameter<X> extends Annotated
+{
+
+   /**
+    * The position of the parameter in the callable's argument list
+    * 
+    * @return the position of the parameter
+    */
+   public int getPosition();
+
+   /**
+    * The declaring callable
+    * 
+    * @return the declaring callable
+    */
+   public AnnotatedCallable<X> getDeclaringCallable();
+
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,3 +1,20 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package javax.enterprise.inject.spi;
 
 import java.util.Set;
@@ -2,7 +19,43 @@
 
+/**
+ * The metadata for an annotated type which can be parsed by the {@link BeanManager}
+ * 
+ * The semantics are similar to {@link Class}.
+ * 
+ * @author Pete Muir
+ *
+ * @param <X> the type of the class
+ */
 public interface AnnotatedType<X> extends Annotated {
-    public Class<X> getJavaClass();
-    public Set<AnnotatedConstructor<X>> getConstructors();
-    public Set<AnnotatedMethod<? super X>> getMethods();
-    public Set<AnnotatedField<? super X>> getFields();
+
+   /**
+    * Get the underlying class instance
+    * 
+    * @return
+    */
+   public Class<X> getJavaClass();
+
+   /**
+    * Get the constructors belonging to the class
+    * 
+    * If an empty set is returned, a default (no-args) constructor will be 
+    * assumed.
+    * 
+    * @return the constructors, or an empty set if none are defined
+    */
+   public Set<AnnotatedConstructor<X>> getConstructors();
+
+   /**
+    * Get the business methods belonging to the class.
+    * 
+    * @return the methods, or an empty set if none are defined
+    */
+   public Set<AnnotatedMethod<? super X>> getMethods();
+
+   /**
+    * Get the fields belonging to the class
+    * 
+    * @return the fields, or an empty set if none are defined
+    */
+   public Set<AnnotatedField<? super X>> getFields();
 }

Modified: ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/api/src/main/java/javax/enterprise/inject/spi/BeanManager.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -401,7 +401,7 @@
     * @param <T> 
     * 			The type of the underlying bean
     * @param type 
-    * 			The metadat for construction of the ManagedBean
+    * 			The metadata for construction of the ManagedBean
     */
    public <T> ManagedBean<T> createManagedBean(AnnotatedType<T> type);
 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -40,8 +40,8 @@
 import org.jboss.webbeans.context.DependentInstancesStore;
 import org.jboss.webbeans.conversation.ConversationImpl;
 import org.jboss.webbeans.injection.WBInjectionPoint;
+import org.jboss.webbeans.introspector.WBAnnotated;
 import org.jboss.webbeans.introspector.WBField;
-import org.jboss.webbeans.introspector.WBAnnotated;
 import org.jboss.webbeans.introspector.WBParameter;
 import org.jboss.webbeans.literal.AnyLiteral;
 import org.jboss.webbeans.literal.CurrentLiteral;
@@ -69,9 +69,9 @@
    private static Set<Class<?>> STANDARD_WEB_BEAN_CLASSES = new HashSet<Class<?>>(Arrays.asList(Event.class, BeanManagerImpl.class, ConversationImpl.class));
 
    private boolean proxyable;
-   
+
    protected final DependentInstancesStore dependentInstancesStore;   
-   
+
    /**
     * Helper class for getting deployment type
     * 
@@ -119,11 +119,11 @@
    protected BeanManagerImpl manager;
 
    protected boolean _serializable;
-   
+
    private boolean initialized;
-   
+
    private Set<WBInjectionPoint<?, ?>> decoratesInjectionPoint;
-   
+
    protected boolean isInitialized()
    {
       return initialized;
@@ -190,7 +190,7 @@
          }
       }
    }
-   
+
    protected Set<WBInjectionPoint<?, ?>> getDecoratesInjectionPoint()
    {
       return decoratesInjectionPoint;
@@ -201,7 +201,7 @@
     */
    protected void initTypes()
    {
-      types = getAnnotatedItem().getFlattenedTypeHierarchy();
+      types = getAnnotatedItem().getTypeClosure();
    }
 
    /**
@@ -214,7 +214,7 @@
       initDefaultBindings();
       log.trace("Using binding types " + bindings + " specified by annotations");
    }
-   
+
    protected abstract void initInjectionPoints();
 
    protected void initDefaultBindings()
@@ -336,7 +336,7 @@
          return false;
       }
    }
-   
+
    /**
     * Validates the deployment type
     */
@@ -490,7 +490,7 @@
     * 
     * @return The set of API types
     * 
-    * @see org.jboss.webbeans.bean.BaseBean#getTypes()
+    * @see org.jboss.webbeans.bean.BaseBean#getTypeClosure()
     */
    public Set<Type> getTypes()
    {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -77,7 +77,7 @@
       super(manager);
       this.declaringBean = declaringBean;
    }
-   
+
    @Override
    protected abstract WBMember<T, S> getAnnotatedItem();
 
@@ -110,7 +110,7 @@
       {
          Set<Type> types = new HashSet<Type>();
          types.add(Object.class);
-         types.addAll(getAnnotatedItem().getFlattenedTypeHierarchy());
+         types.addAll(getAnnotatedItem().getTypeClosure());
          super.types = types;
       }
       else
@@ -168,13 +168,13 @@
     */
    protected void checkProducerReturnType()
    {
-      if (getAnnotatedItem().getType() instanceof TypeVariable<?>)
+      if (getAnnotatedItem().getBaseType() instanceof TypeVariable<?>)
       {
-         throw new DefinitionException("Return type must be concrete " + getAnnotatedItem().getType());
+         throw new DefinitionException("Return type must be concrete " + getAnnotatedItem().getBaseType());
       }
-      if (getAnnotatedItem().getType() instanceof WildcardType)
+      if (getAnnotatedItem().getBaseType() instanceof WildcardType)
       {
-         throw new DefinitionException("Return type must be concrete " + getAnnotatedItem().getType());
+         throw new DefinitionException("Return type must be concrete " + getAnnotatedItem().getBaseType());
       }
       for (Type type : getAnnotatedItem().getActualTypeArguments())
       {

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -14,25 +14,25 @@
 
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
+import org.jboss.webbeans.injection.MethodInjectionPoint;
 import org.jboss.webbeans.injection.WBInjectionPoint;
-import org.jboss.webbeans.injection.MethodInjectionPoint;
+import org.jboss.webbeans.introspector.WBAnnotated;
 import org.jboss.webbeans.introspector.WBClass;
-import org.jboss.webbeans.introspector.WBAnnotated;
 
 public class DecoratorBean<T> extends SimpleBean<T> implements Decorator<T>
 {
-   
+
    public static <T> Decorator<T> wrapForResolver(final Decorator<T> decorator)
    {
       return new ForwardingDecorator<T>()
       {
-         
+
          @Override
          public Set<Annotation> getBindings()
          {
             return delegate().getDelegateBindings();
          }
-         
+
          @Override
          public Set<Type> getTypes()
          {
@@ -44,10 +44,10 @@
          {
             return decorator;
          }
-         
+
       };
    }
-   
+
    /**
     * Creates a decorator bean
     * 
@@ -70,7 +70,7 @@
    {
       super(type, manager);
    }
-   
+
    @Override
    public void initialize(BeanDeployerEnvironment environment)
    {
@@ -83,19 +83,19 @@
          initDelegateType();
       }
    }
-   
+
    protected void initDecoratedTypes()
    {
       this.decoratedTypes = new HashSet<Type>();
       this.decoratedTypes.addAll(getAnnotatedItem().getInterfaceOnlyFlattenedTypeHierarchy());
       this.decoratedTypes.remove(Serializable.class);
    }
-   
+
    protected void initDelegate()
    {
       this.decorates = getDecoratesInjectionPoint().iterator().next();
    }
-   
+
    @Override
    protected void checkDecorates()
    {
@@ -115,17 +115,17 @@
          throw new DefinitionException("Too many @Decorates injection point defined " + this);
       }
    }
-   
+
    protected void initDelegateBindings()
    {
       this.delegateBindings = this.decorates.getBindings();
    }
-   
+
    protected void initDelegateType()
    {
-      this.delegateType = this.decorates.getType();
+      this.delegateType = this.decorates.getBaseType();
    }
-   
+
    protected void checkDelegateType()
    {
       for (Type decoratedType : getDecoratedTypes())

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DisposalMethodBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -35,9 +35,9 @@
 
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
-import org.jboss.webbeans.injection.WBInjectionPoint;
 import org.jboss.webbeans.injection.MethodInjectionPoint;
 import org.jboss.webbeans.injection.ParameterInjectionPoint;
+import org.jboss.webbeans.injection.WBInjectionPoint;
 import org.jboss.webbeans.introspector.WBMethod;
 import org.jboss.webbeans.introspector.WBParameter;
 import org.jboss.webbeans.log.LogProvider;
@@ -65,7 +65,7 @@
       this.id = createId("DisposalMethod-" + declaringBean.getName() + "-" + disposalMethod.getSignature().toString());
 
    }
-   
+
    @SuppressWarnings("unchecked")
    protected void initType()
    {
@@ -126,7 +126,7 @@
    {
       Set<Type> types = new HashSet<Type>();
       types = new HashSet<Type>();
-      types.addAll(disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getFlattenedTypeHierarchy());
+      types.addAll(disposalMethodInjectionPoint.getAnnotatedParameters(Disposes.class).get(0).getTypeClosure());
       types.add(getType());
       types.add(Object.class);
       super.types = types;
@@ -173,7 +173,7 @@
    {
       return declaringBean.isSerializable();
    }
-   
+
    @Override
    public boolean isProxyable()
    {
@@ -260,7 +260,7 @@
       }
       this.specializedBean = environment.getDisposalMethod(superClassMethod);
    }
-   
+
    @Override
    public Class<T> getType()
    {
@@ -344,5 +344,5 @@
    {
       return id;
    }
-   
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/EventBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -28,7 +28,7 @@
 
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.event.EventImpl;
-import org.jboss.webbeans.injection.resolution.ResolovableTransformer;
+import org.jboss.webbeans.injection.resolution.ResolvableTransformer;
 import org.jboss.webbeans.literal.AnyLiteral;
 
 public class EventBean extends AbstractFacadeBean<Event<?>>
@@ -38,7 +38,7 @@
    private static final Set<Type>                        DEFAULT_TYPES             = new HashSet<Type>(Arrays.asList(TYPE, Object.class));
    private static final Annotation                       ANY                       = new AnyLiteral();
    private static final Set<Annotation>                  DEFAULT_BINDINGS          = new HashSet<Annotation>(Arrays.asList(ANY));
-   public static final ResolovableTransformer          TRANSFORMER               = new FacadeBeanResolvableTransformer(Event.class, ANY);
+   public static final ResolvableTransformer          TRANSFORMER               = new FacadeBeanResolvableTransformer(Event.class, ANY);
    private static final Set<Class<? extends Annotation>> FILTERED_ANNOTATION_TYPES = new HashSet<Class<? extends Annotation>>(Arrays.asList(Obtains.class));
    
    

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/FacadeBeanResolvableTransformer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/FacadeBeanResolvableTransformer.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/FacadeBeanResolvableTransformer.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -24,7 +24,7 @@
 import java.util.Set;
 
 import org.jboss.webbeans.injection.resolution.ForwardingResolvable;
-import org.jboss.webbeans.injection.resolution.ResolovableTransformer;
+import org.jboss.webbeans.injection.resolution.ResolvableTransformer;
 import org.jboss.webbeans.injection.resolution.Resolvable;
 
 /**
@@ -33,14 +33,14 @@
  * @author Pete Muir
  *
  */
-public class FacadeBeanResolvableTransformer implements ResolovableTransformer
+public class FacadeBeanResolvableTransformer implements ResolvableTransformer
 {
-   
+
    private final Class<?> clazz;
    private final Annotation annotation;
    private final Set<Annotation> bindings;
    private final HashSet<Type> types;
-   
+
    public FacadeBeanResolvableTransformer(Class<?> clazz, Annotation annotation)
    {
       this.clazz = clazz;
@@ -56,7 +56,7 @@
       {
          if (resolvable.isAnnotationPresent(annotation.annotationType()))
          {
-            
+
             return new ForwardingResolvable()
             {
 
@@ -65,35 +65,35 @@
                {
                   return resolvable;
                }
-               
+
                @Override
                public Set<Annotation> getBindings()
                {
                   return Collections.unmodifiableSet(bindings);
                }
-               
+
                @Override
-               public Set<Type> getTypes()
+               public Set<Type> getTypeClosure()
                {
                   return Collections.unmodifiableSet(types);
                }
-               
+
                @Override
                public boolean isAssignableTo(Class<?> clazz)
                {
                   return clazz.isAssignableFrom(clazz);
                }
-               
+
                @Override
                public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
                {
                   return annotation.annotationType().equals(annotationType);
                }
-               
+
             };
          }
       }
       return resolvable;
    }
-   
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/standard/InstanceBean.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -28,7 +28,7 @@
 
 import org.jboss.webbeans.InstanceImpl;
 import org.jboss.webbeans.BeanManagerImpl;
-import org.jboss.webbeans.injection.resolution.ResolovableTransformer;
+import org.jboss.webbeans.injection.resolution.ResolvableTransformer;
 import org.jboss.webbeans.literal.ObtainsLiteral;
 
 public class InstanceBean extends AbstractFacadeBean<Instance<?>>
@@ -39,7 +39,7 @@
    private static final Obtains OBTAINS = new ObtainsLiteral();
    private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>(Arrays.asList(OBTAINS));
    private static final Set<Class<? extends Annotation>> FILTERED_ANNOTATION_TYPES = new HashSet<Class<? extends Annotation>>(Arrays.asList(Obtains.class));
-   public static final ResolovableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE, OBTAINS);
+   public static final ResolvableTransformer TRANSFORMER = new FacadeBeanResolvableTransformer(TYPE, OBTAINS);
    
    
    public static AbstractFacadeBean<Instance<?>> of(BeanManagerImpl manager)

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/ObserverImpl.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -79,13 +79,13 @@
       this.manager = manager;
       this.observerBean = observerBean;
       this.observerMethod = MethodInjectionPoint.of(observerBean, observer);
-      this.eventType = observerMethod.getAnnotatedParameters(Observes.class).get(0).getType();
+      this.eventType = observerMethod.getAnnotatedParameters(Observes.class).get(0).getBaseType();
 
       this.bindings = observerMethod.getAnnotatedParameters(Observes.class).get(0).getBindingsAsArray();
       this.conditional = !observerMethod.getAnnotatedParameters(IfExists.class).isEmpty();
       this.asynchronous = !observerMethod.getAnnotatedParameters(Asynchronously.class).isEmpty();
    }
-   
+
    /**
     * Completes initialization of the observer and allows derived types to
     * override behavior.
@@ -143,7 +143,7 @@
       {
          throw new DefinitionException(this + " cannot be annotated with @Initializer");
       }
-      
+
       // We cannot allow asynchronously invoked conditional observers either
       if (this.asynchronous && this.conditional)
       {

Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/AnnotatedAdaptor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/AnnotatedAdaptor.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/AnnotatedAdaptor.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,43 +0,0 @@
-package org.jboss.webbeans.injection;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.Annotated;
-
-import org.jboss.webbeans.introspector.WBAnnotated;
-
-public class AnnotatedAdaptor implements Annotated
-{
-
-   private final WBAnnotated<?, ?> annotatedItem;
-   
-   public AnnotatedAdaptor(WBAnnotated<?, ?> annotatedItem)
-   {
-      this.annotatedItem = annotatedItem;
-   }
-
-   public <T extends Annotation> T getAnnotation(Class<T> annotationType)
-   {
-      return annotatedItem.getAnnotation(annotationType);
-   }
-
-   public Set<Annotation> getAnnotations()
-   {
-      return annotatedItem.getAnnotations();
-   }
-
-   public Type getType()
-   {
-      return annotatedItem.getType();
-   }
-
-   public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
-   {
-      return annotationType.isAnnotationPresent(annotationType);
-   }
-
-   
-   
-}

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ConstructorInjectionPoint.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -32,18 +32,18 @@
 import javax.enterprise.inject.spi.Bean;
 
 import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.ForwardingWBConstructor;
 import org.jboss.webbeans.introspector.WBConstructor;
 import org.jboss.webbeans.introspector.WBParameter;
-import org.jboss.webbeans.introspector.ForwardingWBConstructor;
 
 public class ConstructorInjectionPoint<T> extends ForwardingWBConstructor<T> implements WBInjectionPoint<T, Constructor<T>>
 {
-   
+
    private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?>>
    {
-      
+
       protected abstract List<? extends WBParameter<?>> delegate();
-      
+
       protected abstract Bean<?> declaringBean();;
 
       @Override
@@ -51,17 +51,17 @@
       {
          return ParameterInjectionPoint.of(declaringBean, delegate().get(index));
       }
-      
+
       @Override
       public int size()
       {
          return delegate().size();
       }
-      
+
    }
-   
+
    private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
-   
+
    private final Bean<?> declaringBean;
    private final WBConstructor<T> constructor;
 
@@ -69,13 +69,13 @@
    {
       return new ConstructorInjectionPoint<T>(declaringBean, constructor);
    }
-   
+
    protected ConstructorInjectionPoint(Bean<?> declaringBean, WBConstructor<T> constructor)
    {
       this.declaringBean = declaringBean;
       this.constructor = constructor;
    }
-   
+
    @Override
    protected WBConstructor<T> delegate()
    {
@@ -91,7 +91,7 @@
    {
       return delegate().getBindings();
    }
-   
+
    public T newInstance(BeanManagerImpl manager, CreationalContext<?> creationalContext)
    {
       try
@@ -116,7 +116,7 @@
       }
       return null;
    }
-   
+
    @Override
    public List<ParameterInjectionPoint<?>> getParameters()
    {
@@ -132,13 +132,13 @@
 
          @Override
          protected List<? extends WBParameter<?>> delegate()
-         {
+               {
             return delegate;
-         }
-         
+               }
+
       };
    }
-   
+
    public void inject(Object declaringInstance, Object value)
    {
       throw new UnsupportedOperationException();
@@ -170,7 +170,7 @@
       }
       return parameterValues;
    }
-   
+
    public Type getType()
    {
       return getRawType();
@@ -178,7 +178,7 @@
 
    public Annotated getAnnotated()
    {
-      return new AnnotatedAdaptor(delegate());
+      return delegate();
    }
 
    public boolean isDelegate()

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/FieldInjectionPoint.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -20,6 +20,7 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
+import java.lang.reflect.Type;
 import java.util.Set;
 
 import javax.enterprise.context.spi.CreationalContext;
@@ -27,8 +28,8 @@
 import javax.enterprise.inject.spi.Bean;
 
 import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.ForwardingWBField;
 import org.jboss.webbeans.introspector.WBField;
-import org.jboss.webbeans.introspector.ForwardingWBField;
 
 public class FieldInjectionPoint<T> extends ForwardingWBField<T> implements WBInjectionPoint<T, Field>
 {
@@ -99,7 +100,7 @@
 
    public Annotated getAnnotated()
    {
-      return new AnnotatedAdaptor(delegate());
+      return delegate();
    }
 
    public boolean isDelegate()
@@ -108,4 +109,9 @@
       return false;
    }
 
+   public Type getType()
+   {
+      return getBaseType();
+   }
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/MethodInjectionPoint.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -21,6 +21,7 @@
 import java.lang.annotation.Annotation;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Type;
 import java.util.AbstractList;
 import java.util.Iterator;
 import java.util.List;
@@ -31,18 +32,18 @@
 import javax.enterprise.inject.spi.Bean;
 
 import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.ForwardingWBMethod;
 import org.jboss.webbeans.introspector.WBMethod;
 import org.jboss.webbeans.introspector.WBParameter;
-import org.jboss.webbeans.introspector.ForwardingWBMethod;
 
 public class MethodInjectionPoint<T> extends ForwardingWBMethod<T> implements WBInjectionPoint<T, Method>
 {
-   
+
    private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?>>
    {
-      
+
       protected abstract List<? extends WBParameter<?>> delegate();
-      
+
       protected abstract Bean<?> declaringBean();;
 
       @Override
@@ -50,17 +51,17 @@
       {
          return ParameterInjectionPoint.of(declaringBean, delegate().get(index));
       }
-      
+
       @Override
       public int size()
       {
          return delegate().size();
       }
-      
+
    }
-   
+
    private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
-   
+
    private final Bean<?> declaringBean;
    private final WBMethod<T> method;
 
@@ -68,13 +69,13 @@
    {
       return new MethodInjectionPoint<T>(declaringBean, method);
    }
-   
+
    protected MethodInjectionPoint(Bean<?> declaringBean, WBMethod<T> method)
    {
       this.declaringBean = declaringBean;
       this.method = method;
    }
-   
+
    @Override
    protected WBMethod<T> delegate()
    {
@@ -90,7 +91,7 @@
    {
       return delegate().getBindings();
    }
-   
+
    public T invoke(Object declaringInstance, BeanManagerImpl manager, CreationalContext<?> creationalContext, Class<? extends RuntimeException> exceptionTypeToThrow)
    {
       try
@@ -111,7 +112,7 @@
       }
       return null;
    }
-   
+
    @SuppressWarnings("unchecked")
    public T invokeWithSpecialValue(Object declaringInstance, Class<? extends Annotation> annotatedParameter, Object parameter, BeanManagerImpl manager, CreationalContext<?> creationalContext, Class<? extends RuntimeException> exceptionTypeToThrow)
    {
@@ -133,7 +134,7 @@
       }
       return null;
    }
-   
+
    public T invokeOnInstance(Object declaringInstance, BeanManagerImpl manager, CreationalContext<?> creationalContext, Class<? extends RuntimeException> exceptionTypeToThrow)
    {
       try
@@ -162,7 +163,7 @@
       }
       return null;
    }
-   
+
    @SuppressWarnings("unchecked")
    public T invokeOnInstanceWithSpecialValue(Object declaringInstance, Class<? extends Annotation> annotatedParameter, Object parameter, BeanManagerImpl manager, CreationalContext<?> creationalContext, Class<? extends RuntimeException> exceptionTypeToThrow)
    {
@@ -192,7 +193,7 @@
       }
       return null;
    }
-   
+
    @Override
    public List<ParameterInjectionPoint<?>> getParameters()
    {
@@ -208,13 +209,13 @@
 
          @Override
          protected List<? extends WBParameter<?>> delegate()
-         {
+               {
             return delegate;
-         }
-         
+               }
+
       };
    }
-   
+
    public void inject(Object declaringInstance, Object value)
    {
       try
@@ -264,7 +265,7 @@
 
    public Annotated getAnnotated()
    {
-      return new AnnotatedAdaptor(delegate());
+      return delegate();
    }
 
    public boolean isDelegate()
@@ -278,5 +279,10 @@
       // TODO Auto-generated method stub
       return false;
    }
-   
+
+   public Type getType()
+   {
+      return getBaseType();
+   }
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ParameterInjectionPoint.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -18,6 +18,7 @@
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Member;
+import java.lang.reflect.Type;
 import java.util.Set;
 
 import javax.enterprise.context.spi.CreationalContext;
@@ -25,19 +26,19 @@
 import javax.enterprise.inject.spi.Bean;
 
 import org.jboss.webbeans.BeanManagerImpl;
+import org.jboss.webbeans.introspector.ForwardingWBParameter;
 import org.jboss.webbeans.introspector.WBParameter;
-import org.jboss.webbeans.introspector.ForwardingWBParameter;
 
 public class ParameterInjectionPoint<T> extends ForwardingWBParameter<T> implements WBInjectionPoint<T, Object>
 {
-   
+
    private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
-   
+
    public static <T> ParameterInjectionPoint<T> of(Bean<?> declaringBean, WBParameter<T> parameter)
    {
       return new ParameterInjectionPoint<T>(declaringBean, parameter);
    }
-   
+
    private final Bean<?> declaringBean;
    private final WBParameter<T> parameter;
 
@@ -67,12 +68,12 @@
    {
       return delegate().getDeclaringMember().getMember();
    }
-   
+
    public void inject(Object declaringInstance, Object value)
    {
       throw new UnsupportedOperationException();
    }
-   
+
    @SuppressWarnings("unchecked")
    public T getValueToInject(BeanManagerImpl manager, CreationalContext<?> creationalContext)
    {
@@ -81,7 +82,7 @@
 
    public Annotated getAnnotated()
    {
-      return new AnnotatedAdaptor(delegate());
+      return delegate();
    }
 
    public boolean isDelegate()
@@ -96,4 +97,9 @@
       return false;
    }
 
+   public Type getType()
+   {
+      return getBaseType();
+   }
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ForwardingResolvable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ForwardingResolvable.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ForwardingResolvable.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -19,9 +19,9 @@
       return delegate().isAnnotationPresent(annotationType);
    }
    
-   public Set<Type> getTypes()
+   public Set<Type> getTypeClosure()
    {
-      return delegate().getTypes();
+      return delegate().getTypeClosure();
    }
    
    public boolean isAssignableTo(Class<?> clazz)

Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolovableTransformer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolovableTransformer.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolovableTransformer.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -1,26 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.webbeans.injection.resolution;
-
-
-
-public interface ResolovableTransformer
-{
-   
-   public Resolvable transform(Resolvable element);
-   
-}

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolvable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolvable.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolvable.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -19,6 +19,6 @@
    
    public boolean isAssignableTo(Class<?> clazz);
    
-   public Set<Type> getTypes();
+   public Set<Type> getTypeClosure();
 
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableFactory.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -10,7 +10,7 @@
 
 public class ResolvableFactory
 {
-   
+
    public static Resolvable of(WBAnnotated<?, ?> element)
    {
       if (element instanceof Resolvable)
@@ -20,25 +20,25 @@
       else
       {
          Set<Type> types = new HashSet<Type>();
-         types.add(element.getType());
+         types.add(element.getBaseType());
          return new ResolvableImpl(element.getBindings(), types);
       }
    }
-   
+
    private ResolvableFactory() {}
-   
+
    private static class ResolvableImpl implements Resolvable
    {
-      
+
       private final Set<Annotation> bindings;
       private final Set<Class<? extends Annotation>> annotationTypes;
-      private final Set<Type> types;
-      
-      public ResolvableImpl(Set<Annotation> bindings, Set<Type> types)
+      private final Set<Type> typeClosure;
+
+      public ResolvableImpl(Set<Annotation> bindings, Set<Type> typeClosure)
       {
          this.bindings = bindings;
          this.annotationTypes = new HashSet<Class<? extends Annotation>>();
-         this.types = types;
+         this.typeClosure = typeClosure;
          for (Annotation annotation : bindings)
          {
             annotationTypes.add(annotation.annotationType());
@@ -54,17 +54,23 @@
       {
          return annotationTypes.contains(annotationType);
       }
-      
-      public Set<Type> getTypes()
+
+      public Set<Type> getTypeClosure()
       {
-         return types;
+         return typeClosure;
       }
-      
+
       public boolean isAssignableTo(Class<?> clazz)
       {
-         return Reflections.isAssignableFrom(clazz, types);
+         return Reflections.isAssignableFrom(clazz, typeClosure);
       }
-      
+
+      @Override
+      public String toString()
+      {
+         return "Types: " + getTypeClosure() + "; Bindings: " + getBindings();
+      }
+
    }
 
 }

Copied: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableTransformer.java (from rev 2827, ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolovableTransformer.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableTransformer.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableTransformer.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -0,0 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.injection.resolution;
+
+
+
+public interface ResolvableTransformer
+{
+   
+   public Resolvable transform(Resolvable element);
+   
+}


Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableTransformer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/ResolvableWBClass.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -32,31 +32,31 @@
 
 import org.jboss.webbeans.BeanManagerImpl;
 import org.jboss.webbeans.injection.WBInjectionPoint;
-import org.jboss.webbeans.introspector.WBAnnotated;
 import org.jboss.webbeans.introspector.AnnotationStore;
+import org.jboss.webbeans.introspector.WBAnnotated;
 import org.jboss.webbeans.introspector.jlr.AbstractWBAnnotated;
 import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Reflections;
 
 public class ResolvableWBClass<T> extends AbstractWBAnnotated<T, Class<T>> implements Resolvable
 {
-   
+
    private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
    private static final Set<Annotation> EMPTY_ANNOTATION_SET = Collections.emptySet();
-   
+
    private final Class<T> rawType;
-   private final Set<Type> types;
+   private final Set<Type> typeClosure;
    private final Type[] actualTypeArguments;
-   
+
    private final String _string;
-   
+
    private final BeanManagerImpl manager;
-   
+
    public static <T> WBAnnotated<T, Class<T>> of(TypeLiteral<T> typeLiteral, Annotation[] annotations, BeanManagerImpl manager)
    {
       return new ResolvableWBClass<T>(typeLiteral.getType(), annotations, manager);
    }
-   
+
    public static <T> WBAnnotated<T, Class<T>> of(Type type, Annotation[] annotations, BeanManagerImpl manager)
    {
       return new ResolvableWBClass<T>(type, annotations, manager);
@@ -75,7 +75,7 @@
          return new ResolvableWBClass<T>(injectionPoint.getType(), injectionPoint.getAnnotated().getAnnotations(), manager);
       }
    }
-   
+
    public static <T> WBAnnotated<T, Class<T>> of(Member member, Annotation[] annotations, BeanManagerImpl manager)
    {
       if (member instanceof Field)
@@ -91,13 +91,13 @@
          throw new IllegalStateException();
       }
    }
-   
+
    private ResolvableWBClass(Type type, AnnotationStore annotationStore, BeanManagerImpl manager)
    {
       super(annotationStore);
-      
+
       this.manager = manager;
-      
+
       if (type instanceof ParameterizedType)
       {
          ParameterizedType parameterizedType = (ParameterizedType) type;
@@ -122,15 +122,15 @@
       {
          throw new IllegalArgumentException("Unable to extract type information from " + type);
       }
-      this.types = new HashSet<Type>();
-      types.add(type);
+      this.typeClosure = new HashSet<Type>();
+      typeClosure.add(type);
    }
-   
+
    private ResolvableWBClass(Type type, Annotation[] annotations, BeanManagerImpl manager)
    {
       this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_ARRAY), manager);
    }
-   
+
    private ResolvableWBClass(Type type, Set<Annotation>annotations, BeanManagerImpl manager)
    {
       this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_SET), manager);
@@ -164,12 +164,6 @@
    {
       return rawType;
    }
-   
-   @Override
-   public Type getType()
-   {
-      return getRawType();
-   }
 
    public boolean isFinal()
    {
@@ -185,27 +179,27 @@
    {
       throw new UnsupportedOperationException();
    }
-   
+
    @Override
-   public Set<Type> getFlattenedTypeHierarchy()
+   public boolean isProxyable()
    {
       throw new UnsupportedOperationException();
    }
-   
-   @Override
-   public boolean isProxyable()
+
+   public Set<Type> getTypeClosure()
    {
-      throw new UnsupportedOperationException();
+      return typeClosure;
    }
 
-   public Set<Type> getTypes()
+   @Override
+   public Type getBaseType()
    {
-      return types;
+      return getRawType();
    }
 
    public boolean isAssignableTo(Class<?> clazz)
    {
-      return Reflections.isAssignableFrom(clazz, getType());
+      return Reflections.isAssignableFrom(clazz, getBaseType());
    }
 
 }
\ No newline at end of file

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/resolution/Resolver.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -59,7 +59,7 @@
       
       public boolean matches(Set<Type> types, Set<Annotation> bindings)
       {
-         return Reflections.isAssignableFrom(this.getTypes(), types) && Beans.containsAllBindings(this.getBindings(), bindings, manager);
+         return Reflections.isAssignableFrom(this.getTypeClosure(), types) && Beans.containsAllBindings(this.getBindings(), bindings, manager);
       }
       
       @Override
@@ -68,7 +68,7 @@
          if (obj instanceof Resolvable)
          {
             Resolvable that = (Resolvable) obj;
-            return this.matches(that.getTypes(), that.getBindings());
+            return this.matches(that.getTypeClosure(), that.getBindings());
          }
          else
          {
@@ -92,7 +92,7 @@
    private final BeanManagerImpl manager;
    
    // Annotation transformers used to mutate annotations during resolution
-   private final Set<ResolovableTransformer> transformers;
+   private final Set<ResolvableTransformer> transformers;
 
    /**
     * Constructor
@@ -105,7 +105,7 @@
       this.injectionPoints = new HashSet<WBAnnotated<?, ?>>();
       this.resolvedInjectionPoints = new ConcurrentCache<Resolvable, Set<Bean<?>>>();
       this.resolvedNames = new ConcurrentCache<String, Set<Bean<?>>>();
-      this.transformers = new HashSet<ResolovableTransformer>();
+      this.transformers = new HashSet<ResolvableTransformer>();
       transformers.add(EventBean.TRANSFORMER);
       transformers.add(InstanceBean.TRANSFORMER);
    }
@@ -187,7 +187,7 @@
    
    private Resolvable transformElement(Resolvable element)
    {
-      for (ResolovableTransformer transformer : transformers)
+      for (ResolvableTransformer transformer : transformers)
       {
          element = transformer.transform(element);
       }

Added: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java	                        (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.Annotated;
+
+/**
+ * Base class to allow implementation of the decorator pattern
+ * 
+ * @author Pete Muir
+ *
+ * @param <T> the base type
+ * @param <S> the annotated element type
+ */
+public abstract class ForwardingAnnotated<T, S> implements Annotated
+{
+
+   protected abstract Annotated delegate();
+
+   public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+   {
+      return delegate().getAnnotation(annotationType);
+   }
+
+   public Set<Annotation> getAnnotations()
+   {
+      return delegate().getAnnotations();
+   }
+
+   public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
+   {
+      return delegate().isAnnotationPresent(annotationType);
+   }
+
+   public Type getBaseType()
+   {
+      return delegate().getBaseType();
+   }
+
+   public Set<Type> getTypeClosure()
+   {
+      return delegate().getTypeClosure();
+   }
+
+   @Override
+   public boolean equals(Object obj)
+   {
+      return delegate().equals(obj);
+   }
+
+   @Override
+   public int hashCode()
+   {
+      return delegate().hashCode();
+   }
+
+   @Override
+   public String toString()
+   {
+      return delegate().toString();
+   }
+
+}
\ No newline at end of file


Property changes on: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotated.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBAnnotated.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -28,104 +28,51 @@
  * @param <T>
  * @param <S>
  */
-public abstract class ForwardingWBAnnotated<T, S> implements WBAnnotated<T, S>
+public abstract class ForwardingWBAnnotated<T, S> extends ForwardingAnnotated<T, S> implements WBAnnotated<T, S>
 {
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public Type[] getActualTypeArguments()
    {
       return delegate().getActualTypeArguments();
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   public <A extends Annotation> A getAnnotation(Class<A> annotationType)
-   {
-      return delegate().getAnnotation(annotationType);
-   }
-
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   public Set<Annotation> getAnnotations()
-   {
-      return delegate().getAnnotations();
-   }
-
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
    {
       return delegate().getMetaAnnotations(metaAnnotationType);
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
    {
       return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    @Deprecated
    public Set<Annotation> getBindings()
    {
       return delegate().getBindings();
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    @Deprecated
    public Annotation[] getBindingsAsArray()
    {
       return delegate().getBindingsAsArray();
    }
-   
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
-   {
-      return delegate().isAnnotationPresent(annotationType);
-   }
-   
+
    public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
    {
       return delegate().getDeclaredMetaAnnotations(metaAnnotationType);
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public String getName()
    {
       return delegate().getName();
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public Class<T> getRawType()
    {
       return delegate().getRawType();
    }
-   
-   public Type getType()
-   {
-      return delegate().getType();
-   }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public boolean isAssignableFrom(WBAnnotated<?, ?> that)
    {
       return delegate().isAssignableFrom(that);
@@ -136,95 +83,43 @@
       return delegate().isAssignableFrom(type, actualTypeArguments);
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public boolean isFinal()
    {
       return delegate().isFinal();
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public boolean isStatic()
    {
       return delegate().isStatic();
    }
 
-   /**
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
    public boolean isProxyable()
    {
       return delegate().isProxyable();
    }
-   
+
    public boolean isPublic()
    {
       return delegate().isPublic();
    }
 
-   /**
-    * Overridden method into delegate
-    * 
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   @Override
-   public boolean equals(Object obj)
-   {
-      return delegate().equals(obj);
-   }
-
-   /**
-    * Overridden method into delegate
-    * 
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   @Override
-   public int hashCode()
-   {
-      return delegate().hashCode();
-   }
-
-   /**
-    * Overridden method into delegate
-    * 
-    * @see org.jboss.webbeans.introspector.WBAnnotated
-    */
-   @Override
-   public String toString()
-   {
-      return delegate().toString();
-   }
-
-   /**
-    * Gets the annotated item
-    * 
-    * @return The annotated item
-    */
    protected abstract WBAnnotated<T, S> delegate();
-   
+
    public AnnotationStore getAnnotationStore()
    {
       return delegate().getAnnotationStore();
    }
-   
+
    public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
    {
       return delegate().isDeclaredAnnotationPresent(annotationType);
    }
-   
-   public Set<Type> getFlattenedTypeHierarchy()
-   {
-      return delegate().getFlattenedTypeHierarchy();
-   }
-   
+
    public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
    {
       return delegate().getInterfaceOnlyFlattenedTypeHierarchy();
    }
-   
+
    public boolean isParameterizedType()
    {
       return delegate().isParameterizedType();

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBConstructor.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -32,9 +32,9 @@
       return delegate().getAnnotatedParameters(annotationType);
    }
 
-   public WBType<T> getDeclaringClass()
+   public WBType<T> getDeclaringType()
    {
-      return delegate().getDeclaringClass();
+      return delegate().getDeclaringType();
    }
 
    public List<? extends WBParameter<?>> getParameters()

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBField.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -34,9 +34,9 @@
       return delegate().getAnnotatedField();
    }
 
-   public WBType<?> getDeclaringClass()
+   public WBType<?> getDeclaringType()
    {
-      return delegate().getDeclaringClass();
+      return delegate().getDeclaringType();
    }
 
    public String getPropertyName()
@@ -53,5 +53,5 @@
    {
       return delegate().isTransient();
    }  
-      
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/ForwardingWBMethod.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -23,23 +23,23 @@
 
 public abstract class ForwardingWBMethod<T> extends ForwardingWBMember<T, Method> implements WBMethod<T>
 {
-   
+
    @Override
    protected abstract WBMethod<T> delegate();
-   
+
    public Method getAnnotatedMethod()
    {
       return delegate().getAnnotatedMethod();
    }
-   
+
    public List<WBParameter<?>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType)
    {
       return delegate().getAnnotatedParameters(metaAnnotationType);
    }
 
-   public WBType<?> getDeclaringClass()
+   public WBType<?> getDeclaringType()
    {
-      return delegate().getDeclaringClass();
+      return delegate().getDeclaringType();
    }
 
    public Class<?>[] getParameterTypesAsArray()
@@ -48,9 +48,9 @@
    }
 
    public List<? extends WBParameter<?>> getParameters()
-   {
+         {
       return delegate().getParameters();
-   }
+         }
 
    public String getPropertyName()
    {
@@ -71,10 +71,10 @@
    {
       return delegate().isEquivalent(method);
    }
-   
+
    public MethodSignature getSignature()
    {
       return delegate().getSignature();
    }
-   
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBAnnotated.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -26,6 +26,7 @@
 import javax.enterprise.inject.BindingType;
 import javax.enterprise.inject.Stereotype;
 import javax.enterprise.inject.deployment.DeploymentType;
+import javax.enterprise.inject.spi.Annotated;
 
 /**
  * AnnotatedItem provides a uniform access to the annotations on an annotated
@@ -34,20 +35,12 @@
  * @author Pete Muir
  * 
  */
-public interface WBAnnotated<T, S>
+public interface WBAnnotated<T, S> extends Annotated
 {
-   
-// The set of meta-annotations to map
+
+   // The set of meta-annotations to map
    @SuppressWarnings("unchecked")
    public static final Set<Class<? extends Annotation>> MAPPED_METAANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(BindingType.class, DeploymentType.class, Stereotype.class, ScopeType.class));
-   
-   /**
-    * Gets all annotations on the item
-    * 
-    * @return A set of annotations. Returns an empty set if there are no
-    *         matches.
-    */
-   public <A extends Annotation> Set<A> getAnnotations();
 
    /**
     * Gets all annotations which are annotated with the given meta annotation
@@ -58,7 +51,7 @@
     *         are no matches.
     */
    public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
-   
+
    /**
     * Gets all annotations which are declared on this annotated item 
     * with the given meta annotation type
@@ -100,24 +93,6 @@
    public Annotation[] getBindingsAsArray();
 
    /**
-    * Gets an annotation for the annotation type specified.
-    * 
-    * @param annotationType The annotation to match
-    * @return An annotation if found, null if the annotation wasn't present.
-    */
-   public <A extends Annotation> A getAnnotation(Class<A> annotationType);
-   
-   /**
-    * Get the whole type hierarchy as a set of flattened types.
-    * 
-    * The returned types should have any type parameters resolved to their
-    * actual types.
-    * 
-    * @return the type hierarchy
-    */
-   public Set<Type> getFlattenedTypeHierarchy();
-   
-   /**
     * Get the type hierarchy of any interfaces implemented by this class.
     * 
     * Interface hierarchies from super classes are not included.
@@ -135,14 +110,6 @@
     * @param annotationType The annotation to match
     * @return True if present, false if not
     */
-   public boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
-   
-   /**
-    * Indicates if an annotation type specified is present
-    * 
-    * @param annotationType The annotation to match
-    * @return True if present, false if not
-    */
    public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType);
 
    /**
@@ -151,8 +118,6 @@
     * @return The type of the element
     */
    public Class<T> getRawType();
-   
-   public Type getType();
 
    /**
     * Extends Java Class assignability such that actual type parameters are also
@@ -162,7 +127,7 @@
     * @return True if assignable, false otherwise.
     */
    public boolean isAssignableFrom(WBAnnotated<?, ?> that);
-   
+
    /**
     * Extends Java Class assignability such that actual type parameters are also
     * considered
@@ -200,7 +165,7 @@
     * @return True if proxyable, false otherwise
     */
    public boolean isProxyable();
-   
+
    /**
     * Indicates if this annotated item is public
     * 
@@ -217,9 +182,9 @@
     * @return The name
     */
    public String getName();
-   
+
    public AnnotationStore getAnnotationStore();
-   
+
    public boolean isParameterizedType();
 
 }
\ No newline at end of file

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBClass.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -35,7 +35,7 @@
     * @return A set of abstracted fields
     */
    public Set<WBField<?>> getFields();
-   
+
    /**
     * Get a field by name
     * 
@@ -55,7 +55,7 @@
     *         empty set if there are no matches
     */
    public Set<WBField<?>> getAnnotatedFields(Class<? extends Annotation> annotationType);
-   
+
    /**
     * Gets all fields which are annotated with the given annotation type on this
     * class only.
@@ -97,7 +97,7 @@
     * @return The no-args constructor, or null if not defined
     */
    public WBConstructor<T> getNoArgsConstructor();
-   
+
    /**
     * Get the constructor which matches the argument list provided
     * 
@@ -114,7 +114,7 @@
     *         empty set if there are no matches
     */
    public Set<WBMethod<?>> getAnnotatedMethods(Class<? extends Annotation> annotationType);
-   
+
    /**
     * Gets all methods annotated with annotationType
     * 
@@ -123,7 +123,7 @@
     *         empty set if there are no matches
     */
    public Set<WBMethod<?>> getDeclaredAnnotatedMethods(Class<? extends Annotation> annotationType);
-   
+
    /**
     * Find the annotated method for a given methodDescriptor
     * 
@@ -134,7 +134,7 @@
     */
    @Deprecated
    public WBMethod<?> getMethod(Method method);
-   
+
    /**
     * Get a method by name
     * 
@@ -144,11 +144,11 @@
     * @return the method, or null if it doesn't exist
     */
    public <M> WBMethod<M> getDeclaredMethod(MethodSignature signature, WBClass<M> expectedReturnType);
-   
+
    // TODO Replace with AnnotatedMethod variant
    @Deprecated
    public WBMethod<?> getDeclaredMethod(Method method);
-   
+
    /**
     * Gets all with parameters annotated with annotationType
     * 
@@ -157,7 +157,7 @@
     *         empty set if there are no matches
     */
    public Set<WBMethod<?>> getMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
-   
+
    /**
     * Gets all with constructors annotated with annotationType
     * 
@@ -166,7 +166,7 @@
     *         empty set if there are no matches
     */
    public Set<WBConstructor<?>> getConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
-   
+
    /**
     * Gets all with parameters annotated with annotationType
     * 
@@ -182,22 +182,22 @@
     * @return The abstracted superclass, null if there is no superclass
     */
    public WBClass<?> getSuperclass();
-   
+
    /**
     * Determine if this is a non-static member class
     *
     * @return true if this is a non-static member  
     */
    public boolean isNonStaticMemberClass();
-   
+
    public boolean isParameterizedType();
-   
+
    public boolean isAbstract();
-   
+
    public boolean isEnum();
-   
+
    public <S> S cast(Object object);
-   
+
    public <U> WBClass<? extends U> asSubclass(WBClass<U> clazz);
 
 }
\ No newline at end of file

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBConstructor.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -34,7 +34,7 @@
  */
 public interface WBConstructor<T> extends WBMember<T, Constructor<T>>
 {
-   
+
    @SuppressWarnings("unchecked")
    public static final Set<Class<? extends Annotation>> MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Decorates.class));
 
@@ -68,8 +68,8 @@
     * 
     * @return An abstraction of the declaring class
     */
-   public WBType<T> getDeclaringClass();
-   
+   public WBType<T> getDeclaringType();
+
    public ConstructorSignature getSignature();
 
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBField.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -27,14 +27,14 @@
  */
 public interface WBField<T> extends WBMember<T, Field>
 {
-   
+
    /**
     * Gets the annotated field
     * 
     * @return The annotated field
     */
    public Field getAnnotatedField();
-   
+
    /**
     * Injects an instance
     * 
@@ -43,16 +43,16 @@
     * @param value The value to inject
     */
    public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException;
-   
+
    public T get(Object instance);
-   
+
    /**
     * Gets an abstraction of the declaring class
     * 
     * @return The declaring class
     */
-   public WBType<?> getDeclaringClass();
-   
+   public WBType<?> getDeclaringType();
+
    /**
     * Gets the property name of the field
     * 

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMember.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -25,14 +25,14 @@
  */
 public interface WBMember<T, S extends Member> extends WBAnnotated<T, S>
 {
-   
+
    public S getMember();
-   
+
    /**
     * Gets an abstraction of the declaring class
     * 
     * @return The declaring class
     */
-   public WBType<?> getDeclaringClass();
-   
+   public WBType<?> getDeclaringType();
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBMethod.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -61,7 +61,7 @@
     *         there are no matches.
     */
    public List<WBParameter<?>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
-   
+
    /**
     * Get the parameter types as an array
     */
@@ -75,7 +75,7 @@
     * @return A reference to the instance
     */
    public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException;
-   
+
    /**
     * Invokes the method on the class of the passed instance, not the declaring 
     * class. Useful with proxies
@@ -91,7 +91,7 @@
     * 
     * @return An abstraction of the declaring class
     */
-   public WBType<?> getDeclaringClass();
+   public WBType<?> getDeclaringType();
 
    /**
     * Gets the property name
@@ -99,7 +99,7 @@
     * @return The name
     */
    public String getPropertyName();
-   
+
    /**
     * Checks if a this is equivalent to a JLR method
     * 
@@ -109,7 +109,7 @@
    public boolean isEquivalent(Method method);
 
    public Method getAnnotatedMethod();
-   
+
    public MethodSignature getSignature();
 
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBParameter.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -18,6 +18,7 @@
 
 
 
+
 /**
  * AnnotatedParameter provides a uniform access to a method parameter defined
  * either in Java or XML
@@ -27,7 +28,7 @@
  */
 public interface WBParameter<T> extends WBAnnotated<T, Object>
 {
-   
+
    public WBMember<?, ?> getDeclaringMember();
-   
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBType.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBType.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/WBType.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -17,6 +17,7 @@
 package org.jboss.webbeans.introspector;
 
 
+
 /**
  * AnnotatedType provides a uniform access to a type defined either in Java or
  * XML
@@ -33,14 +34,14 @@
     * @return The abstracted superclass
     */
    public WBType<?> getSuperclass();
-   
+
    /**
     * Check if this is equivalent to a java class
     * @param clazz The Java class
     * @return true if equivalent
     */
    public boolean isEquivalent(Class<?> clazz);
-   
+
    public String getSimpleName();
 
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractWBAnnotated.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -23,8 +23,8 @@
 import java.util.HashSet;
 import java.util.Set;
 
+import org.jboss.webbeans.introspector.AnnotationStore;
 import org.jboss.webbeans.introspector.WBAnnotated;
-import org.jboss.webbeans.introspector.AnnotationStore;
 import org.jboss.webbeans.util.Proxies;
 import org.jboss.webbeans.util.Reflections;
 
@@ -44,14 +44,14 @@
  */
 public abstract class AbstractWBAnnotated<T, S> implements WBAnnotated<T, S>
 {
-   
+
    interface WrappableAnnotatedItem<T, S> extends WBAnnotated<T, S>
    {
-      
+
       AnnotationStore getAnnotationStore();
-      
+
    }
-   
+
    // Cached string representation
    private String toString;
    private final AnnotationStore annotationStore;
@@ -94,7 +94,7 @@
       }
       this.proxyable = Proxies.isTypesProxyable(flattenedTypes);
    }
-   
+
    public AbstractWBAnnotated(AnnotationStore annotatedItemHelper)
    {
       this.annotationStore = annotatedItemHelper;
@@ -106,7 +106,7 @@
       this.interfaceOnlyFlattenedTypes = null;
       this.proxyable = false;
    }
-   
+
    public AnnotationStore getAnnotationStore()
    {
       return annotationStore;
@@ -121,7 +121,7 @@
    {
       return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
    }
-   
+
    public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
    {
       return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
@@ -185,10 +185,10 @@
    {
       return Reflections.isAssignableFrom(getRawType(), getActualTypeArguments(), type, actualTypeArguments);
    }
-   
+
    public boolean isAssignableFrom(Type type)
    {
-      return Reflections.isAssignableFrom(getType(), type);
+      return Reflections.isAssignableFrom(getBaseType(), type);
    }
 
    /**
@@ -217,7 +217,7 @@
       toString = "Abstract annotated item " + getName();
       return toString;
    }
-   
+
    @Deprecated
    public Set<Annotation> getBindings()
    {
@@ -251,42 +251,42 @@
    {
       return proxyable;
    }
-   
+
    public Class<T> getRawType()
    {
       return rawType;
    }
-   
-   public Type getType()
-   {
-      return type;
-   }
-   
+
    public Type[] getActualTypeArguments()
    {
       return actualTypeArguments;
    }
-   
-   public Set<Type> getFlattenedTypeHierarchy()
-   {
-      return Collections.unmodifiableSet(flattenedTypes);
-   }
-   
+
    public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
    {
       return Collections.unmodifiableSet(interfaceOnlyFlattenedTypes);
    }
 
    public abstract S getDelegate();
-   
+
    public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
    {
       return getAnnotationStore().isDeclaredAnnotationPresent(annotationType);
    }
-   
+
    public boolean isParameterizedType()
    {
       return _parameterizedType;
    }
 
+   public Type getBaseType()
+   {
+      return type;
+   }
+
+   public Set<Type> getTypeClosure()
+   {
+      return Collections.unmodifiableSet(flattenedTypes);
+   }
+
 }
\ No newline at end of file

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBConstructorImpl.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -203,7 +203,7 @@
       if (super.equals(other) && other instanceof WBConstructor)
       {
          WBConstructor<?> that = (WBConstructor<?>) other;
-         return this.getDeclaringClass().equals(that.getDeclaringClass()) && this.getParameters().equals(that.getParameters());
+         return this.getDeclaringType().equals(that.getDeclaringType()) && this.getParameters().equals(that.getParameters());
       }
       return false;
    }
@@ -226,7 +226,7 @@
     * 
     * @return The declaring class
     */
-   public WBType<T> getDeclaringClass()
+   public WBType<T> getDeclaringType()
    {
       return declaringClass;
    }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBFieldImpl.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -18,9 +18,9 @@
 
 import java.lang.reflect.Field;
 
+import org.jboss.webbeans.introspector.AnnotationStore;
 import org.jboss.webbeans.introspector.WBField;
 import org.jboss.webbeans.introspector.WBType;
-import org.jboss.webbeans.introspector.AnnotationStore;
 import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Reflections;
 
@@ -35,7 +35,7 @@
  */
 public class WBFieldImpl<T> extends AbstractWBMember<T, Field> implements WBField<T>
 {
-   
+
    // The underlying field
    private final Field field;
    // The abstraction of the declaring class
@@ -75,12 +75,12 @@
    {
       return field;
    }
-   
+
    public void set(Object instance, Object value) throws IllegalArgumentException, IllegalAccessException
    {
       field.set(instance, value);
    }
-   
+
    public void setOnInstance(Object instance, Object value) throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException
    {
       instance.getClass().getField(getName()).set(instance, value);
@@ -109,9 +109,9 @@
     * 
     * @return The declaring class
     * 
-    * @see org.jboss.webbeans.introspector.WBField#getDeclaringClass()
+    * @see org.jboss.webbeans.introspector.WBField#getDeclaringType()
     */
-   public WBType<?> getDeclaringClass()
+   public WBType<?> getDeclaringType()
    {
       return declaringClass;
    }
@@ -128,7 +128,7 @@
       {
          return toString;
       }
-      toString = Names.fieldToString(field) + " on " + getDeclaringClass();
+      toString = Names.fieldToString(field) + " on " + getDeclaringType();
       return toString;
    }
 
@@ -138,7 +138,7 @@
       if (other instanceof WBField)
       {
          WBField<?> that = (WBField<?>) other;
-         return this.getDeclaringClass().equals(that.getDeclaringClass()) && this.getName().equals(that.getName());
+         return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName());
       }
       else
       {
@@ -152,5 +152,5 @@
    {
       return getDelegate().hashCode();
    }
-   
+
 }

Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/introspector/jlr/WBMethodImpl.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -25,11 +25,11 @@
 import java.util.Collections;
 import java.util.List;
 
+import org.jboss.webbeans.introspector.AnnotationStore;
+import org.jboss.webbeans.introspector.MethodSignature;
 import org.jboss.webbeans.introspector.WBMethod;
 import org.jboss.webbeans.introspector.WBParameter;
 import org.jboss.webbeans.introspector.WBType;
-import org.jboss.webbeans.introspector.AnnotationStore;
-import org.jboss.webbeans.introspector.MethodSignature;
 import org.jboss.webbeans.util.Names;
 import org.jboss.webbeans.util.Reflections;
 import org.jboss.webbeans.util.collections.multi.ListHashMultiMap;
@@ -64,9 +64,9 @@
 
    // Cached string representation
    private String toString;
-   
+
    private final MethodSignature signature;
-   
+
    public static <T> WBMethodImpl<T> of(Method method, WBType<?> declaringClass)
    {
       return new WBMethodImpl<T>(method, declaringClass);
@@ -90,7 +90,7 @@
       this.declaringClass = declaringClass;
       this.parameters = new ArrayList<WBParameter<?>>();
       this.annotatedParameters = new ListHashMultiMap<Class<? extends Annotation>, WBParameter<?>>();
-      
+
       for (int i = 0; i < method.getParameterTypes().length; i++)
       {
          if (method.getParameterAnnotations()[i].length > 0)
@@ -142,7 +142,7 @@
    {
       return Collections.unmodifiableList(parameters);
    }
-   
+
    public Class<?>[] getParameterTypesAsArray()
    {
       return method.getParameterTypes();
@@ -159,17 +159,17 @@
       if (other instanceof WBMethod)
       {
          WBMethod<?> that = (WBMethod<?>) other;
-         return this.getDeclaringClass().equals(that.getDeclaringClass()) && this.getName().equals(that.getName()) && this.getParameters().equals(that.getParameters());
+         return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName()) && this.getParameters().equals(that.getParameters());
       }
       else
       {
          return false;
       }
    }
-   
+
    public boolean isEquivalent(Method method)
    {
-      return this.getDeclaringClass().isEquivalent(method.getDeclaringClass()) && this.getName().equals(method.getName()) && Arrays.equals(this.getParameterTypesAsArray(), method.getParameterTypes());
+      return this.getDeclaringType().isEquivalent(method.getDeclaringClass()) && this.getName().equals(method.getName()) && Arrays.equals(this.getParameterTypesAsArray(), method.getParameterTypes());
    }
 
    @Override
@@ -177,7 +177,7 @@
    {
       return getDelegate().hashCode();
    }
-   
+
    public T invokeOnInstance(Object instance, Object...parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
    {
       Method method = Reflections.lookupMethod(getName(), getParameterTypesAsArray(), instance);
@@ -198,7 +198,7 @@
       return propertyName;
    }
 
-   public WBType<?> getDeclaringClass()
+   public WBType<?> getDeclaringType()
    {
       return declaringClass;
    }
@@ -210,13 +210,13 @@
       {
          return toString;
       }
-      toString = "Annotated method on class " + getDeclaringClass().getName() + Names.methodToString(method);
+      toString = "Annotated method on class " + getDeclaringType().getName() + Names.methodToString(method);
       return toString;
    }
-   
+
    public MethodSignature getSignature()
    {
       return signature;
    }
-   
+
 }

Modified: ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java	2009-06-12 22:38:33 UTC (rev 2828)
+++ ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/context/ApplicationScopedTest.java	2009-06-14 20:29:43 UTC (rev 2829)
@@ -33,7 +33,6 @@
       }
       latch.await();
       int value = getCurrentManager().getInstanceByType(ApplictionScopedObject.class).getValue();
-      System.out.println(value);
       assert value == 10;
    }
 




More information about the weld-commits mailing list