Package org.jboss.weld.bean
Class ManagedBean<T>
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,Class<T>>
org.jboss.weld.bean.AbstractClassBean<T>
org.jboss.weld.bean.ManagedBean<T>
- Type Parameters:
T- The type (class) of the bean
- 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,ClassBean<T>,DecorableBean<T>,WeldBean<T>
- Direct Known Subclasses:
DecoratorImpl,InterceptorImpl
Represents a simple bean
- Author:
- Pete Muir, Marius Bogoevici, Ales Justin, Marko Luksa, Laird Nelson
-
Field Summary
Fields inherited from class org.jboss.weld.bean.AbstractClassBean
annotatedType, enhancedAnnotatedItem, invokableMethodsFields inherited from class org.jboss.weld.bean.AbstractBean
typeFields inherited from class org.jboss.weld.bean.RIBean
beanManager -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedManagedBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidValidates the bean implementationprotected voidValidates the typeCreates an instance of the beanvoidDestroys an instance 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 metadataprotected booleanbooleanbooleanbooleanstatic <T> ManagedBean<T>of(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) Creates a simple, annotation defined Web BeanvoidsetProducer(jakarta.enterprise.inject.spi.InjectionTarget<T> producer) protected voidtoString()Methods inherited from class org.jboss.weld.bean.AbstractClassBean
cleanupAfterBoot, getAnnotated, getDecorators, getEnhancedAnnotated, getInjectionPoints, getInjectionTarget, getInterceptors, getProducer, hasDecorators, hasInterceptors, initType, preSpecialize, setInjectionTarget, setProducerMethods inherited from class org.jboss.weld.bean.AbstractBean
checkSpecialization, getSpecializedBeans, getType, isDependent, isIgnoreFinalMethods, isProxyRequired, isSpecializing, postSpecialize, preInitialize, setIgnoreFinalMethodsMethods inherited from class org.jboss.weld.bean.RIBean
getBeanClass, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isNormalScoped, setAttributesMethods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, 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
getBeanClassMethods inherited from interface jakarta.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternativeMethods inherited from interface org.jboss.weld.bean.ClassBean
getBeanManagerMethods inherited from interface jakarta.enterprise.inject.spi.PassivationCapable
getIdMethods inherited from interface org.jboss.weld.bean.WeldBean
getIdentifier, getPriority
-
Constructor Details
-
ManagedBean
protected ManagedBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager) Constructor- Parameters:
type- The type of the beanbeanManager- The Bean manager
-
-
Method Details
-
of
public static <T> ManagedBean<T> of(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> clazz, BeanManagerImpl beanManager) Creates a simple, annotation defined Web Bean- Type Parameters:
T- The type- Parameters:
clazz- The classbeanManager- the current manager- Returns:
- A Web Bean
-
internalInitialize
Description copied from class:AbstractClassBeanInitializes the bean and its metadata- Overrides:
internalInitializein classAbstractClassBean<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)- Overrides:
initializeAfterBeanDiscoveryin classAbstractBean<T,Class<T>>
-
create
Creates an instance of the bean- Returns:
- The instance
-
destroy
public void destroy(T instance, jakarta.enterprise.context.spi.CreationalContext<T> creationalContext) Destroys an instance of the bean -
checkType
protected void checkType()Validates the type- Specified by:
checkTypein classAbstractBean<T,Class<T>>
-
checkBeanImplementation
protected void checkBeanImplementation()Description copied from class:AbstractClassBeanValidates the bean implementation- Overrides:
checkBeanImplementationin classAbstractClassBean<T>
-
specialize
protected void specialize()- Overrides:
specializein classAbstractBean<T,Class<T>>
-
isInterceptionCandidate
protected boolean isInterceptionCandidate()- Specified by:
isInterceptionCandidatein classAbstractClassBean<T>
-
toString
- Overrides:
toStringin classCommonBean<T>
-
isProxyable
public boolean isProxyable()- Specified by:
isProxyablein classRIBean<T>
-
isPassivationCapableBean
public boolean isPassivationCapableBean()- Specified by:
isPassivationCapableBeanin classRIBean<T>
-
isPassivationCapableDependency
public boolean isPassivationCapableDependency()- Specified by:
isPassivationCapableDependencyin classRIBean<T>
-
setProducer
- Overrides:
setProducerin classAbstractClassBean<T>
-