org.jboss.webbeans.bean
Class AbstractClassBean<T>

java.lang.Object
  extended by javax.inject.manager.Bean<T>
      extended by org.jboss.webbeans.bean.RIBean<T>
          extended by org.jboss.webbeans.bean.AbstractBean<T,java.lang.Class<T>>
              extended by org.jboss.webbeans.bean.AbstractClassBean<T>
Type Parameters:
T -
E -
All Implemented Interfaces:
Contextual<T>
Direct Known Subclasses:
EnterpriseBean, SimpleBean

public abstract class AbstractClassBean<T>
extends AbstractBean<T,java.lang.Class<T>>

An abstract bean representation common for class-based beans

Author:
Pete Muir

Field Summary
protected  AnnotatedClass<T> annotatedItem
           
 
Fields inherited from class org.jboss.webbeans.bean.AbstractBean
_serializable, dependentInstancesStore, deploymentType, injectionPoints, manager, name, scopeType, type, types
 
Constructor Summary
protected AbstractClassBean(AnnotatedClass<T> type, ManagerImpl manager)
          Constructor
 
Method Summary
protected  void callInitializers(T instance, CreationalContext<T> creationalContext)
          Calls all initializers of the bean
protected  void checkBeanImplementation()
          Validates the bean implementation
protected  void checkScopeAllowed()
          Validate that the scope type is allowed by the stereotypes on the bean and the bean type
 boolean equals(java.lang.Object other)
           
protected  AnnotatedClass<T> getAnnotatedItem()
          Gets the annotated item
protected  java.lang.Class<? extends java.lang.annotation.Annotation> getDefaultDeploymentType()
          Gets the default deployment type
protected  java.lang.String getDefaultName()
          Gets the default name
 java.util.Set<? extends MethodInjectionPoint<?>> getInitializerMethods()
          Gets the annotated methods
protected  void init()
          Initializes the bean and its metadata
protected  void initDeploymentType()
          Initializes the deployment types
protected  void initInitializerMethods()
          Initializes the initializer methods
protected  void initInjectionPoints()
          Initializes the injection points
protected  void initScopeType()
          Initializes the scope type
protected  void initType()
          Initializes the bean type
protected  void injectBoundFields(T instance, CreationalContext<T> creationalContext)
          Injects bound fields
protected  void preCheckSpecialization()
           
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
bindDecorators, bindInterceptors, checkDeploymentType, checkInjectionPointsAreSerializable, checkRequiredTypesImplemented, getBindings, getDependentInstancesStore, getDeploymentType, getDeploymentType, getInjectionPoints, getMergedStereotypes, getName, getScopeType, getSpecializedBean, getType, getTypes, hashCode, initBindingTypes, initDefaultBindings, initDeploymentTypeFromStereotype, initName, initPrimitive, initProxyable, initScopeTypeFromStereotype, initSerializable, initSpecialization, initTypes, isAssignableFrom, isDependent, isNullable, isPrimitive, isProxyable, isSerializable, isSpecializing, postSpecialization
 
Methods inherited from class org.jboss.webbeans.bean.RIBean
getManager
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.context.Contextual
create, destroy
 

Field Detail

annotatedItem

protected AnnotatedClass<T> annotatedItem
Constructor Detail

AbstractClassBean

protected AbstractClassBean(AnnotatedClass<T> type,
                            ManagerImpl manager)
Constructor

Parameters:
type - The type
manager - The Web Beans manager
Method Detail

init

protected void init()
Initializes the bean and its metadata

Overrides:
init in class AbstractBean<T,java.lang.Class<T>>

injectBoundFields

protected void injectBoundFields(T instance,
                                 CreationalContext<T> creationalContext)
Injects bound fields

Parameters:
instance - The instance to inject into

callInitializers

protected void callInitializers(T instance,
                                CreationalContext<T> creationalContext)
Calls all initializers of the bean

Parameters:
instance - The bean instance

initType

protected void initType()
Initializes the bean type

Specified by:
initType in class AbstractBean<T,java.lang.Class<T>>

initInjectionPoints

protected void initInjectionPoints()
Initializes the injection points


initInitializerMethods

protected void initInitializerMethods()
Initializes the initializer methods


initScopeType

protected void initScopeType()
Description copied from class: AbstractBean
Initializes the scope type

Specified by:
initScopeType in class AbstractBean<T,java.lang.Class<T>>

initDeploymentType

protected void initDeploymentType()
Description copied from class: AbstractBean
Initializes the deployment types

Specified by:
initDeploymentType in class AbstractBean<T,java.lang.Class<T>>

checkScopeAllowed

protected void checkScopeAllowed()
Validate that the scope type is allowed by the stereotypes on the bean and the bean type


checkBeanImplementation

protected void checkBeanImplementation()
Validates the bean implementation


preCheckSpecialization

protected void preCheckSpecialization()
Overrides:
preCheckSpecialization in class AbstractBean<T,java.lang.Class<T>>

getAnnotatedItem

protected AnnotatedClass<T> getAnnotatedItem()
Gets the annotated item

Specified by:
getAnnotatedItem in class AbstractBean<T,java.lang.Class<T>>
Returns:
The annotated item

getDefaultName

protected java.lang.String getDefaultName()
Gets the default name

Specified by:
getDefaultName in class AbstractBean<T,java.lang.Class<T>>
Returns:
The default name

getInitializerMethods

public java.util.Set<? extends MethodInjectionPoint<?>> getInitializerMethods()
Gets the annotated methods

Returns:
The set of annotated methods

toString

public java.lang.String toString()
Gets a string representation

Overrides:
toString in class AbstractBean<T,java.lang.Class<T>>
Returns:
The string representation

getDefaultDeploymentType

protected java.lang.Class<? extends java.lang.annotation.Annotation> getDefaultDeploymentType()
Description copied from class: AbstractBean
Gets the default deployment type

Specified by:
getDefaultDeploymentType in class AbstractBean<T,java.lang.Class<T>>
Returns:
The default deployment type

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class AbstractBean<T,java.lang.Class<T>>


Copyright © 2008-2009. All Rights Reserved.