org.apache.webbeans.component
Class AbstractProducerBean<T>
java.lang.Object
org.apache.webbeans.component.BeanAttributesImpl<T>
org.apache.webbeans.component.AbstractOwbBean<T>
org.apache.webbeans.component.AbstractProducerBean<T>
- Type Parameters:
T - bean type info
- All Implemented Interfaces:
- Contextual<T>, Bean<T>, PassivationCapable, OwbBean<T>, BeanAttributes<T>
- Direct Known Subclasses:
- ProducerFieldBean, ProducerMethodBean
public class AbstractProducerBean<T>
- extends AbstractOwbBean<T>
- implements PassivationCapable
Abstract class for producer components.
- Version:
- $Rev: 1523424 $ $Date: 2013-09-15 11:53:43 +0200 (Sun, 15 Sep 2013) $
| Methods inherited from class org.apache.webbeans.component.AbstractOwbBean |
create, destroy, getBeanClass, getId, getInjectionPoints, getLogger, getWebBeansContext, getWebBeansType, isAlternative, isDependent, isEnabled, isPassivationCapable, isSpecializedBean, setEnabled, setSpecializedBean, toString |
AbstractProducerBean
public AbstractProducerBean(Class<?> ownerBeanClass,
WebBeansContext webBeansContext,
WebBeansType webBeansType,
BeanAttributes<T> beanAttributes,
Class<T> returnType,
ProducerFactory<?> producerFactory)
- Create a new instance.
- Parameters:
returnType - bean type infoownerBeanClass - class which contains this producer method or field
getProducer
public Producer<T> getProducer()
- Specified by:
getProducer in interface OwbBean<T>
- Returns:
- the producer for this bean;
getReturnType
public Class<T> getReturnType()
- Description copied from class:
AbstractOwbBean
- Gets type of the producer method/field or the bean class if it's not a producer.
This basically determines the class which will get created.
- Specified by:
getReturnType in interface OwbBean<T>- Overrides:
getReturnType in class AbstractOwbBean<T>
- Returns:
- type of the producer method
- See Also:
AbstractOwbBean.getBeanClass()
dispose
public void dispose(T instance,
CreationalContext<T> creationalContext)
-
checkNullInstance
protected void checkNullInstance(Object instance,
String producerName)
- Check null control.
- Parameters:
instance - bean instance
checkScopeType
protected void checkScopeType(String producerName)
- Check passivation check.
isPassivationCapable
protected boolean isPassivationCapable(Class<?> returnType,
Integer modifiers)
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.