Package org.jboss.weld.bean
Class AbstractBean<T,S>
java.lang.Object
org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
org.jboss.weld.bean.CommonBean<T>
org.jboss.weld.bean.RIBean<T>
org.jboss.weld.bean.AbstractBean<T,S>
- Type Parameters:
T- the type of beanS- the Class<?> of the bean type
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<T>,jakarta.enterprise.inject.spi.Bean<T>,jakarta.enterprise.inject.spi.BeanAttributes<T>,jakarta.enterprise.inject.spi.PassivationCapable,WeldBean<T>
- Direct Known Subclasses:
AbstractClassBean,AbstractProducerBean
An abstract bean representation common for all beans
- Author:
- Pete Muir, Ales Justin, Jozef Hartinger
-
Field Summary
FieldsFields inherited from class org.jboss.weld.bean.RIBean
beanManager -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidValidates specialization if this bean specializes another bean.protected abstract voidabstract jakarta.enterprise.inject.spi.AnnotatedReturns the annotated item the bean representsabstract EnhancedAnnotated<T,S> Returns the weld-enhanced annotated item the bean represents.jakarta.enterprise.inject.spi.Producer<T>protected Set<? extends AbstractBean<?,?>> getType()Gets the type of the beanvoidIn particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g. for initializing decorators taking into account the possibility of having custom decorators which are deployed through portable extensions)voidinternalInitialize(BeanDeployerEnvironment environment) Initializes the bean and its metadatabooleanbooleanbooleanbooleanprotected voidvoidInitializes specialization.protected voidvoidvoidsetProducer(jakarta.enterprise.inject.spi.Producer<T> producer) Set a Producer for this bean.protected voidMethods inherited from class org.jboss.weld.bean.RIBean
cleanupAfterBoot, destroy, getBeanClass, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isNormalScoped, isPassivationCapableBean, isPassivationCapableDependency, isProxyable, setAttributesMethods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, toString, unwrapMethods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternativeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.enterprise.inject.spi.Bean
getInjectionPointsMethods inherited from interface jakarta.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternativeMethods inherited from interface jakarta.enterprise.context.spi.Contextual
createMethods inherited from interface jakarta.enterprise.inject.spi.PassivationCapable
getIdMethods inherited from interface org.jboss.weld.bean.WeldBean
getPriority
-
Field Details
-
type
-
-
Constructor Details
-
AbstractBean
public AbstractBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager) Constructor- Parameters:
beanManager- The Bean manager
-
-
Method Details
-
preInitialize
public void preInitialize()Initializes specialization. This method is called beforeProcessBeanAttributesis fired and also after the event if theBeanAttributeshave been altered.- Specified by:
preInitializein classRIBean<T>
-
internalInitialize
Initializes the bean and its metadata- Specified by:
internalInitializein classRIBean<T>
-
initializeAfterBeanDiscovery
public void initializeAfterBeanDiscovery()Description copied from class:RIBeanIn particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g. for initializing decorators taking into account the possibility of having custom decorators which are deployed through portable extensions)- Specified by:
initializeAfterBeanDiscoveryin classRIBean<T>
-
checkType
protected abstract void checkType() -
checkSpecialization
public void checkSpecialization()Validates specialization if this bean specializes another bean. -
postSpecialize
protected void postSpecialize() -
preSpecialize
protected void preSpecialize() -
specialize
protected void specialize() -
getAnnotated
public abstract jakarta.enterprise.inject.spi.Annotated getAnnotated()Returns the annotated item the bean represents- Returns:
- The annotated item
-
getEnhancedAnnotated
Returns the weld-enhanced annotated item the bean represents. The item is only available during bootstrap. The method throwsIllegalStateExceptionat runtime.- Returns:
- The annotated item
- Throws:
IllegalStateException- when invoked at runtime
-
getSpecializedBeans
-
getType
Gets the type of the bean -
isDependent
public boolean isDependent()- Overrides:
isDependentin classRIBean<T>
-
isSpecializing
public boolean isSpecializing() -
isProxyRequired
public boolean isProxyRequired()- Specified by:
isProxyRequiredin classRIBean<T>
-
getProducer
-
setProducer
Set a Producer for this bean. This operation is *not* threadsafe, and should not be called outside bootstrap. -
isIgnoreFinalMethods
public boolean isIgnoreFinalMethods() -
setIgnoreFinalMethods
public void setIgnoreFinalMethods()
-