[weld-commits] Weld SVN: r5427 - in core/trunk: impl/src/main/java/org/jboss/weld/bean/builtin and 12 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Mon Jan 11 17:50:20 EST 2010


Author: pete.muir at jboss.org
Date: 2010-01-11 17:50:19 -0500 (Mon, 11 Jan 2010)
New Revision: 5427

Modified:
   core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/CustomDecoratorWrapper.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/WeldDecorator.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
   core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessClassBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessManagedBeanImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java
   core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java
   core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
   core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java
   core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/managed/newBean/NewSimpleBeanTest.java
   core/trunk/tests/src/test/java/org/jboss/weld/tests/session/newBean/NewEnterpriseBeanTest.java
Log:
WELD-78 (first of many)

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -69,45 +69,20 @@
 public abstract class AbstractBean<T, S> extends RIBean<T>
 {
 
-   private boolean proxyable;
-
-   // Logger
    private static final LocLogger log = loggerFactory().getLogger(BEAN);
-   // The binding types
-   protected Set<Annotation> bindings;
-   // The name
+   protected Set<Annotation> qualifiers;
    protected String name;
-   // The scope type
-   protected Class<? extends Annotation> scopeType;
-   // The merged stereotypes
+   protected Class<? extends Annotation> scope;
    private MergedStereotypes<T, S> mergedStereotypes;
-   // Is it a policy, either defined by stereotypes or directly?
    protected boolean alternative;
-   // The type
    protected Class<T> type;
-   // The API types
    protected Set<Type> types;
-   // The injection points
    private Set<WeldInjectionPoint<?, ?>> injectionPoints;
    private Set<WeldInjectionPoint<?, ?>> delegateInjectionPoints;
-   
-   // The @New injection points
    private Set<WeldInjectionPoint<?, ?>> newInjectionPoints;
-   
-   // If the type a primitive?
-   private boolean primitive;
-   // The Bean manager
-   protected BeanManagerImpl manager;
-
+   protected BeanManagerImpl beanManager;
    private boolean initialized;
 
-   
-
-   protected boolean isInitialized()
-   {
-      return initialized;
-   }
-
    /**
     * Constructor
     * 
@@ -116,7 +91,7 @@
    public AbstractBean(String idSuffix, BeanManagerImpl manager)
    {
       super(idSuffix, manager);
-      this.manager = manager;
+      this.beanManager = manager;
       this.injectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
       this.delegateInjectionPoints = new HashSet<WeldInjectionPoint<?,?>>();
       this.newInjectionPoints = new HashSet<WeldInjectionPoint<?,?>>();
@@ -134,18 +109,16 @@
          specialize(environment);
          postSpecialize();
       }
-      initDefaultBindings();
-      initPrimitive();
+      initDefaultQualifiers();
       log.trace(CREATING_BEAN, getType());
       initName();
-      initScopeType();
-      initProxyable();
+      initScope();
       checkDelegateInjectionPoints();
    }
    
    protected void initStereotypes()
    {
-      mergedStereotypes = new MergedStereotypes<T, S>(getAnnotatedItem().getMetaAnnotations(Stereotype.class), manager);
+      mergedStereotypes = new MergedStereotypes<T, S>(getWeldAnnotated().getMetaAnnotations(Stereotype.class), beanManager);
    }
 
    protected void checkDelegateInjectionPoints()
@@ -182,18 +155,15 @@
       return delegateInjectionPoints;
    }
 
-   /**
-    * Initializes the API types
-    */
    protected void initTypes()
    {
-      if (getAnnotatedItem().isAnnotationPresent(Typed.class))
+      if (getWeldAnnotated().isAnnotationPresent(Typed.class))
       {
-         this.types = getTypedTypes(Reflections.buildTypeMap(getAnnotatedItem().getTypeClosure()), getAnnotatedItem().getJavaClass(), getAnnotatedItem().getAnnotation(Typed.class));
+         this.types = getTypedTypes(Reflections.buildTypeMap(getWeldAnnotated().getTypeClosure()), getWeldAnnotated().getJavaClass(), getWeldAnnotated().getAnnotation(Typed.class));
       }
       else
       {
-         this.types = new HashSet<Type>(getAnnotatedItem().getTypeClosure());
+         this.types = new HashSet<Type>(getWeldAnnotated().getTypeClosure());
          if (getType().isInterface())
          {
             this.types.add(Object.class);
@@ -219,38 +189,35 @@
       return types;
    }
 
-   /**
-    * Initializes the binding types
-    */
-   protected void initBindings()
+   protected void initQualifiers()
    {
-      this.bindings = new HashSet<Annotation>();
-      this.bindings.addAll(getAnnotatedItem().getMetaAnnotations(Qualifier.class));
-      initDefaultBindings();
-      log.trace(QUALIFIERS_USED, bindings, this);
+      this.qualifiers = new HashSet<Annotation>();
+      this.qualifiers.addAll(getWeldAnnotated().getMetaAnnotations(Qualifier.class));
+      initDefaultQualifiers();
+      log.trace(QUALIFIERS_USED, qualifiers, this);
    }
 
-   protected void initDefaultBindings()
+   protected void initDefaultQualifiers()
    {
-      if (bindings.size() == 0)
+      if (qualifiers.size() == 0)
       {
          log.trace(USING_DEFAULT_QUALIFIER, this);
-         this.bindings.add(DefaultLiteral.INSTANCE);
+         this.qualifiers.add(DefaultLiteral.INSTANCE);
       }
-      if (bindings.size() == 1)
+      if (qualifiers.size() == 1)
       {
-         if (bindings.iterator().next().annotationType().equals(Named.class))
+         if (qualifiers.iterator().next().annotationType().equals(Named.class))
          {
             log.trace(USING_DEFAULT_QUALIFIER, this);
-            this.bindings.add(DefaultLiteral.INSTANCE);
+            this.qualifiers.add(DefaultLiteral.INSTANCE);
          }
       }
-      this.bindings.add(AnyLiteral.INSTANCE);
+      this.qualifiers.add(AnyLiteral.INSTANCE);
    }
 
    protected void initAlternative()
    {
-      this.alternative = Beans.isAlternative(getAnnotatedItem(), getMergedStereotypes());
+      this.alternative = Beans.isAlternative(getWeldAnnotated(), getMergedStereotypes());
    }
 
    /**
@@ -259,9 +226,9 @@
    protected void initName()
    {
       boolean beanNameDefaulted = false;
-      if (getAnnotatedItem().isAnnotationPresent(Named.class))
+      if (getWeldAnnotated().isAnnotationPresent(Named.class))
       {
-         String javaName = getAnnotatedItem().getAnnotation(Named.class).value();
+         String javaName = getWeldAnnotated().getAnnotation(Named.class).value();
          if ("".equals(javaName))
          {
             beanNameDefaulted = true;
@@ -282,36 +249,20 @@
       }
    }
 
-   protected void initProxyable()
-   {
-      proxyable = getAnnotatedItem().isProxyable();
-   }
+   protected abstract void initScope();
 
-   /**
-    * Initializes the primitive flag
-    */
-   protected void initPrimitive()
+   protected boolean initScopeFromStereotype()
    {
-      this.primitive = Reflections.isPrimitive(getType());
-   }
-
-   /**
-    * Initializes the scope type
-    */
-   protected abstract void initScopeType();
-
-   protected boolean initScopeTypeFromStereotype()
-   {
-      Set<Annotation> possibleScopeTypes = getMergedStereotypes().getPossibleScopeTypes();
-      if (possibleScopeTypes.size() == 1)
+      Set<Annotation> possibleScopes = getMergedStereotypes().getPossibleScopes();
+      if (possibleScopes.size() == 1)
       {
-         this.scopeType = possibleScopeTypes.iterator().next().annotationType();
-         log.trace(USING_SCOPE_FROM_STEREOTYPE, scopeType, this, getMergedStereotypes());
+         this.scope = possibleScopes.iterator().next().annotationType();
+         log.trace(USING_SCOPE_FROM_STEREOTYPE, scope, this, getMergedStereotypes());
          return true;
       }
-      else if (possibleScopeTypes.size() > 1)
+      else if (possibleScopes.size() > 1)
       {
-         throw new DefinitionException(MULTIPLE_SCOPES_FOUND_FROM_STEREOTYPES, getAnnotatedItem());
+         throw new DefinitionException(MULTIPLE_SCOPES_FOUND_FROM_STEREOTYPES, getWeldAnnotated());
       }
       else
       {
@@ -321,16 +272,16 @@
 
    protected void postSpecialize()
    {
-      if (getAnnotatedItem().isAnnotationPresent(Named.class) && getSpecializedBean().getAnnotatedItem().isAnnotationPresent(Named.class))
+      if (getWeldAnnotated().isAnnotationPresent(Named.class) && getSpecializedBean().getWeldAnnotated().isAnnotationPresent(Named.class))
       {
-         throw new DefinitionException(NAME_NOT_ALLOWED_ON_SPECIALIZATION, getAnnotatedItem());
+         throw new DefinitionException(NAME_NOT_ALLOWED_ON_SPECIALIZATION, getWeldAnnotated());
       }
-      this.bindings.addAll(getSpecializedBean().getQualifiers());
-      if (isSpecializing() && getSpecializedBean().getAnnotatedItem().isAnnotationPresent(Named.class))
+      this.qualifiers.addAll(getSpecializedBean().getQualifiers());
+      if (isSpecializing() && getSpecializedBean().getWeldAnnotated().isAnnotationPresent(Named.class))
       {
          this.name = getSpecializedBean().getName();
       }
-      manager.getSpecializedBeans().put(getSpecializedBean(), this);
+      beanManager.getSpecializedBeans().put(getSpecializedBean(), this);
    }
 
    protected void preSpecialize(BeanDeployerEnvironment environment)
@@ -348,7 +299,7 @@
     *
     * @return The annotated item
     */
-   public abstract WeldAnnotated<T, S> getAnnotatedItem();
+   public abstract WeldAnnotated<T, S> getWeldAnnotated();
 
    /**
     * Gets the binding types
@@ -359,7 +310,7 @@
     */
    public Set<Annotation> getQualifiers()
    {
-      return bindings;
+      return qualifiers;
    }
 
    /**
@@ -373,7 +324,7 @@
    public abstract AbstractBean<?, ?> getSpecializedBean();
 
    @Override
-   public Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
+   public Set<WeldInjectionPoint<?, ?>> getWeldInjectionPoints()
    {
       return injectionPoints;
    }
@@ -414,7 +365,7 @@
     */
    public Class<? extends Annotation> getScope()
    {
-      return scopeType;
+      return scope;
    }
 
    /**
@@ -460,13 +411,13 @@
    @Override
    public boolean isPrimitive()
    {
-      return primitive;
+      return getWeldAnnotated().isPrimitive();
    }
 
    @Override
    public boolean isProxyable()
    {
-      return proxyable;
+      return getWeldAnnotated().isProxyable();
    }
 
    @Override
@@ -488,7 +439,7 @@
    @Override
    public boolean isSpecializing()
    {
-      return getAnnotatedItem().isAnnotationPresent(Specializes.class);
+      return getWeldAnnotated().isAnnotationPresent(Specializes.class);
    }
 
    public Set<Class<? extends Annotation>> getStereotypes()
@@ -496,4 +447,9 @@
       return mergedStereotypes.getStereotypes();
    }
 
+   protected boolean isInitialized()
+   {
+      return initialized;
+   }
+   
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -263,7 +263,7 @@
     */
    protected void initType()
    {
-      this.type = getAnnotatedItem().getJavaClass();
+      this.type = getWeldAnnotated().getJavaClass();
    }
 
    /**
@@ -280,41 +280,41 @@
     */
    protected void initInitializerMethods()
    {
-      initializerMethods = Beans.getInitializerMethods(this, getAnnotatedItem());
+      initializerMethods = Beans.getInitializerMethods(this, getWeldAnnotated());
       addInjectionPoints(Beans.getParameterInjectionPoints(this, initializerMethods));
    }
 
    @Override
-   protected void initScopeType()
+   protected void initScope()
    {
-      for (WeldClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getWeldSuperclass())
+      for (WeldClass<?> clazz = getWeldAnnotated(); clazz != null; clazz = clazz.getWeldSuperclass())
       {
          Set<Annotation> scopeTypes = new HashSet<Annotation>();
          scopeTypes.addAll(clazz.getDeclaredMetaAnnotations(Scope.class));
          scopeTypes.addAll(clazz.getDeclaredMetaAnnotations(NormalScope.class));
          if (scopeTypes.size() == 1)
          {
-            if (getAnnotatedItem().isAnnotationPresent(scopeTypes.iterator().next().annotationType()))
+            if (getWeldAnnotated().isAnnotationPresent(scopeTypes.iterator().next().annotationType()))
             {
-               this.scopeType = scopeTypes.iterator().next().annotationType();
-               log.trace(USING_SCOPE, scopeType, this);
+               this.scope = scopeTypes.iterator().next().annotationType();
+               log.trace(USING_SCOPE, scope, this);
             }
             break;
          }
          else if (scopeTypes.size() > 1)
          {
-            throw new DefinitionException(ONLY_ONE_SCOPE_ALLOWED, getAnnotatedItem());
+            throw new DefinitionException(ONLY_ONE_SCOPE_ALLOWED, getWeldAnnotated());
          }
       }
 
-      if (this.scopeType == null)
+      if (this.scope == null)
       {
-         initScopeTypeFromStereotype();
+         initScopeFromStereotype();
       }
 
-      if (this.scopeType == null)
+      if (this.scope == null)
       {
-         this.scopeType = Dependent.class;
+         this.scope = Dependent.class;
          log.trace(USING_DEFAULT_SCOPE, this);
       }
    }
@@ -328,7 +328,7 @@
    protected void preSpecialize(BeanDeployerEnvironment environment)
    {
       super.preSpecialize(environment);
-      if (getAnnotatedItem().getWeldSuperclass() == null || getAnnotatedItem().getWeldSuperclass().getJavaClass().equals(Object.class))
+      if (getWeldAnnotated().getWeldSuperclass() == null || getWeldAnnotated().getWeldSuperclass().getJavaClass().equals(Object.class))
       {
          throw new DefinitionException(SPECIALIZING_BEAN_MUST_EXTEND_A_BEAN, this);
       }
@@ -340,7 +340,7 @@
     * @return The annotated item
     */
    @Override
-   public WeldClass<T> getAnnotatedItem()
+   public WeldClass<T> getWeldAnnotated()
    {
       return annotatedItem;
    }
@@ -353,7 +353,7 @@
    @Override
    protected String getDefaultName()
    {
-      String name = Strings.decapitalize(getAnnotatedItem().getSimpleName());
+      String name = Strings.decapitalize(getWeldAnnotated().getSimpleName());
       return name;
    }
 
@@ -383,7 +383,7 @@
     */
    protected void initPostConstruct()
    {
-      this.postConstruct = Beans.getPostConstruct(getAnnotatedItem());
+      this.postConstruct = Beans.getPostConstruct(getWeldAnnotated());
    }
 
    /**
@@ -391,7 +391,7 @@
     */
    protected void initPreDestroy()
    {
-      this.preDestroy = Beans.getPreDestroy(getAnnotatedItem());
+      this.preDestroy = Beans.getPreDestroy(getWeldAnnotated());
    }
 
    /**
@@ -439,53 +439,53 @@
 
    protected void initCdiBoundInterceptors()
    {
-      if (manager.getCdiInterceptorsRegistry().getInterceptionModel(getType()) == null)
+      if (beanManager.getCdiInterceptorsRegistry().getInterceptionModel(getType()) == null)
       {
          InterceptionModelBuilder<Class<?>, SerializableContextual<Interceptor<?>, ?>> builder =
                InterceptionModelBuilder.newBuilderFor(getType(), (Class) SerializableContextual.class);
-         Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(manager, getAnnotatedItem().getAnnotations());
+         Set<Annotation> classBindingAnnotations = flattenInterceptorBindings(beanManager, getWeldAnnotated().getAnnotations());
          for (Class<? extends Annotation> annotation : getStereotypes())
          {
-            classBindingAnnotations.addAll(flattenInterceptorBindings(manager, manager.getStereotypeDefinition(annotation)));
+            classBindingAnnotations.addAll(flattenInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)));
          }
          if (classBindingAnnotations.size() > 0)
          {
-            if (Beans.findInterceptorBindingConflicts(manager, classBindingAnnotations))
+            if (Beans.findInterceptorBindingConflicts(beanManager, classBindingAnnotations))
                throw new DeploymentException(CONFLICTING_INTERCEPTOR_BINDINGS, getType());
 
             Annotation[] classBindingAnnotationsArray = classBindingAnnotations.toArray(new Annotation[0]);
 
-            List<Interceptor<?>> resolvedPostConstructInterceptors = manager.resolveInterceptors(InterceptionType.POST_CONSTRUCT, classBindingAnnotationsArray);
+            List<Interceptor<?>> resolvedPostConstructInterceptors = beanManager.resolveInterceptors(InterceptionType.POST_CONSTRUCT, classBindingAnnotationsArray);
             builder.interceptPostConstruct().with(toSerializableContextualArray(resolvedPostConstructInterceptors));
 
-            List<Interceptor<?>> resolvedPreDestroyInterceptors = manager.resolveInterceptors(InterceptionType.PRE_DESTROY, classBindingAnnotationsArray);
+            List<Interceptor<?>> resolvedPreDestroyInterceptors = beanManager.resolveInterceptors(InterceptionType.PRE_DESTROY, classBindingAnnotationsArray);
             builder.interceptPreDestroy().with(toSerializableContextualArray(resolvedPreDestroyInterceptors));
 
-            List<Interceptor<?>> resolvedPrePassivateInterceptors = manager.resolveInterceptors(InterceptionType.PRE_PASSIVATE, classBindingAnnotationsArray);
+            List<Interceptor<?>> resolvedPrePassivateInterceptors = beanManager.resolveInterceptors(InterceptionType.PRE_PASSIVATE, classBindingAnnotationsArray);
             builder.interceptPrePassivate().with(toSerializableContextualArray(resolvedPrePassivateInterceptors));
 
-            List<Interceptor<?>> resolvedPostActivateInterceptors = manager.resolveInterceptors(InterceptionType.POST_ACTIVATE, classBindingAnnotationsArray);
+            List<Interceptor<?>> resolvedPostActivateInterceptors = beanManager.resolveInterceptors(InterceptionType.POST_ACTIVATE, classBindingAnnotationsArray);
             builder.interceptPostActivate().with(toSerializableContextualArray(resolvedPostActivateInterceptors));
 
          }
-         List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableMethods(getAnnotatedItem());
+         List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableMethods(getWeldAnnotated());
          for (WeldMethod<?, ?> method : businessMethods)
          {
             Set<Annotation> methodBindingAnnotations = new HashSet<Annotation>(classBindingAnnotations);
-            methodBindingAnnotations.addAll(flattenInterceptorBindings(manager, method.getAnnotations()));
+            methodBindingAnnotations.addAll(flattenInterceptorBindings(beanManager, method.getAnnotations()));
             if (methodBindingAnnotations.size() > 0)
             {
-               if (Beans.findInterceptorBindingConflicts(manager, classBindingAnnotations))
+               if (Beans.findInterceptorBindingConflicts(beanManager, classBindingAnnotations))
                   throw new DeploymentException(CONFLICTING_INTERCEPTOR_BINDINGS, getType() + "." + method.getName() + "()");
 
-               if (method.isAnnotationPresent(manager.getServices().get(EJBApiAbstraction.class).TIMEOUT_ANNOTATION_CLASS))
+               if (method.isAnnotationPresent(beanManager.getServices().get(EJBApiAbstraction.class).TIMEOUT_ANNOTATION_CLASS))
                {
-                  List<Interceptor<?>> methodBoundInterceptors = manager.resolveInterceptors(InterceptionType.AROUND_TIMEOUT, methodBindingAnnotations.toArray(new Annotation[]{}));
+                  List<Interceptor<?>> methodBoundInterceptors = beanManager.resolveInterceptors(InterceptionType.AROUND_TIMEOUT, methodBindingAnnotations.toArray(new Annotation[]{}));
                   builder.interceptAroundTimeout(((AnnotatedMethod) method).getJavaMember()).with(toSerializableContextualArray(methodBoundInterceptors));
                }
                else
                {
-                  List<Interceptor<?>> methodBoundInterceptors = manager.resolveInterceptors(InterceptionType.AROUND_INVOKE, methodBindingAnnotations.toArray(new Annotation[]{}));
+                  List<Interceptor<?>> methodBoundInterceptors = beanManager.resolveInterceptors(InterceptionType.AROUND_INVOKE, methodBindingAnnotations.toArray(new Annotation[]{}));
                   builder.interceptAroundInvoke(((AnnotatedMethod) method).getJavaMember()).with(toSerializableContextualArray(methodBoundInterceptors));
                }
             }
@@ -494,7 +494,7 @@
          // if there is at least one applicable interceptor, register it 
          if (serializableContextualInterceptionModel.getAllInterceptors().size() > 0)
          {
-            manager.getCdiInterceptorsRegistry().registerInterceptionModel(getType(), serializableContextualInterceptionModel);
+            beanManager.getCdiInterceptorsRegistry().registerInterceptionModel(getType(), serializableContextualInterceptionModel);
          }
       }
    }
@@ -560,17 +560,17 @@
 
    public boolean hasCdiBoundInterceptors()
    {
-      if (manager.getCdiInterceptorsRegistry().getInterceptionModel(getType()) != null)
-         return manager.getCdiInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+      if (beanManager.getCdiInterceptorsRegistry().getInterceptionModel(getType()) != null)
+         return beanManager.getCdiInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
       else
          return false;
    }
 
    public boolean hasDirectlyDefinedInterceptors()
    {
-      if (manager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()) != null)
+      if (beanManager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()) != null)
       {
-         return hasSerializationOrInvocationInterceptorMethods || manager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
+         return hasSerializationOrInvocationInterceptorMethods || beanManager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors().size() > 0;
       }
       else
       {
@@ -580,12 +580,12 @@
 
    protected void initDirectlyDefinedInterceptors()
    {
-      if (manager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()) == null && InterceptionUtils.supportsEjb3InterceptorDeclaration())
+      if (beanManager.getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()) == null && InterceptionUtils.supportsEjb3InterceptorDeclaration())
       {
          InterceptionModelBuilder<Class<?>, Class<?>> builder = InterceptionModelBuilder.newBuilderFor(getType(), (Class) Class.class);
 
          Class<?>[] classDeclaredInterceptors = null;
-         if (getAnnotatedItem().isAnnotationPresent(InterceptionUtils.getInterceptorsAnnotationClass()))
+         if (getWeldAnnotated().isAnnotationPresent(InterceptionUtils.getInterceptorsAnnotationClass()))
          {
             Annotation interceptorsAnnotation = getType().getAnnotation(InterceptionUtils.getInterceptorsAnnotationClass());
             classDeclaredInterceptors = SecureReflections.extractValues(interceptorsAnnotation);
@@ -596,7 +596,7 @@
             builder.interceptAll().with(classDeclaredInterceptors);
          }
 
-         List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableMethods(getAnnotatedItem());
+         List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableMethods(getWeldAnnotated());
          for (WeldMethod<?, ?> method : businessMethods)
          {
             boolean excludeClassInterceptors = method.isAnnotationPresent(InterceptionUtils.getExcludeClassInterceptorsAnnotationClass());
@@ -611,7 +611,7 @@
             }
             if (methodDeclaredInterceptors != null)
             {
-               if (method.isAnnotationPresent(manager.getServices().get(EJBApiAbstraction.class).TIMEOUT_ANNOTATION_CLASS))
+               if (method.isAnnotationPresent(beanManager.getServices().get(EJBApiAbstraction.class).TIMEOUT_ANNOTATION_CLASS))
                   builder.interceptAroundTimeout(((AnnotatedMethod) method).getJavaMember()).with(methodDeclaredInterceptors);
                else
                   builder.interceptAroundInvoke(((AnnotatedMethod) method).getJavaMember()).with(methodDeclaredInterceptors);
@@ -625,7 +625,7 @@
                || !interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.PRE_PASSIVATE).isEmpty()
                || !interceptorClassMetadata.getInterceptorMethods(org.jboss.interceptor.model.InterceptionType.POST_ACTIVATE).isEmpty();
          if (interceptionModel.getAllInterceptors().size() > 0 || hasSerializationOrInvocationInterceptorMethods)
-            manager.getClassDeclaredInterceptorsRegistry().registerInterceptionModel(getType(), builder.build());
+            beanManager.getClassDeclaredInterceptorsRegistry().registerInterceptionModel(getType(), builder.build());
       }
    }
 
@@ -646,7 +646,7 @@
     */
    protected void initConstructor()
    {
-      this.constructor = Beans.getBeanConstructor(this, getAnnotatedItem());
+      this.constructor = Beans.getBeanConstructor(this, getWeldAnnotated());
       // TODO We loop unecessarily many times here, I want to probably introduce some callback mechanism. PLM.
       addInjectionPoints(Beans.getParameterInjectionPoints(this, constructor));
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -105,7 +105,7 @@
    }
 
    @Override
-   public abstract WeldMember<T, X, S> getAnnotatedItem();
+   public abstract WeldMember<T, X, S> getWeldAnnotated();
 
    @Override
    // Overriden to provide the class of the bean that declares the producer method/field
@@ -140,12 +140,12 @@
    {
       try
       {
-         this.type = getAnnotatedItem().getJavaClass();
+         this.type = getWeldAnnotated().getJavaClass();
       }
       catch (ClassCastException e)
       {
          Type type = Beans.getDeclaredBeanType(getClass());
-         throw new WeldException(PRODUCER_CAST_ERROR, e, getAnnotatedItem().getJavaClass(), (type == null ? " unknown " : type));
+         throw new WeldException(PRODUCER_CAST_ERROR, e, getWeldAnnotated().getJavaClass(), (type == null ? " unknown " : type));
       }
    }
 
@@ -154,16 +154,16 @@
     */
    protected void checkProducerReturnType()
    {
-      if ((getAnnotatedItem().getBaseType() instanceof TypeVariable<?>) || 
-          (getAnnotatedItem().getBaseType() instanceof WildcardType))
+      if ((getWeldAnnotated().getBaseType() instanceof TypeVariable<?>) || 
+          (getWeldAnnotated().getBaseType() instanceof WildcardType))
       {
-         throw new DefinitionException(RETURN_TYPE_MUST_BE_CONCRETE, getAnnotatedItem().getBaseType());
+         throw new DefinitionException(RETURN_TYPE_MUST_BE_CONCRETE, getWeldAnnotated().getBaseType());
       }
-      for (Type type : getAnnotatedItem().getActualTypeArguments())
+      for (Type type : getWeldAnnotated().getActualTypeArguments())
       {
          if (!(type instanceof Class))
          {
-            throw new DefinitionException(TYPE_PARAMETER_MUST_BE_CONCRETE, this.getAnnotatedItem());
+            throw new DefinitionException(TYPE_PARAMETER_MUST_BE_CONCRETE, this.getWeldAnnotated());
          }
       }
    }
@@ -183,7 +183,7 @@
    
    private void initPassivationCapable()
    {
-      if (getAnnotatedItem().isFinal() && !Serializable.class.isAssignableFrom(getAnnotatedItem().getJavaClass()))
+      if (getWeldAnnotated().isFinal() && !Serializable.class.isAssignableFrom(getWeldAnnotated().getJavaClass()))
       {
          this.passivationCapableBean = false;
       }
@@ -208,7 +208,7 @@
    @Override
    protected void initAlternative()
    {
-      super.alternative = Beans.isAlternative(getAnnotatedItem(), getMergedStereotypes()) || getDeclaringBean().isAlternative();
+      super.alternative = Beans.isAlternative(getWeldAnnotated(), getMergedStereotypes()) || getDeclaringBean().isAlternative();
    }
 
    @Override
@@ -242,18 +242,18 @@
       }
       else if (instance != null)
       {
-         boolean passivating = manager.getServices().get(MetaAnnotationStore.class).getScopeModel(getScope()).isPassivating();
+         boolean passivating = beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(getScope()).isPassivating();
          boolean instanceSerializable = isTypeSerializable(instance.getClass());
          if (passivating && !instanceSerializable)
          {
             throw new IllegalProductException(NON_SERIALIZABLE_PRODUCT_ERROR, getProducer());
          }
-         InjectionPoint injectionPoint = manager.getCurrentInjectionPoint();
+         InjectionPoint injectionPoint = beanManager.getCurrentInjectionPoint();
          if (injectionPoint == null || injectionPoint.equals(DummyInjectionPoint.INSTANCE))
          {
             return;
          }
-         if (!instanceSerializable && Beans.isPassivatingScope(injectionPoint.getBean(), manager))
+         if (!instanceSerializable && Beans.isPassivatingScope(injectionPoint.getBean(), beanManager))
          {
             if (injectionPoint.getMember() instanceof Field)
             {
@@ -296,27 +296,27 @@
    }
 
    @Override
-   protected void initScopeType()
+   protected void initScope()
    {
       Set<Annotation> scopeAnnotations = new HashSet<Annotation>();
-      scopeAnnotations.addAll(getAnnotatedItem().getMetaAnnotations(Scope.class));
-      scopeAnnotations.addAll(getAnnotatedItem().getMetaAnnotations(NormalScope.class));
+      scopeAnnotations.addAll(getWeldAnnotated().getMetaAnnotations(Scope.class));
+      scopeAnnotations.addAll(getWeldAnnotated().getMetaAnnotations(NormalScope.class));
       if (scopeAnnotations.size() > 1)
       {
          throw new DefinitionException(ONLY_ONE_SCOPE_ALLOWED, getProducer());
       }
       if (scopeAnnotations.size() == 1)
       {
-         this.scopeType = scopeAnnotations.iterator().next().annotationType();
-         log.trace(USING_SCOPE, scopeType, this);
+         this.scope = scopeAnnotations.iterator().next().annotationType();
+         log.trace(USING_SCOPE, scope, this);
          return;
       }
 
-      initScopeTypeFromStereotype();
+      initScopeFromStereotype();
 
-      if (this.scopeType == null)
+      if (this.scope == null)
       {
-         this.scopeType = Dependent.class;
+         this.scope = Dependent.class;
          log.trace(USING_DEFAULT_SCOPE, this);
       }
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -65,7 +65,7 @@
       // This is a bit dangerous, as it means that producer methods can end up
       // executing on partially constructed instances. Also, it's not required
       // by the spec...
-      if (getAnnotatedItem().isStatic())
+      if (getWeldAnnotated().isStatic())
       {
          return null;
       }
@@ -76,11 +76,11 @@
             WeldCreationalContext<?> creationalContextImpl = (WeldCreationalContext<?>) creationalContext;
             if (creationalContextImpl.containsIncompleteInstance(getDeclaringBean()))
             {
-               log.warn(CIRCULAR_CALL, getAnnotatedItem(), getDeclaringBean());
+               log.warn(CIRCULAR_CALL, getWeldAnnotated(), getDeclaringBean());
                return creationalContextImpl.getIncompleteInstance(getDeclaringBean());
             }
          }
-         return manager.getReference(getDeclaringBean(), Object.class, creationalContext);
+         return beanManager.getReference(getDeclaringBean(), Object.class, creationalContext);
       }
    }
    
@@ -111,7 +111,7 @@
       {
          this.policy = true;
       }
-      else if (getAnnotatedItem().isAnnotationPresent(Alternative.class))
+      else if (getWeldAnnotated().isAnnotationPresent(Alternative.class))
       {
          this.policy = true;
       }
@@ -122,6 +122,6 @@
    }
    
    @Override
-   public abstract WeldMember<T, ?, S> getAnnotatedItem();
+   public abstract WeldMember<T, ?, S> getWeldAnnotated();
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/CustomDecoratorWrapper.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/CustomDecoratorWrapper.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/CustomDecoratorWrapper.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -17,6 +17,8 @@
 
 package org.jboss.weld.bean;
 
+import java.util.Set;
+
 import javax.enterprise.inject.spi.Decorator;
 
 import org.jboss.weld.introspector.MethodSignature;
@@ -25,8 +27,6 @@
 import org.jboss.weld.resources.ClassTransformer;
 import org.jboss.weld.util.Deployers;
 
-import java.util.Set;
-
 /**
  * A wrapper for a decorated instance. Allows to enhance custom decorators with metadata
  * about the WeldClass at deployment time.
@@ -60,7 +60,7 @@
       return delegate;
    }
 
-   public WeldClass<?> getAnnotatedItem()
+   public WeldClass<?> getWeldAnnotated()
    {
       return annotatedItem;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -134,7 +134,7 @@
    protected void initDecoratedTypes()
    {
       this.decoratedTypes = new HashSet<Type>();
-      this.decoratedTypes.addAll(getAnnotatedItem().getInterfaceClosure());
+      this.decoratedTypes.addAll(getWeldAnnotated().getInterfaceClosure());
       this.decoratedTypes.remove(Serializable.class);
 
       this.decoratedMethodSignatures = Deployers.getDecoratedMethodSignatures(getManager(), this.decoratedTypes);
@@ -207,21 +207,21 @@
             }
          }
       }
-      annotatedDelegateItem = WeldClassImpl.of(delegateInjectionPoint.getJavaClass(), manager.getServices().get(ClassTransformer.class));
+      annotatedDelegateItem = WeldClassImpl.of(delegateInjectionPoint.getJavaClass(), beanManager.getServices().get(ClassTransformer.class));
    }
 
    private void checkAbstractMethods()
    {
-      if (getAnnotatedItem().isAbstract())
+      if (getWeldAnnotated().isAbstract())
       {
-         for(WeldMethod<?,?> method: getAnnotatedItem().getWeldMethods())
+         for(WeldMethod<?,?> method: getWeldAnnotated().getWeldMethods())
          {
             if (Reflections.isAbstract(((AnnotatedMethod) method).getJavaMember()))
             {
                MethodSignature methodSignature = method.getSignature();
                if (this.annotatedDelegateItem.getWeldMethod(methodSignature) == null)
                {
-                  throw new DefinitionException(ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE,  method.getSignature(), this, getAnnotatedItem().getName());
+                  throw new DefinitionException(ABSTRACT_METHOD_MUST_MATCH_DECORATED_TYPE,  method.getSignature(), this, getWeldAnnotated().getName());
                }
             }
          }
@@ -253,11 +253,11 @@
    protected void initType()
    {
       super.initType();
-      if (getAnnotatedItem().isAbstract())
+      if (getWeldAnnotated().isAbstract())
       {
-         Proxies.TypeInfo typeInfo = Proxies.TypeInfo.of(Collections.singleton(getAnnotatedItem().getJavaClass()));
+         Proxies.TypeInfo typeInfo = Proxies.TypeInfo.of(Collections.singleton(getWeldAnnotated().getJavaClass()));
          Class<T> clazz = Proxies.createProxyClass(null, typeInfo);
-         proxyClassForAbstractDecorators = manager.getServices().get(ClassTransformer.class).loadClass(clazz);
+         proxyClassForAbstractDecorators = beanManager.getServices().get(ClassTransformer.class).loadClass(clazz);
       }
    }
 
@@ -265,12 +265,12 @@
    protected void initConstructor()
    {
       super.initConstructor();
-      if (getAnnotatedItem().isAbstract())
+      if (getWeldAnnotated().isAbstract())
       {
          constructorForAbstractDecorator = WeldConstructorImpl.of(
                proxyClassForAbstractDecorators.getDeclaredWeldConstructor(getConstructor().getSignature()),
                proxyClassForAbstractDecorators,
-               manager.getServices().get(ClassTransformer.class));
+               beanManager.getServices().get(ClassTransformer.class));
       }
    }
 
@@ -283,14 +283,14 @@
    @Override
    protected T createInstance(CreationalContext<T> ctx)
    {
-      if (!getAnnotatedItem().isAbstract())
+      if (!getWeldAnnotated().isAbstract())
       {
          return super.createInstance(ctx);
       }
       else
       {
          ProxyClassConstructorInjectionPointWrapper<T> constructorInjectionPointWrapper = new ProxyClassConstructorInjectionPointWrapper(this, constructorForAbstractDecorator, getConstructor());
-         T instance = constructorInjectionPointWrapper.newInstance(manager, ctx);
+         T instance = constructorInjectionPointWrapper.newInstance(beanManager, ctx);
          Proxies.attachMethodHandler(instance, new AbstractDecoratorMethodHandler(annotatedDelegateItem, getDelegateInjectionPoint(), constructorInjectionPointWrapper.getInjectedDelegate()));
          return instance;
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -52,9 +52,9 @@
 
    protected DisposalMethod(BeanManagerImpl manager, WeldMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
    {
-      super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(disposalMethod.getSignature().toString()).toString(), declaringBean, manager);
+      super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().getName()).append(disposalMethod.getSignature().toString()).toString(), declaringBean, manager);
       this.disposalMethodInjectionPoint = MethodInjectionPoint.of(this, disposalMethod);
-      initBindings();
+      initQualifiers();
       initType();
       initTypes();
       initStereotypes();
@@ -63,7 +63,7 @@
    
    private void initDisposesParameter()
    {
-      this.disposesParameter = getAnnotatedItem().getWeldParameters(Disposes.class).get(0);
+      this.disposesParameter = getWeldAnnotated().getWeldParameters(Disposes.class).get(0);
    }
    
    public WeldParameter<?, X> getDisposesParameter()
@@ -86,7 +86,7 @@
    }
 
    @Override
-   public WeldMethod<T, X> getAnnotatedItem()
+   public WeldMethod<T, X> getWeldAnnotated()
    {
       return disposalMethodInjectionPoint;
    }
@@ -97,12 +97,12 @@
    }
 
    @Override
-   protected void initBindings()
+   protected void initQualifiers()
    {
       // At least 1 parameter exists, already checked in constructor
-      this.bindings = new HashSet<Annotation>();
-      this.bindings.addAll(disposalMethodInjectionPoint.getWeldParameters().get(0).getQualifiers());
-      initDefaultBindings();
+      this.qualifiers = new HashSet<Annotation>();
+      this.qualifiers.addAll(disposalMethodInjectionPoint.getWeldParameters().get(0).getQualifiers());
+      initDefaultQualifiers();
    }
 
    /**
@@ -176,15 +176,15 @@
 
    public void invokeDisposeMethod(Object instance)
    {
-      CreationalContext<T> creationalContext = manager.createCreationalContext(this);
+      CreationalContext<T> creationalContext = beanManager.createCreationalContext(this);
       Object receiverInstance = getReceiver(creationalContext);
       if (receiverInstance == null)
       {
-         disposalMethodInjectionPoint.invokeWithSpecialValue(null, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
+         disposalMethodInjectionPoint.invokeWithSpecialValue(null, Disposes.class, instance, beanManager, creationalContext, IllegalArgumentException.class);
       }
       else
       {
-         disposalMethodInjectionPoint.invokeOnInstanceWithSpecialValue(receiverInstance, Disposes.class, instance, manager, creationalContext, IllegalArgumentException.class);
+         disposalMethodInjectionPoint.invokeOnInstanceWithSpecialValue(receiverInstance, Disposes.class, instance, beanManager, creationalContext, IllegalArgumentException.class);
       }
       creationalContext.release();
    }
@@ -259,7 +259,7 @@
    }
    
    @Override
-   protected void initScopeType()
+   protected void initScope()
    {
       // Disposal methods aren't scoped
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -54,7 +54,7 @@
       this.interceptorClassMetadata = InterceptorClassMetadataRegistry.getRegistry().getInterceptorClassMetadata(type.getJavaClass());
       this.serializable = type.isSerializable();
       this.interceptorBindingTypes = new HashSet<Annotation>();
-      interceptorBindingTypes.addAll(flattenInterceptorBindings(manager, getAnnotatedItem().getAnnotations()));
+      interceptorBindingTypes.addAll(flattenInterceptorBindings(manager, getWeldAnnotated().getAnnotations()));
       for (Class<? extends Annotation> annotation : getStereotypes())
       {
          interceptorBindingTypes.addAll(flattenInterceptorBindings(manager, manager.getStereotypeDefinition(annotation)));

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -120,7 +120,7 @@
       super(type, idSuffix, manager);
       initType();
       initTypes();
-      initBindings();
+      initQualifiers();
       initConstructor();
    }
 
@@ -233,7 +233,7 @@
 
             public Set<InjectionPoint> getInjectionPoints()
             {
-               return (Set) getAnnotatedInjectionPoints();
+               return (Set) getWeldInjectionPoints();
             }
 
             public T produce(CreationalContext<T> ctx)
@@ -266,7 +266,7 @@
 
    protected T createInstance(CreationalContext<T> ctx) 
    {
-      return getConstructor().newInstance(manager, ctx);
+      return getConstructor().newInstance(beanManager, ctx);
    }
 
    @Override
@@ -277,7 +277,7 @@
       {
          for (Decorator<?> decorator : this.getDecorators())
          {
-            if (!(PassivationCapable.class.isAssignableFrom(decorator.getClass())) || !((WeldDecorator<?>)decorator).getAnnotatedItem().isSerializable())
+            if (!(PassivationCapable.class.isAssignableFrom(decorator.getClass())) || !((WeldDecorator<?>)decorator).getWeldAnnotated().isSerializable())
             {
                this.passivationCapableBean = false;
                break;
@@ -310,7 +310,7 @@
 
    private void initPassivationCapable()
    {
-      this.passivationCapableBean = getAnnotatedItem().isSerializable();
+      this.passivationCapableBean = getWeldAnnotated().isSerializable();
       if (Container.instance().services().get(MetaAnnotationStore.class).getScopeModel(getScope()).isNormal())
       {
          this.passivationCapableDependency = true;
@@ -339,10 +339,10 @@
 
    private void initEEInjectionPoints()
    {
-      this.ejbInjectionPoints = Beans.getEjbInjectionPoints(this, getAnnotatedItem(), getManager());
-      this.persistenceContextInjectionPoints = Beans.getPersistenceContextInjectionPoints(this, getAnnotatedItem(), getManager());
-      this.persistenceUnitInjectionPoints = Beans.getPersistenceUnitInjectionPoints(this, getAnnotatedItem(), getManager());
-      this.resourceInjectionPoints = Beans.getResourceInjectionPoints(this, getAnnotatedItem(), manager);
+      this.ejbInjectionPoints = Beans.getEjbInjectionPoints(this, getWeldAnnotated(), getManager());
+      this.persistenceContextInjectionPoints = Beans.getPersistenceContextInjectionPoints(this, getWeldAnnotated(), getManager());
+      this.persistenceUnitInjectionPoints = Beans.getPersistenceUnitInjectionPoints(this, getWeldAnnotated(), getManager());
+      this.resourceInjectionPoints = Beans.getResourceInjectionPoints(this, getWeldAnnotated(), beanManager);
    }
 
 
@@ -354,22 +354,22 @@
    @Override
    public void checkType()
    {
-      if (getAnnotatedItem().isAnonymousClass() || (getAnnotatedItem().isMemberClass() && !getAnnotatedItem().isStatic()))
+      if (getWeldAnnotated().isAnonymousClass() || (getWeldAnnotated().isMemberClass() && !getWeldAnnotated().isStatic()))
       {
          throw new DefinitionException(SIMPLE_BEAN_AS_NON_STATIC_INNER_CLASS_NOT_ALLOWED, type);
       }
-      if (!isDependent() && getAnnotatedItem().isParameterizedType())
+      if (!isDependent() && getWeldAnnotated().isParameterizedType())
       {
          throw new DefinitionException(BEAN_MUST_BE_DEPENDENT, type);
       }
-      boolean passivating = manager.getServices().get(MetaAnnotationStore.class).getScopeModel(scopeType).isPassivating();
+      boolean passivating = beanManager.getServices().get(MetaAnnotationStore.class).getScopeModel(scope).isPassivating();
       if (passivating && !isPassivationCapableBean())
       {
          throw new DefinitionException(PASSIVATING_BEAN_NEEDS_SERIALIZABLE_IMPL, this);
       }
       if (hasDecorators())
       {
-         if (getAnnotatedItem().isFinal())
+         if (getWeldAnnotated().isFinal())
          {
             throw new DefinitionException(FINAL_BEAN_CLASS_WITH_DECORATORS_NOT_ALLOWED, this);
          }
@@ -379,11 +379,11 @@
             if (decorator instanceof DecoratorImpl<?>)
             {
                DecoratorImpl<?> decoratorBean = (DecoratorImpl<?>) decorator;
-               decoratorClass = decoratorBean.getAnnotatedItem();
+               decoratorClass = decoratorBean.getWeldAnnotated();
             }
             else if (decorator instanceof CustomDecoratorWrapper)
             {
-               decoratorClass = ((CustomDecoratorWrapper) decorator).getAnnotatedItem();
+               decoratorClass = ((CustomDecoratorWrapper) decorator).getWeldAnnotated();
             }
             else
             {
@@ -392,7 +392,7 @@
 
             for (WeldMethod<?, ?> decoratorMethod : decoratorClass.getWeldMethods())
             {
-               WeldMethod<?, ?> method = getAnnotatedItem().getWeldMethod(decoratorMethod.getSignature());
+               WeldMethod<?, ?> method = getWeldAnnotated().getWeldMethod(decoratorMethod.getSignature());
                if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal())
                {
                   throw new DefinitionException(FINAL_DECORATED_BEAN_METHOD_NOT_ALLOWED, method, decoratorMethod);
@@ -408,11 +408,11 @@
       super.checkBeanImplementation();
       if (isNormalScoped())
       {
-         for (WeldField<?, ?> field : getAnnotatedItem().getWeldFields())
+         for (WeldField<?, ?> field : getWeldAnnotated().getWeldFields())
          {
             if (field.isPublic() && !field.isStatic())
             {
-               throw new DefinitionException(PUBLIC_FIELD_ON_NORMAL_SCOPED_BEAN_NOT_ALLOWED, getAnnotatedItem());
+               throw new DefinitionException(PUBLIC_FIELD_ON_NORMAL_SCOPED_BEAN_NOT_ALLOWED, getWeldAnnotated());
             }
          }
       }
@@ -422,7 +422,7 @@
    protected void preSpecialize(BeanDeployerEnvironment environment)
    {
       super.preSpecialize(environment);
-      if (environment.getEjbDescriptors().contains(getAnnotatedItem().getWeldSuperclass().getJavaClass()))
+      if (environment.getEjbDescriptors().contains(getWeldAnnotated().getWeldSuperclass().getJavaClass()))
       {
          throw new DefinitionException(SPECIALIZING_BEAN_MUST_EXTEND_A_BEAN, this);
       }
@@ -431,11 +431,11 @@
    @Override
    protected void specialize(BeanDeployerEnvironment environment)
    {
-      if (environment.getClassBean(getAnnotatedItem().getWeldSuperclass()) == null)
+      if (environment.getClassBean(getWeldAnnotated().getWeldSuperclass()) == null)
       {
          throw new DefinitionException(SPECIALIZING_BEAN_MUST_EXTEND_A_BEAN, this);
       }
-      AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWeldSuperclass());
+      AbstractClassBean<?> specializedBean = environment.getClassBean(getWeldAnnotated().getWeldSuperclass());
       if (!(specializedBean instanceof ManagedBean))
       {
          throw new DefinitionException(SPECIALIZING_BEAN_MUST_EXTEND_A_BEAN, this);
@@ -483,7 +483,7 @@
    @Override
    protected boolean isInterceptionCandidate()
    {
-      return !Beans.isInterceptor(getAnnotatedItem()) && !Beans.isDecorator(getAnnotatedItem());
+      return !Beans.isInterceptor(getWeldAnnotated()) && !Beans.isDecorator(getWeldAnnotated());
    }
 
    protected T applyInterceptors(T instance, final CreationalContext<T> creationalContext)
@@ -494,13 +494,13 @@
          List<InterceptionHandlerFactory<?>> interceptionHandlerFactories = new ArrayList<InterceptionHandlerFactory<?>>();
          if (hasDirectlyDefinedInterceptors())
          {
-            interceptionRegistries.add(manager.getClassDeclaredInterceptorsRegistry());
+            interceptionRegistries.add(beanManager.getClassDeclaredInterceptorsRegistry());
             interceptionHandlerFactories.add(new ClassInterceptionHandlerFactory(creationalContext, getManager()));
          }
          if (hasCdiBoundInterceptors())
          {
-            interceptionRegistries.add(manager.getCdiInterceptorsRegistry());
-            interceptionHandlerFactories.add(new CdiInterceptorHandlerFactory(creationalContext, manager));
+            interceptionRegistries.add(beanManager.getCdiInterceptorsRegistry());
+            interceptionHandlerFactories.add(new CdiInterceptorHandlerFactory(creationalContext, beanManager));
          }
          if (interceptionRegistries.size() > 0)
             instance = new InterceptorProxyCreatorImpl(interceptionRegistries, interceptionHandlerFactories).createProxyFromInstance(instance, getType());

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -65,11 +65,11 @@
     */
    protected ProducerField(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
    {
-      super(new StringBuilder().append(ProducerField.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(".").append(field.getName()).toString(), declaringBean, manager);
+      super(new StringBuilder().append(ProducerField.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().getName()).append(".").append(field.getName()).toString(), declaringBean, manager);
       this.field = field;
       initType();
       initTypes();
-      initBindings();
+      initQualifiers();
       initStereotypes();
       initAlternative();
    }
@@ -90,7 +90,7 @@
 
             public Set<InjectionPoint> getInjectionPoints()
             {
-               return (Set) getAnnotatedInjectionPoints();
+               return (Set) getWeldInjectionPoints();
             }
 
             public T produce(CreationalContext<T> creationalContext)
@@ -119,7 +119,7 @@
     * @return The annotated item
     */
    @Override
-   public WeldField<T, X> getAnnotatedItem()
+   public WeldField<T, X> getWeldAnnotated()
    {
       return field;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -78,12 +78,12 @@
 
    protected ProducerMethod(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
    {
-      super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(".").append(method.getSignature().toString()).toString(), declaringBean, manager);
+      super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().getName()).append(".").append(method.getSignature().toString()).toString(), declaringBean, manager);
       this.method = MethodInjectionPoint.of(this, method);
       initType();
       initTypes();
-      initBindings();
-      this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(getClass().getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(getAnnotatedItem().getSignature().toString()).toString();
+      initQualifiers();
+      this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(getClass().getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().getName()).append(getWeldAnnotated().getSignature().toString()).toString();
       initStereotypes();
       initAlternative();
       initProducerMethodInjectableParameters();
@@ -113,7 +113,7 @@
 
             public Set<InjectionPoint> getInjectionPoints()
             {
-               return (Set) getAnnotatedInjectionPoints();
+               return (Set) getWeldInjectionPoints();
             }
 
             public T produce(CreationalContext<T> creationalContext)
@@ -121,11 +121,11 @@
                Object receiver = getReceiver(creationalContext);
                if (receiver != null)
                {
-                  return method.invokeOnInstance(receiver, manager, creationalContext, CreationException.class);
+                  return method.invokeOnInstance(receiver, beanManager, creationalContext, CreationException.class);
                }
                else
                {
-                  return method.invoke(receiver, manager, creationalContext, CreationException.class);
+                  return method.invoke(receiver, beanManager, creationalContext, CreationException.class);
                }
             }
             
@@ -151,11 +151,11 @@
     */
    protected void checkProducerMethod()
    {
-      if (getAnnotatedItem().getWeldParameters(Observes.class).size() > 0)
+      if (getWeldAnnotated().getWeldParameters(Observes.class).size() > 0)
       {
          throw new DefinitionException(INCONSISTENT_ANNOTATIONS_ON_METHOD, "@Produces", "@Observes");
       }
-      else if (getAnnotatedItem().getWeldParameters(Disposes.class).size() > 0)
+      else if (getWeldAnnotated().getWeldParameters(Disposes.class).size() > 0)
       {
          throw new DefinitionException(INCONSISTENT_ANNOTATIONS_ON_METHOD, "@Produces", "@Disposes");
       }
@@ -167,7 +167,7 @@
          {
             if (type instanceof Class)
             {
-               if (SecureReflections.methodExists((Class<?>) type, getAnnotatedItem().getName(), getAnnotatedItem().getParameterTypesAsArray()))
+               if (SecureReflections.methodExists((Class<?>) type, getWeldAnnotated().getName(), getWeldAnnotated().getParameterTypesAsArray()))
                {
                   methodDeclaredOnTypes = true;
                   continue;
@@ -219,7 +219,7 @@
     * @return The annotated item
     */
    @Override
-   public WeldMethod<T, X> getAnnotatedItem()
+   public WeldMethod<T, X> getWeldAnnotated()
    {
       return method;
    }
@@ -276,7 +276,7 @@
    @Override
    protected void preSpecialize(BeanDeployerEnvironment environment)
    {
-      if (getDeclaringBean().getAnnotatedItem().getWeldSuperclass().getDeclaredWeldMethod(getAnnotatedItem().getJavaMember()) == null)
+      if (getDeclaringBean().getWeldAnnotated().getWeldSuperclass().getDeclaredWeldMethod(getWeldAnnotated().getJavaMember()) == null)
       {
          throw new DefinitionException(PRODUCER_METHOD_NOT_SPECIALIZING, this);
       }
@@ -285,7 +285,7 @@
    @Override
    protected void specialize(BeanDeployerEnvironment environment)
    {
-      WeldMethod<?, ?> superClassMethod = getDeclaringBean().getAnnotatedItem().getWeldSuperclass().getWeldMethod(getAnnotatedItem().getJavaMember());
+      WeldMethod<?, ?> superClassMethod = getDeclaringBean().getWeldAnnotated().getWeldSuperclass().getWeldMethod(getWeldAnnotated().getJavaMember());
       if (environment.getProducerMethod(superClassMethod) == null)
       {
          throw new ForbiddenStateException(PRODUCER_METHOD_NOT_SPECIALIZING, this);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -101,11 +101,11 @@
    
    public abstract boolean isPrimitive();
 
-   public abstract Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints();
+   public abstract Set<WeldInjectionPoint<?, ?>> getWeldInjectionPoints();
    
    public Set<InjectionPoint> getInjectionPoints()
    {
-      return (Set) getAnnotatedInjectionPoints();
+      return (Set) getWeldInjectionPoints();
    }
 
    public abstract RIBean<?> getSpecializedBean();

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -124,7 +124,7 @@
       initType();
       this.ejbDescriptor = ejbDescriptor;
       initTypes();
-      initBindings();
+      initQualifiers();
       initConstructor();
    }
 
@@ -177,7 +177,7 @@
 
             public Set<InjectionPoint> getInjectionPoints()
             {
-               return (Set) getAnnotatedInjectionPoints();
+               return (Set) getWeldInjectionPoints();
             }
 
             public T produce(CreationalContext<T> ctx)
@@ -191,7 +191,7 @@
    
    protected T createInstance(CreationalContext<T> ctx) 
    {
-      return getConstructor().newInstance(manager, ctx);
+      return getConstructor().newInstance(beanManager, ctx);
    }
 
    @Override
@@ -203,9 +203,9 @@
       {
          types.putAll(new HierarchyDiscovery(businessInterfaceDescriptor.getInterface()).getTypeMap());
       }
-      if (getAnnotatedItem().isAnnotationPresent(Typed.class))
+      if (getWeldAnnotated().isAnnotationPresent(Typed.class))
       {
-         super.types = getTypedTypes(types, getAnnotatedItem().getJavaClass(), getAnnotatedItem().getAnnotation(Typed.class));
+         super.types = getTypedTypes(types, getWeldAnnotated().getJavaClass(), getWeldAnnotated().getAnnotation(Typed.class));
       }
       else
       {
@@ -258,7 +258,7 @@
    {
       super.preSpecialize(environment);
       // We appear to check this twice?
-      if (!environment.getEjbDescriptors().contains(getAnnotatedItem().getWeldSuperclass().getJavaClass()))
+      if (!environment.getEjbDescriptors().contains(getWeldAnnotated().getWeldSuperclass().getJavaClass()))
       {
          throw new DefinitionException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
@@ -267,11 +267,11 @@
    @Override
    protected void specialize(BeanDeployerEnvironment environment)
    {
-      if (environment.getClassBean(getAnnotatedItem().getWeldSuperclass()) == null)
+      if (environment.getClassBean(getWeldAnnotated().getWeldSuperclass()) == null)
       {
          throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
       }
-      AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWeldSuperclass());
+      AbstractClassBean<?> specializedBean = environment.getClassBean(getWeldAnnotated().getWeldSuperclass());
       if (!(specializedBean instanceof SessionBean<?>))
       {
          throw new ForbiddenStateException(SPECIALIZING_ENTERPRISE_BEAN_MUST_EXTEND_AN_ENTERPRISE_BEAN, this);
@@ -405,7 +405,7 @@
          {
             if (!isMethodExistsOnTypes(method))
             {
-               throw new DefinitionException(OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS, method, getAnnotatedItem());
+               throw new DefinitionException(OBSERVER_METHOD_MUST_BE_STATIC_OR_BUSINESS, method, getWeldAnnotated());
             }
          }
       }
@@ -432,7 +432,7 @@
    
    public SessionObjectReference createReference()
    {
-      return manager.getServices().get(EjbServices.class).resolveEjb(getEjbDescriptor().delegate());
+      return beanManager.getServices().get(EjbServices.class).resolveEjb(getEjbDescriptor().delegate());
    }
 
    @Override
@@ -449,7 +449,7 @@
 
    protected void registerInterceptors()
    {
-      InterceptionModel<Class<?>, SerializableContextual<javax.enterprise.inject.spi.Interceptor<?>, ?>> model = manager.getCdiInterceptorsRegistry().getInterceptionModel(ejbDescriptor.getBeanClass());
+      InterceptionModel<Class<?>, SerializableContextual<javax.enterprise.inject.spi.Interceptor<?>, ?>> model = beanManager.getCdiInterceptorsRegistry().getInterceptionModel(ejbDescriptor.getBeanClass());
       if (model != null)
          getManager().getServices().get(EjbServices.class).registerInterceptors(getEjbDescriptor().delegate(), new InterceptorBindingsAdapter(model));
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/WeldDecorator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/WeldDecorator.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/WeldDecorator.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -35,7 +35,7 @@
 public interface WeldDecorator<T> extends Decorator<T>
 {
 
-   public WeldClass<?> getAnnotatedItem();
+   public WeldClass<?> getWeldAnnotated();
 
    public Set<MethodSignature> getDecoratedMethodSignatures();
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -75,7 +75,7 @@
    }
 
    @Override
-   public Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
+   public Set<WeldInjectionPoint<?, ?>> getWeldInjectionPoints()
    {
       return Collections.emptySet();
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -125,12 +125,12 @@
    
    protected void checkEEResource()
    {
-      EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
-      PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
-      WSApiAbstraction wsApiAbstraction = manager.getServices().get(WSApiAbstraction.class);
-      if (!(getAnnotatedItem().isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || getAnnotatedItem().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS) || getAnnotatedItem().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || getAnnotatedItem().isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS)) || getAnnotatedItem().isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS))
+      EJBApiAbstraction ejbApiAbstraction = beanManager.getServices().get(EJBApiAbstraction.class);
+      PersistenceApiAbstraction persistenceApiAbstraction = beanManager.getServices().get(PersistenceApiAbstraction.class);
+      WSApiAbstraction wsApiAbstraction = beanManager.getServices().get(WSApiAbstraction.class);
+      if (!(getWeldAnnotated().isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || getWeldAnnotated().isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS)) || getWeldAnnotated().isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS))
       {
-         throw new ForbiddenStateException(INVALID_RESOURCE_PRODUCER_FIELD, getAnnotatedItem());
+         throw new ForbiddenStateException(INVALID_RESOURCE_PRODUCER_FIELD, getWeldAnnotated());
       }
    }
    
@@ -139,7 +139,7 @@
    {
       try
       {
-         if (Reflections.isFinal(getAnnotatedItem().getJavaClass()) || Serializable.class.isAssignableFrom(getAnnotatedItem().getJavaClass()))
+         if (Reflections.isFinal(getWeldAnnotated().getJavaClass()) || Serializable.class.isAssignableFrom(getWeldAnnotated().getJavaClass()))
          {
             return createUnderlying(creationalContext);
          }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -85,7 +85,7 @@
             WeldDecorator<?> decorator = (WeldDecorator<?>) beanInstance.getContextual().get();
             if (decorator.getDecoratedMethodSignatures().contains(methodSignature))
             {
-               WeldMethod<?, ?> decoratorMethod = decorator.getAnnotatedItem().getWeldMethod(methodSignature);
+               WeldMethod<?, ?> decoratorMethod = decorator.getWeldAnnotated().getWeldMethod(methodSignature);
                if (decoratorMethod != null)
                {
                   return decoratorMethod.invokeOnInstance(beanInstance.getInstance(), args);

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -161,13 +161,13 @@
     */
    protected <T> void createObserversProducersDisposers(AbstractClassBean<T> bean)
    {
-      createProducerMethods(bean, bean.getAnnotatedItem());
-      createProducerFields(bean, bean.getAnnotatedItem());
+      createProducerMethods(bean, bean.getWeldAnnotated());
+      createProducerFields(bean, bean.getWeldAnnotated());
       if (manager.isBeanEnabled(bean))
       {
-         createObserverMethods(bean, bean.getAnnotatedItem());
+         createObserverMethods(bean, bean.getWeldAnnotated());
       }
-      createDisposalMethods(bean, bean.getAnnotatedItem());
+      createDisposalMethods(bean, bean.getWeldAnnotated());
       
    }
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -128,7 +128,7 @@
 
    public void addProducerMethod(ProducerMethod<?, ?> bean)
    {
-      producerMethodBeanMap.put(bean.getAnnotatedItem(), bean);
+      producerMethodBeanMap.put(bean.getWeldAnnotated(), bean);
       addAbstractBean(bean);
    }
    
@@ -151,14 +151,14 @@
    {
       if (!(bean instanceof NewBean))
       {
-         classBeanMap.put(bean.getAnnotatedItem(), bean);
+         classBeanMap.put(bean.getWeldAnnotated(), bean);
       }
       addAbstractBean(bean);
    }
    
    public void addManagedBean(ManagedBean<?> bean)
    {
-      newManagedBeanClasses.add(bean.getAnnotatedItem());
+      newManagedBeanClasses.add(bean.getWeldAnnotated());
       addAbstractClassBean(bean);
    }
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/Validator.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -216,7 +216,7 @@
    {
       for (Decorator<?> decorator : classBean.getDecorators())
       {
-         if (!((WeldDecorator<?>)decorator).getAnnotatedItem().isSerializable())
+         if (!((WeldDecorator<?>)decorator).getWeldAnnotated().isSerializable())
          {
             throw new UnserializableDependencyException(PASSIVATING_BEAN_WITH_NONSERIALIZABLE_DECORATOR, classBean, decorator);
          }
@@ -272,7 +272,7 @@
       {
          throw new UnproxyableResolutionException(INJECTION_POINT_HAS_NON_PROXYABLE_DEPENDENCIES, ij);
       }
-      if (Reflections.isPrimitive(annotatedItem.getJavaClass()) && resolvedBean.isNullable())
+      if (annotatedItem.isPrimitive() && resolvedBean.isNullable())
       {
          throw new NullableDependencyException(INJECTION_POINT_HAS_NULLABLE_DEPENDENCIES, ij);
       }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessClassBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessClassBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessClassBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -26,7 +26,7 @@
 
    public Annotated getAnnotated()
    {
-      return bean.getAnnotatedItem();
+      return bean.getWeldAnnotated();
    }
 
    public B getBean()

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/AbstractProcessProducerBean.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -26,7 +26,7 @@
 
    public Annotated getAnnotated()
    {
-      return bean.getAnnotatedItem();
+      return bean.getWeldAnnotated();
    }
 
    public B getBean()

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessBeanInjectionTarget.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -14,7 +14,7 @@
 
    public ProcessBeanInjectionTarget(BeanManagerImpl beanManager, AbstractClassBean<T> bean)
    {
-      super(beanManager, bean.getAnnotatedItem());
+      super(beanManager, bean.getWeldAnnotated());
       this.classBean = bean;
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessManagedBeanImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessManagedBeanImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessManagedBeanImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -18,12 +18,12 @@
    
    public ProcessManagedBeanImpl(BeanManagerImpl beanManager, ManagedBean<X> bean)
    {
-      super(beanManager, ProcessManagedBean.class, new Type[] { bean.getAnnotatedItem().getBaseType() }, bean);
+      super(beanManager, ProcessManagedBean.class, new Type[] { bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
    public AnnotatedType<X> getAnnotatedBeanClass()
    {
-      return getBean().getAnnotatedItem();
+      return getBean().getWeldAnnotated();
    }
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerFieldImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -19,12 +19,12 @@
    
    public ProcessProducerFieldImpl(BeanManagerImpl beanManager, ProducerField<X, T> bean)
    {
-      super(beanManager, ProcessProducerField.class, new Type[] { bean.getAnnotatedItem().getDeclaringType().getBaseType(), bean.getAnnotatedItem().getBaseType() }, bean);
+      super(beanManager, ProcessProducerField.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
    public AnnotatedField<X> getAnnotatedProducerField()
    {
-      return getBean().getAnnotatedItem();
+      return getBean().getWeldAnnotated();
    }
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -16,7 +16,7 @@
    
    public static <X, T> void fire(BeanManagerImpl beanManager, AbstractProducerBean<X, T, Member> producer)
    {
-      new ProcessProducerImpl<X, T>(beanManager, producer.getAnnotatedItem(), producer) {}.fire();
+      new ProcessProducerImpl<X, T>(beanManager, producer.getWeldAnnotated(), producer) {}.fire();
    }
    
    private final AnnotatedMember<X> annotatedMember;
@@ -24,7 +24,7 @@
 
    public ProcessProducerImpl(BeanManagerImpl beanManager, AnnotatedMember<X> annotatedMember, AbstractProducerBean<X, T, ?> bean)
    {
-      super(beanManager, ProcessProducer.class, new Type[] { bean.getAnnotatedItem().getDeclaringType().getBaseType(), bean.getAnnotatedItem().getBaseType() });
+      super(beanManager, ProcessProducer.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() });
       this.bean = bean;
       this.annotatedMember = annotatedMember;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessProducerMethodImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -20,7 +20,7 @@
 
    public ProcessProducerMethodImpl(BeanManagerImpl beanManager, ProducerMethod<X, T> bean)
    {
-      super(beanManager, ProcessProducerMethod.class, new Type[] { bean.getAnnotatedItem().getDeclaringType().getBaseType(), bean.getAnnotatedItem().getBaseType() }, bean);
+      super(beanManager, ProcessProducerMethod.class, new Type[] { bean.getWeldAnnotated().getDeclaringType().getBaseType(), bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
    public AnnotatedParameter<X> getAnnotatedDisposedParameter()
@@ -30,7 +30,7 @@
 
    public AnnotatedMethod<X> getAnnotatedProducerMethod()
    {
-      return getBean().getAnnotatedItem();
+      return getBean().getWeldAnnotated();
    }
 
    

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessSessionBeanImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -22,12 +22,12 @@
 
    public ProcessSessionBeanImpl(BeanManagerImpl beanManager, SessionBean<Object> bean)
    {
-      super(beanManager, ProcessSessionBean.class, new Type[] { bean.getAnnotatedItem().getBaseType() }, bean);
+      super(beanManager, ProcessSessionBean.class, new Type[] { bean.getWeldAnnotated().getBaseType() }, bean);
    }
 
    public AnnotatedType<X> getAnnotatedSessionBeanClass()
    {
-      return (AnnotatedType<X>) getBean().getAnnotatedItem();
+      return (AnnotatedType<X>) getBean().getWeldAnnotated();
    }
 
    public String getEjbName()
@@ -57,7 +57,7 @@
 
    public AnnotatedType<Object> getAnnotatedBeanClass()
    {
-      return getBean().getAnnotatedItem();
+      return getBean().getWeldAnnotated();
    }
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -110,5 +110,10 @@
    {
       return delegate().isParameterizedType();
    }
+   
+   public boolean isPrimitive()
+   {
+      return delegate().isPrimitive();
+   }
 
 }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -158,5 +158,7 @@
    public String getName();
 
    public boolean isParameterizedType();
+   
+   public boolean isPrimitive();
 
 }
\ No newline at end of file

Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -272,6 +272,11 @@
    {
       return rawType.getTypeParameters().length > 0;
    }
+   
+   public boolean isPrimitive()
+   {
+      return getJavaClass().isPrimitive();
+   }
 
    public Type getBaseType()
    {

Modified: core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -227,7 +227,7 @@
    /**
     * Creates a new instance
     * 
-    * @param manager The Bean manager
+    * @param beanManager The Bean manager
     * @return An instance
     * @throws InvocationTargetException 
     * @throws IllegalAccessException 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -724,7 +724,7 @@
     * Fires an event object with given event object for given bindings
     * 
     * @param event The event object to pass along
-    * @param bindings The binding types to match
+    * @param qualifiers The binding types to match
     * 
     * @see javax.enterprise.inject.spi.BeanManager#fireEvent(java.lang.Object,
     *      java.lang.annotation.Annotation[])

Modified: core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/MergedStereotypes.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -99,7 +99,7 @@
     * 
     * @return The scope types
     */
-   public Set<Annotation> getPossibleScopeTypes()
+   public Set<Annotation> getPossibleScopes()
    {
       return possibleScopeTypes;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/Proxies.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -264,7 +264,7 @@
          {
             return false;
          }
-         else if (Reflections.isPrimitive(clazz))
+         else if (clazz.isPrimitive())
          {
             return false;
          }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/impl/src/main/java/org/jboss/weld/util/reflection/Reflections.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -169,17 +169,6 @@
       return false;
    }
 
-   /**
-    * Checks if type is primitive
-    * 
-    * @param type Type to check
-    * @return True if primitive, false otherwise
-    */
-   public static boolean isPrimitive(Class<?> type)
-   {
-      return type.isPrimitive();
-   }
-
    public static boolean isPackagePrivate(int mod)
    {
       return !(Modifier.isPrivate(mod) || Modifier.isProtected(mod) || Modifier.isPublic(mod));

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/managed/newBean/NewSimpleBeanTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/managed/newBean/NewSimpleBeanTest.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/managed/newBean/NewSimpleBeanTest.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -63,8 +63,8 @@
    public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
    {
       initNewBean();
-      Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
-      Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
+      Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getWeldInjectionPoints();
+      Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getWeldInjectionPoints();
       assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
    }
    

Modified: core/trunk/tests/src/test/java/org/jboss/weld/tests/session/newBean/NewEnterpriseBeanTest.java
===================================================================
--- core/trunk/tests/src/test/java/org/jboss/weld/tests/session/newBean/NewEnterpriseBeanTest.java	2010-01-11 22:24:42 UTC (rev 5426)
+++ core/trunk/tests/src/test/java/org/jboss/weld/tests/session/newBean/NewEnterpriseBeanTest.java	2010-01-11 22:50:19 UTC (rev 5427)
@@ -23,6 +23,7 @@
    private static final New NEW_LITERAL = new NewLiteral()
    {
       
+      @Override
       public java.lang.Class<?> value() 
       {
          return WrappedEnterpriseBean.class;
@@ -64,8 +65,8 @@
    public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
    {
       initNewBean();
-      Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
-      Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
+      Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getWeldInjectionPoints();
+      Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getWeldInjectionPoints();
       assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
    }
    



More information about the weld-commits mailing list