Package org.jboss.weld.bean
Class AbstractClassBean<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>
- Type Parameters:
T- the type of class for 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:
ManagedBean
public abstract class AbstractClassBean<T>
extends AbstractBean<T,Class<T>>
implements DecorableBean<T>, ClassBean<T>
An abstract bean representation common for class-based beans
- Author:
- Pete Muir, David Allen, Jozef Hartinger
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SlimAnnotatedType<T>protected EnhancedAnnotatedType<T>protected Collection<jakarta.enterprise.inject.spi.AnnotatedMethod<? super T>>Fields inherited from class org.jboss.weld.bean.AbstractBean
typeFields inherited from class org.jboss.weld.bean.RIBean
beanManager -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractClassBean(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 implementationvoidThis method is called after the container is started allowing the bean to release any resources that are only required at boot timeReturns the annotated item the bean representsList<jakarta.enterprise.inject.spi.Decorator<?>>Resolves decorators for this bean.Gets the annotated itemSet<jakarta.enterprise.inject.spi.InjectionPoint>jakarta.enterprise.inject.spi.InjectionTarget<T>Duplicate ofgetProducer()- kept for backwards compatibility.jakarta.enterprise.inject.spi.InjectionTarget<T>Returns injection target used to produce instances of this beanbooleanbooleanprotected voidinitType()Initializes the bean typevoidinternalInitialize(BeanDeployerEnvironment environment) Initializes the bean and its metadataprotected abstract booleanprotected voidvoidsetInjectionTarget(jakarta.enterprise.inject.spi.InjectionTarget<T> injectionTarget) voidsetProducer(jakarta.enterprise.inject.spi.InjectionTarget<T> producer) voidsetProducer(jakarta.enterprise.inject.spi.Producer<T> producer) Set a Producer for this bean.Methods inherited from class org.jboss.weld.bean.AbstractBean
checkSpecialization, checkType, getSpecializedBeans, getType, initializeAfterBeanDiscovery, isDependent, isIgnoreFinalMethods, isProxyRequired, isSpecializing, postSpecialize, preInitialize, setIgnoreFinalMethods, specializeMethods inherited from class org.jboss.weld.bean.RIBean
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
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.context.spi.Contextual
create, destroyMethods inherited from interface jakarta.enterprise.inject.spi.PassivationCapable
getIdMethods inherited from interface org.jboss.weld.bean.WeldBean
getIdentifier, getPriority
-
Field Details
-
annotatedType
-
enhancedAnnotatedItem
-
invokableMethods
-
-
Constructor Details
-
AbstractClassBean
protected AbstractClassBean(jakarta.enterprise.inject.spi.BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, org.jboss.weld.serialization.spi.BeanIdentifier identifier, BeanManagerImpl beanManager) Constructor- Parameters:
type- The typebeanManager- The Bean manager
-
-
Method Details
-
internalInitialize
Initializes the bean and its metadata- Overrides:
internalInitializein classAbstractBean<T,Class<T>>
-
hasDecorators
public boolean hasDecorators() -
getDecorators
Description copied from interface:DecorableBeanResolves decorators for this bean.- Specified by:
getDecoratorsin interfaceDecorableBean<T>
-
initType
protected void initType()Initializes the bean type -
checkBeanImplementation
protected void checkBeanImplementation()Validates the bean implementation -
preSpecialize
protected void preSpecialize()- Overrides:
preSpecializein classAbstractBean<T,Class<T>>
-
getAnnotated
Description copied from class:AbstractBeanReturns the annotated item the bean represents- Specified by:
getAnnotatedin interfaceClassBean<T>- Specified by:
getAnnotatedin classAbstractBean<T,Class<T>> - Returns:
- The annotated item
-
getEnhancedAnnotated
Gets the annotated item- Specified by:
getEnhancedAnnotatedin interfaceClassBean<T>- Specified by:
getEnhancedAnnotatedin classAbstractBean<T,Class<T>> - Returns:
- The annotated item
-
cleanupAfterBoot
public void cleanupAfterBoot()Description copied from class:RIBeanThis method is called after the container is started allowing the bean to release any resources that are only required at boot time- Specified by:
cleanupAfterBootin classRIBean<T>
-
isInterceptionCandidate
protected abstract boolean isInterceptionCandidate() -
getInjectionPoints
- Specified by:
getInjectionPointsin interfacejakarta.enterprise.inject.spi.Bean<T>
-
getInterceptors
-
hasInterceptors
public boolean hasInterceptors() -
getProducer
Description copied from interface:ClassBeanReturns injection target used to produce instances of this bean- Specified by:
getProducerin interfaceClassBean<T>- Overrides:
getProducerin classAbstractBean<T,Class<T>> - Returns:
- the injection target
-
setProducer
-
getInjectionTarget
Duplicate ofgetProducer()- kept for backwards compatibility. -
setInjectionTarget
-
setProducer
Description copied from class:AbstractBeanSet a Producer for this bean. This operation is *not* threadsafe, and should not be called outside bootstrap.- Overrides:
setProducerin classAbstractBean<T,Class<T>>
-