[weld-commits] Weld SVN: r5439 - in core/trunk/impl/src/main/java/org/jboss/weld/bean: builtin and 1 other directories.
weld-commits at lists.jboss.org
weld-commits at lists.jboss.org
Tue Jan 12 07:58:28 EST 2010
Author: pete.muir at jboss.org
Date: 2010-01-12 07:58:27 -0500 (Tue, 12 Jan 2010)
New Revision: 5439
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/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/NewManagedBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.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/builtin/AbstractBuiltInBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacadeBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/CallableMethodHandler.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/EventBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/FacadeBeanResolvableTransformer.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InjectionPointBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceBean.java
core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java
Log:
tidy up
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -86,12 +86,12 @@
/**
* Constructor
*
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- public AbstractBean(String idSuffix, BeanManagerImpl manager)
+ public AbstractBean(String idSuffix, BeanManagerImpl beanManager)
{
- super(idSuffix, manager);
- this.beanManager = manager;
+ super(idSuffix, beanManager);
+ this.beanManager = beanManager;
this.injectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
this.delegateInjectionPoints = new HashSet<WeldInjectionPoint<?,?>>();
this.newInjectionPoints = new HashSet<WeldInjectionPoint<?,?>>();
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -94,19 +94,19 @@
* Extracts the complete set of interception bindings from a given set of
* annotations.
*
- * @param manager
+ * @param beanManager
* @param annotations
* @return
*/
- protected static Set<Annotation> flattenInterceptorBindings(BeanManagerImpl manager, Set<Annotation> annotations)
+ protected static Set<Annotation> flattenInterceptorBindings(BeanManagerImpl beanManager, Set<Annotation> annotations)
{
Set<Annotation> foundInterceptionBindingTypes = new HashSet<Annotation>();
for (Annotation annotation : annotations)
{
- if (manager.isInterceptorBinding(annotation.annotationType()))
+ if (beanManager.isInterceptorBinding(annotation.annotationType()))
{
foundInterceptionBindingTypes.add(annotation);
- foundInterceptionBindingTypes.addAll(manager.getServices().get(MetaAnnotationStore.class).getInterceptorBindingModel(annotation.annotationType()).getInheritedInterceptionBindingTypes());
+ foundInterceptionBindingTypes.addAll(beanManager.getServices().get(MetaAnnotationStore.class).getInterceptorBindingModel(annotation.annotationType()).getInheritedInterceptionBindingTypes());
}
}
return foundInterceptionBindingTypes;
@@ -158,11 +158,11 @@
* Constructor
*
* @param type The type
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- protected AbstractClassBean(WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected AbstractClassBean(WeldClass<T> type, String idSuffix, BeanManagerImpl beanManager)
{
- super(idSuffix, manager);
+ super(idSuffix, beanManager);
this.annotatedItem = type;
this.decoratorStackPosition = new ThreadLocal<Integer>()
{
@@ -214,7 +214,7 @@
public void initDecorators()
{
- this.decorators = getManager().resolveDecorators(getTypes(), getQualifiers());
+ this.decorators = getBeanManager().resolveDecorators(getTypes(), getQualifiers());
}
public boolean hasDecorators()
@@ -245,7 +245,7 @@
Decorator<?> decorator = decorators.get(i);
decoratorStackPosition.set(++i);
- Object decoratorInstance = getManager().getReference(ip, decorator, creationalContext);
+ Object decoratorInstance = getBeanManager().getReference(ip, decorator, creationalContext);
decoratorInstances.add(new SerializableContextualInstanceImpl<Decorator<Object>, Object>((Decorator<Object>) decorator, decoratorInstance, null));
ip = Beans.getDelegateInjectionPoint(decorator);
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -96,11 +96,11 @@
* Constructor
*
* @param declaringBean The declaring bean
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- public AbstractProducerBean(String idSuffix, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public AbstractProducerBean(String idSuffix, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager)
{
- super(idSuffix, declaringBean, manager);
+ super(idSuffix, declaringBean, beanManager);
serializationCheckCache = new ConcurrentCache<Class<?>, Boolean>();
}
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -42,9 +42,9 @@
private AbstractClassBean<X> declaringBean;
- public AbstractReceiverBean(String idSuffix, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public AbstractReceiverBean(String idSuffix, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager)
{
- super(idSuffix, manager);
+ super(idSuffix, beanManager);
this.declaringBean = declaringBean;
}
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -58,13 +58,8 @@
public class DecoratorImpl<T> extends ManagedBean<T> implements WeldDecorator<T>
{
- private WeldClass<?> annotatedDelegateItem;
+
- private WeldClass<T> proxyClassForAbstractDecorators;
- private WeldConstructor<T> constructorForAbstractDecorator;
-
- private Set<MethodSignature> decoratedMethodSignatures;
-
public static <T> Decorator<T> wrap(final Decorator<T> decorator)
{
return new ForwardingDecorator<T>()
@@ -96,24 +91,27 @@
*
* @param <T> The type
* @param clazz The class
- * @param manager the current manager
+ * @param beanManager the current manager
* @return a Bean
*/
- public static <T> DecoratorImpl<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
+ public static <T> DecoratorImpl<T> of(WeldClass<T> clazz, BeanManagerImpl beanManager)
{
- return new DecoratorImpl<T>(clazz, manager);
+ return new DecoratorImpl<T>(clazz, beanManager);
}
-
+
+ private WeldClass<?> annotatedDelegateItem;
+ private WeldClass<T> proxyClassForAbstractDecorators;
+ private WeldConstructor<T> constructorForAbstractDecorator;
+ private Set<MethodSignature> decoratedMethodSignatures;
private WeldInjectionPoint<?, ?> delegateInjectionPoint;
private Set<Annotation> delegateBindings;
private Type delegateType;
private Set<Type> delegateTypes;
private Set<Type> decoratedTypes;
- private HashSet<WeldClass<?>> annotatedDecoratedTypes;
- protected DecoratorImpl(WeldClass<T> type, BeanManagerImpl manager)
+ protected DecoratorImpl(WeldClass<T> type, BeanManagerImpl beanManager)
{
- super(type, new StringBuilder().append(Decorator.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), manager);
+ super(type, new StringBuilder().append(Decorator.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), beanManager);
}
@Override
@@ -137,7 +135,7 @@
this.decoratedTypes.addAll(getWeldAnnotated().getInterfaceClosure());
this.decoratedTypes.remove(Serializable.class);
- this.decoratedMethodSignatures = Deployers.getDecoratedMethodSignatures(getManager(), this.decoratedTypes);
+ this.decoratedMethodSignatures = Deployers.getDecoratedMethodSignatures(getBeanManager(), this.decoratedTypes);
}
protected void initDelegateInjectionPoint()
@@ -216,7 +214,7 @@
{
for(WeldMethod<?,?> method: getWeldAnnotated().getWeldMethods())
{
- if (Reflections.isAbstract(((AnnotatedMethod) method).getJavaMember()))
+ if (Reflections.isAbstract(((AnnotatedMethod<?>) method).getJavaMember()))
{
MethodSignature methodSignature = method.getSignature();
if (this.annotatedDelegateItem.getWeldMethod(methodSignature) == null)
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -47,12 +47,11 @@
{
protected MethodInjectionPoint<T, X> disposalMethodInjectionPoint;
-
private WeldParameter<?, X> disposesParameter;
- protected DisposalMethod(BeanManagerImpl manager, WeldMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
+ protected DisposalMethod(BeanManagerImpl beanManager, WeldMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
{
- super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().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, beanManager);
this.disposalMethodInjectionPoint = MethodInjectionPoint.of(this, disposalMethod);
initQualifiers();
initType();
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -48,33 +48,33 @@
private final Set<Annotation> interceptorBindingTypes;
private final boolean serializable;
+
+ public static <T> InterceptorImpl<T> of(WeldClass<T> type, BeanManagerImpl beanManager)
+ {
+ return new InterceptorImpl<T>(type, beanManager);
+ }
- protected InterceptorImpl(WeldClass<T> type, BeanManagerImpl manager)
+ protected InterceptorImpl(WeldClass<T> type, BeanManagerImpl beanManager)
{
- super(type, new StringBuilder().append(Interceptor.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), manager);
+ super(type, new StringBuilder().append(Interceptor.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), beanManager);
this.interceptorClassMetadata = InterceptorClassMetadataRegistry.getRegistry().getInterceptorClassMetadata(type.getJavaClass());
this.serializable = type.isSerializable();
this.interceptorBindingTypes = new HashSet<Annotation>();
- interceptorBindingTypes.addAll(flattenInterceptorBindings(manager, getWeldAnnotated().getAnnotations()));
+ interceptorBindingTypes.addAll(flattenInterceptorBindings(beanManager, getWeldAnnotated().getAnnotations()));
for (Class<? extends Annotation> annotation : getStereotypes())
{
- interceptorBindingTypes.addAll(flattenInterceptorBindings(manager, manager.getStereotypeDefinition(annotation)));
+ interceptorBindingTypes.addAll(flattenInterceptorBindings(beanManager, beanManager.getStereotypeDefinition(annotation)));
}
if (this.interceptorBindingTypes.size() == 0)
{
throw new DeploymentException(MISSING_BINDING_ON_INTERCEPTOR, type.getName());
}
- if (Beans.findInterceptorBindingConflicts(manager, interceptorBindingTypes))
+ if (Beans.findInterceptorBindingConflicts(beanManager, interceptorBindingTypes))
{
throw new DeploymentException(CONFLICTING_INTERCEPTOR_BINDINGS, getType());
}
}
- public static <T> InterceptorImpl<T> of(WeldClass<T> type, BeanManagerImpl manager)
- {
- return new InterceptorImpl<T>(type, manager);
- }
-
public Set<Annotation> getInterceptorBindings()
{
return interceptorBindingTypes;
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -95,12 +95,12 @@
*
* @param <T> The type
* @param clazz The class
- * @param manager the current manager
+ * @param beanManager the current manager
* @return A Web Bean
*/
- public static <T> ManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
+ public static <T> ManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl beanManager)
{
- return new ManagedBean<T>(clazz, createId(ManagedBean.class.getSimpleName(), clazz), manager);
+ return new ManagedBean<T>(clazz, createId(ManagedBean.class.getSimpleName(), clazz), beanManager);
}
protected static String createId(String beanType, WeldClass<?> clazz)
@@ -112,11 +112,11 @@
* Constructor
*
* @param type The type of the bean
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- protected ManagedBean(WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected ManagedBean(WeldClass<T> type, String idSuffix, BeanManagerImpl beanManager)
{
- super(type, idSuffix, manager);
+ super(type, idSuffix, beanManager);
initType();
initTypes();
initQualifiers();
@@ -144,7 +144,7 @@
{
throw new ForbiddenStateException(DELEGATE_INJECTION_POINT_NOT_FOUND, decorator);
}
- return getManager().replaceOrPushCurrentInjectionPoint(outerDelegateInjectionPoint);
+ return getBeanManager().replaceOrPushCurrentInjectionPoint(outerDelegateInjectionPoint);
}
/**
@@ -189,13 +189,13 @@
public void inject(final T instance, final CreationalContext<T> ctx)
{
- new InjectionContextImpl<T>(getManager(), this, instance)
+ new InjectionContextImpl<T>(getBeanManager(), this, instance)
{
public void proceed()
{
- Beans.injectEEFields(instance, getManager(), ejbInjectionPoints, persistenceContextInjectionPoints, persistenceUnitInjectionPoints, resourceInjectionPoints);
- Beans.injectFieldsAndInitializers(instance, ctx, getManager(), getInjectableFields(), getInitializerMethods());
+ Beans.injectEEFields(instance, getBeanManager(), ejbInjectionPoints, persistenceContextInjectionPoints, persistenceUnitInjectionPoints, resourceInjectionPoints);
+ Beans.injectFieldsAndInitializers(instance, ctx, getBeanManager(), getInjectableFields(), getInitializerMethods());
}
}.run();
@@ -285,7 +285,7 @@
}
if (this.passivationCapableBean && hasCdiBoundInterceptors())
{
- for (SerializableContextual<Interceptor<?>, ?> interceptor : getManager().getCdiInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors())
+ for (SerializableContextual<Interceptor<?>, ?> interceptor : getBeanManager().getCdiInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors())
{
if (!(PassivationCapable.class.isAssignableFrom(interceptor.get().getClass())) || !((InterceptorImpl<?>)interceptor.get()).isSerializable())
{
@@ -296,7 +296,7 @@
}
if (this.passivationCapableBean && hasDirectlyDefinedInterceptors())
{
- for (Class<?> interceptorClass : getManager().getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors())
+ for (Class<?> interceptorClass : getBeanManager().getClassDeclaredInterceptorsRegistry().getInterceptionModel(getType()).getAllInterceptors())
{
if (!Reflections.isSerializable(interceptorClass))
{
@@ -338,9 +338,9 @@
private void initEEInjectionPoints()
{
- this.ejbInjectionPoints = Beans.getEjbInjectionPoints(this, getWeldAnnotated(), getManager());
- this.persistenceContextInjectionPoints = Beans.getPersistenceContextInjectionPoints(this, getWeldAnnotated(), getManager());
- this.persistenceUnitInjectionPoints = Beans.getPersistenceUnitInjectionPoints(this, getWeldAnnotated(), getManager());
+ this.ejbInjectionPoints = Beans.getEjbInjectionPoints(this, getWeldAnnotated(), getBeanManager());
+ this.persistenceContextInjectionPoints = Beans.getPersistenceContextInjectionPoints(this, getWeldAnnotated(), getBeanManager());
+ this.persistenceUnitInjectionPoints = Beans.getPersistenceUnitInjectionPoints(this, getWeldAnnotated(), getBeanManager());
this.resourceInjectionPoints = Beans.getResourceInjectionPoints(this, getWeldAnnotated(), beanManager);
}
@@ -465,7 +465,7 @@
if (hasDirectlyDefinedInterceptors())
{
interceptionRegistries.add(beanManager.getClassDeclaredInterceptorsRegistry());
- interceptionHandlerFactories.add(new ClassInterceptionHandlerFactory(creationalContext, getManager()));
+ interceptionHandlerFactories.add(new ClassInterceptionHandlerFactory(creationalContext, getBeanManager()));
}
if (hasCdiBoundInterceptors())
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -38,12 +38,12 @@
* Creates an instance of a NewSimpleBean from an annotated class
*
* @param clazz The annotated class
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
* @return a new NewSimpleBean instance
*/
- public static <T> NewManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
+ public static <T> NewManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl beanManager)
{
- return new NewManagedBean<T>(clazz, createId(NewManagedBean.class.getSimpleName(), clazz), manager);
+ return new NewManagedBean<T>(clazz, createId(NewManagedBean.class.getSimpleName(), clazz), beanManager);
}
private Set<Annotation> bindings;
@@ -52,11 +52,11 @@
* Protected constructor
*
* @param type An annotated class
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- protected NewManagedBean(final WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected NewManagedBean(final WeldClass<T> type, String idSuffix, BeanManagerImpl beanManager)
{
- super(type, idSuffix, manager);
+ super(type, idSuffix, beanManager);
this.bindings = new HashSet<Annotation>();
this.bindings.add(new NewLiteral()
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -40,13 +40,13 @@
* Creates an instance of a NewEnterpriseBean from an annotated class
*
* @param clazz The annotated class
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
* @return a new NewEnterpriseBean instance
*/
- public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
+ public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager)
{
- WeldClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
- return new NewSessionBean<T>(type, ejbDescriptor, createId(NewSessionBean.class.getSimpleName(), ejbDescriptor), manager);
+ WeldClass<T> type = beanManager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
+ return new NewSessionBean<T>(type, ejbDescriptor, createId(NewSessionBean.class.getSimpleName(), ejbDescriptor), beanManager);
}
private Set<Annotation> bindings;
@@ -55,11 +55,11 @@
* Protected constructor
*
* @param type An annotated class
- * @param manager The Bean manager
+ * @param beanManager The Bean manager
*/
- protected NewSessionBean(final WeldClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
+ protected NewSessionBean(final WeldClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl beanManager)
{
- super(type, ejbDescriptor, idSuffix, manager);
+ super(type, ejbDescriptor, idSuffix, beanManager);
this.bindings = new HashSet<Annotation>();
this.bindings.add(new NewLiteral()
{
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -47,12 +47,12 @@
*
* @param field The underlying method abstraction
* @param declaringBean The declaring bean abstraction
- * @param manager the current manager
+ * @param beanManager the current manager
* @return A producer field
*/
- public static <X, T> ProducerField<X, T> of(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> ProducerField<X, T> of(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager)
{
- return new ProducerField<X, T>(field, declaringBean, manager);
+ return new ProducerField<X, T>(field, declaringBean, beanManager);
}
/**
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -64,17 +64,17 @@
*
* @param method The underlying method abstraction
* @param declaringBean The declaring bean abstraction
- * @param manager the current manager
+ * @param beanManager the current manager
* @return A producer Web Bean
*/
- public static <X, T> ProducerMethod<X, T> of(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> ProducerMethod<X, T> of(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager)
{
- return new ProducerMethod<X, T>(method, declaringBean, manager);
+ return new ProducerMethod<X, T>(method, declaringBean, beanManager);
}
- protected ProducerMethod(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ protected ProducerMethod(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl beanManager)
{
- super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getWeldAnnotated().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, beanManager);
this.method = MethodInjectionPoint.of(this, method);
initType();
initTypes();
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -39,19 +39,19 @@
public static final String BEAN_ID_SEPARATOR = "-";
- private final BeanManagerImpl manager;
+ private final BeanManagerImpl beanManager;
private final String id;
- protected RIBean(String idSuffix, BeanManagerImpl manager)
+ protected RIBean(String idSuffix, BeanManagerImpl beanManager)
{
- this.manager = manager;
- this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(BEAN_ID_SEPARATOR).append(manager.getId()).append(BEAN_ID_SEPARATOR).append(idSuffix).toString();
+ this.beanManager = beanManager;
+ this.id = new StringBuilder().append(BEAN_ID_PREFIX).append(BEAN_ID_SEPARATOR).append(beanManager.getId()).append(BEAN_ID_SEPARATOR).append(idSuffix).toString();
}
- protected BeanManagerImpl getManager()
+ protected BeanManagerImpl getBeanManager()
{
- return manager;
+ return beanManager;
}
public abstract Class<T> getType();
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -98,13 +98,13 @@
*
* @param <T> The type
* @param clazz The class
- * @param manager the current manager
+ * @param beanManager the current manager
* @return An Enterprise Web Bean
*/
- public static <T> SessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
+ public static <T> SessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager)
{
- WeldClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
- return new SessionBean<T>(type, ejbDescriptor, createId(SessionBean.class.getSimpleName(), ejbDescriptor) , manager);
+ WeldClass<T> type = beanManager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
+ return new SessionBean<T>(type, ejbDescriptor, createId(SessionBean.class.getSimpleName(), ejbDescriptor) , beanManager);
}
protected static String createId(String beanType, InternalEjbDescriptor<?> ejbDescriptor)
@@ -149,12 +149,12 @@
public void inject(final T instance, final CreationalContext<T> ctx)
{
- new InjectionContextImpl<T>(getManager(), this, instance)
+ new InjectionContextImpl<T>(getBeanManager(), this, instance)
{
public void proceed()
{
- Beans.injectFieldsAndInitializers(instance, ctx, getManager(), getInjectableFields(), getInitializerMethods());
+ Beans.injectFieldsAndInitializers(instance, ctx, getBeanManager(), getInjectableFields(), getInitializerMethods());
}
}.run();
@@ -428,7 +428,7 @@
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));
+ getBeanManager().getServices().get(EjbServices.class).registerInterceptors(getEjbDescriptor().delegate(), new InterceptorBindingsAdapter(model));
}
}
}
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -36,9 +36,9 @@
private static final String ID_PREFIX = "Built-in";
private static final Set<Annotation> DEFAULT_QUALIFIERS = Arrays2.asSet( DefaultLiteral.INSTANCE, AnyLiteral.INSTANCE );
- protected AbstractBuiltInBean(String idSuffix, BeanManagerImpl manager)
+ protected AbstractBuiltInBean(String idSuffix, BeanManagerImpl beanManager)
{
- super(new StringBuilder().append(ID_PREFIX).append(BEAN_ID_SEPARATOR).append(idSuffix).toString(), manager);
+ super(new StringBuilder().append(ID_PREFIX).append(BEAN_ID_SEPARATOR).append(idSuffix).toString(), beanManager);
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacadeBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacadeBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractFacadeBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -38,7 +38,7 @@
public T create(CreationalContext<T> creationalContext)
{
- InjectionPoint injectionPoint = this.getManager().getCurrentInjectionPoint();
+ InjectionPoint injectionPoint = this.getBeanManager().getCurrentInjectionPoint();
if (injectionPoint != null)
{
return newInstance(injectionPoint);
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/BeanManagerBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -28,7 +28,7 @@
public class BeanManagerBean extends AbstractBuiltInBean<BeanManagerImpl>
{
- private static final Set<Type> TYPES = Arrays2.<Type>asSet(Object.class, BeanManagerImpl.class, BeanManager.class);
+ private static final Set<Type> TYPES = Arrays2.<Type>asSet( Object.class, BeanManagerImpl.class, BeanManager.class );
public BeanManagerBean(BeanManagerImpl manager)
{
@@ -37,7 +37,7 @@
public BeanManagerImpl create(CreationalContext<BeanManagerImpl> creationalContext)
{
- return getManager().getCurrent();
+ return getBeanManager().getCurrent();
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/CallableMethodHandler.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/CallableMethodHandler.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/CallableMethodHandler.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -23,7 +23,7 @@
private static final LocLogger log = loggerFactory().getLogger(BEAN);
// Can't make this final, need to deallocate on shutdown
- private Callable<?> callable;
+ private final Callable<?> callable;
public CallableMethodHandler(Callable<?> callable)
{
@@ -62,10 +62,5 @@
}
}
}
-
- private void cleanup()
- {
- this.callable = null;
- }
}
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/EventBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/EventBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/EventBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -33,6 +33,7 @@
public class EventBean extends AbstractFacadeBean<Event<?>>
{
+ @SuppressWarnings("serial")
private static final Class<Event<?>> TYPE = new TypeLiteral<Event<?>>() {}.getRawType();
private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(TYPE, Object.class);
private static final Set<Annotation> DEFAULT_QUALIFIERS = Collections.<Annotation>singleton(AnyLiteral.INSTANCE);
@@ -69,7 +70,7 @@
@Override
protected Event<?> newInstance(InjectionPoint injectionPoint)
{
- return EventImpl.of(injectionPoint, getManager());
+ return EventImpl.of(injectionPoint, getBeanManager());
}
@Override
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -31,7 +31,6 @@
* @author pmuir
*
*/
-// TODO Move out of built in
public class ExtensionBean extends AbstractBuiltInBean<Extension>
{
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/FacadeBeanResolvableTransformer.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/FacadeBeanResolvableTransformer.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/FacadeBeanResolvableTransformer.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -38,7 +38,7 @@
public class FacadeBeanResolvableTransformer implements ResolvableTransformer
{
- private static final Set<Annotation> DEFAULT_QUALIFIERS = Collections.<Annotation>singleton(AnyLiteral.INSTANCE);
+ private static final Set<Annotation> DEFAULT_QUALIFIERS = Collections.<Annotation>singleton( AnyLiteral.INSTANCE );
private final Class<?> clazz;
private final HashSet<Type> types;
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InjectionPointBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InjectionPointBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InjectionPointBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -34,7 +34,7 @@
public class InjectionPointBean extends AbstractBuiltInBean<InjectionPoint>
{
- private static final Set<Type> TYPES = Arrays2.<Type>asSet(InjectionPoint.class, Object.class);
+ private static final Set<Type> TYPES = Arrays2.<Type>asSet( InjectionPoint.class, Object.class );
/**
* Creates an InjectionPoint Web Bean for the injection of the containing bean owning
@@ -52,7 +52,7 @@
public InjectionPoint create(CreationalContext<InjectionPoint> creationalContext)
{
- return getManager().getCurrentInjectionPoint();
+ return getBeanManager().getCurrentInjectionPoint();
}
public void destroy(InjectionPoint instance, CreationalContext<InjectionPoint> creationalContext)
Modified: core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceBean.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceBean.java 2010-01-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/InstanceBean.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -32,9 +32,11 @@
public class InstanceBean extends AbstractFacadeBean<Instance<?>>
{
+ @SuppressWarnings("serial")
private static final Class<Instance<?>> INSTANCE_TYPE = new TypeLiteral<Instance<?>>() {}.getRawType();
+ @SuppressWarnings("serial")
private static final Class<Provider<?>> PROVIDER_TYPE = new TypeLiteral<Provider<?>>() {}.getRawType();
- private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet(INSTANCE_TYPE, PROVIDER_TYPE, Object.class);
+ private static final Set<Type> DEFAULT_TYPES = Arrays2.<Type>asSet( INSTANCE_TYPE, PROVIDER_TYPE, Object.class );
private static final Set<Annotation> DEFAULT_QUALIFIERS = Collections.<Annotation>singleton(AnyLiteral.INSTANCE);
public InstanceBean(BeanManagerImpl manager)
@@ -68,7 +70,7 @@
@Override
protected Instance<?> newInstance(InjectionPoint injectionPoint)
{
- return InstanceImpl.of(injectionPoint, getManager());
+ return InstanceImpl.of(injectionPoint, getBeanManager());
}
@Override
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-12 12:56:52 UTC (rev 5438)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ee/EEResourceProducerField.java 2010-01-12 12:58:27 UTC (rev 5439)
@@ -145,7 +145,7 @@
}
else
{
- return Proxies.<T>createProxy(new CallableMethodHandler(new EEResourceCallable<T>(getManager(), this, creationalContext)), TypeInfo.of(getTypes()).add(Serializable.class));
+ return Proxies.<T>createProxy(new CallableMethodHandler(new EEResourceCallable<T>(getBeanManager(), this, creationalContext)), TypeInfo.of(getTypes()).add(Serializable.class));
}
}
catch (InstantiationException e)
More information about the weld-commits
mailing list