Package org.jboss.weld.bean
Class SyntheticClassBean<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- org.jboss.weld.bean.AbstractSyntheticBean<T>
-
- org.jboss.weld.bean.SyntheticClassBean<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Contextual<T>,Bean<T>,BeanAttributes<T>,WeldBean<T>
- Direct Known Subclasses:
SyntheticDecorator
public class SyntheticClassBean<T> extends AbstractSyntheticBean<T>
Represents a class bean created based on extension-providedInjectionTargetimplementation.- Author:
- Jozef Hartinger
-
-
Field Summary
Fields Modifier and Type Field Description protected InjectionTarget<T>producer
-
Constructor Summary
Constructors Constructor Description SyntheticClassBean(BeanAttributes<T> attributes, Class<T> beanClass, InjectionTargetFactory<T> factory, BeanManagerImpl manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate(CreationalContext<T> creationalContext)Create a new instance of the contextual type.voiddestroy(T instance, CreationalContext<T> creationalContext)Destroy an instance of the contextual type.protected InjectionTarget<T>getProducer()StringtoString()-
Methods inherited from class org.jboss.weld.bean.AbstractSyntheticBean
getBeanClass, getInjectionPoints
-
Methods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, isNullable, setAttributes, unwrap
-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from interface org.jboss.weld.bean.WeldBean
getPriority
-
-
-
-
Field Detail
-
producer
protected final InjectionTarget<T> producer
-
-
Constructor Detail
-
SyntheticClassBean
public SyntheticClassBean(BeanAttributes<T> attributes, Class<T> beanClass, InjectionTargetFactory<T> factory, BeanManagerImpl manager)
-
-
Method Detail
-
create
public T create(CreationalContext<T> creationalContext)
Description copied from interface:ContextualCreate a new instance of the contextual type. Instances should use the givenCreationalContextwhen obtaining contextual references to inject, in order to ensure that any dependent objects are associated with the contextual instance that is being created. An implementation may callCreationalContext.push(Object)between instantiation and injection to help the container minimize the use of client proxy objects.- Parameters:
creationalContext- the context in which this instance is being created- Returns:
- the contextual instance
-
destroy
public void destroy(T instance, CreationalContext<T> creationalContext)
Description copied from interface:ContextualDestroy an instance of the contextual type. Implementations should callCreationalContext.release()to allow the container to destroy dependent objects of the contextual instance.- Parameters:
instance- the contextual instance to destroycreationalContext- the context in which this instance was created
-
getProducer
protected InjectionTarget<T> getProducer()
- Specified by:
getProducerin classAbstractSyntheticBean<T>
-
toString
public String toString()
- Overrides:
toStringin classCommonBean<T>
-
-