org.jboss.weld.bean
Class ProducerField<X,T>
java.lang.Object
org.jboss.weld.bean.RIBean<T>
org.jboss.weld.bean.AbstractBean<T,S>
org.jboss.weld.bean.AbstractReceiverBean<X,T,S>
org.jboss.weld.bean.AbstractProducerBean<X,T,Field>
org.jboss.weld.bean.ProducerField<X,T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.PassivationCapable
- Direct Known Subclasses:
- EEResourceProducerField
public class ProducerField<X,T>
- extends AbstractProducerBean<X,T,Field>
Represents a producer field
- Author:
- Pete Muir
Methods inherited from class org.jboss.weld.bean.AbstractProducerBean |
checkProducerReturnType, checkReturnValue, checkType, create, getBeanClass, getInjectionPoints, getProducer, initScope, initType, initTypes, isPassivationCapableBean, isPassivationCapableDependency, isTypeSerializable, setProducer |
Methods inherited from class org.jboss.weld.bean.AbstractBean |
addInjectionPoint, addInjectionPoints, checkDelegateInjectionPoints, cleanupAfterBoot, getDelegateInjectionPoints, getMergedStereotypes, getName, getNewInjectionPoints, getQualifiers, getScope, getServices, getStereotypes, getType, getTypedTypes, getTypes, getWeldInjectionPoints, initAlternative, initDefaultQualifiers, initializeAfterBeanDiscovery, initName, initQualifiers, initScopeFromStereotype, initStereotypes, isAlternative, isDependent, isInitialized, isNormalScoped, isNullable, isPrimitive, isProxyRequired, postSpecialize, preSpecialize, specialize |
ProducerField
protected ProducerField(WeldField<T,? super X> field,
AbstractClassBean<X> declaringBean,
BeanManagerImpl manager,
org.jboss.weld.bootstrap.api.ServiceRegistry services)
- Constructor
- Parameters:
method
- The producer field abstractiondeclaringBean
- The declaring beanmanager
- The Bean manager
of
public static <X,T> ProducerField<X,T> of(WeldField<T,? super X> field,
AbstractClassBean<X> declaringBean,
BeanManagerImpl beanManager,
org.jboss.weld.bootstrap.api.ServiceRegistry services)
- Creates a producer field
- Parameters:
field
- The underlying method abstractiondeclaringBean
- The declaring bean abstractionbeanManager
- the current manager
- Returns:
- A producer field
createId
protected static String createId(WeldField<?,?> field,
AbstractClassBean<?> declaringBean)
initialize
public void initialize(BeanDeployerEnvironment environment)
- Description copied from class:
AbstractProducerBean
- Initializes the bean and its metadata
- Overrides:
initialize
in class AbstractProducerBean<X,T,Field>
checkProducerField
protected void checkProducerField()
defaultDispose
protected void defaultDispose(T instance)
destroy
public void destroy(T instance,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
getWeldAnnotated
public WeldField<T,? super X> getWeldAnnotated()
- Gets the annotated item representing the field
- Specified by:
getWeldAnnotated
in class AbstractProducerBean<X,T,Field>
- Returns:
- The annotated item
getDefaultName
protected String getDefaultName()
- Returns the default name
- Specified by:
getDefaultName
in class AbstractBean<T,Field>
- Returns:
- The default name
getSpecializedBean
public AbstractBean<?,?> getSpecializedBean()
- Specified by:
getSpecializedBean
in class AbstractBean<T,Field>
isSpecializing
public boolean isSpecializing()
- Overrides:
isSpecializing
in class AbstractBean<T,Field>
toString
public String toString()
- Overrides:
toString
in class RIBean<T>
isProxyable
public boolean isProxyable()
- Specified by:
isProxyable
in class RIBean<T>
hasDefaultProducer
public boolean hasDefaultProducer()
- Description copied from class:
AbstractBean
- Returns true if the bean uses the default
Producer
( or InjectionTarget
). The method returns false if the
producer of the bean was replaced by an extension.
- Specified by:
hasDefaultProducer
in class AbstractBean<T,Field>
Copyright © 2013 Seam Framework. All Rights Reserved.