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

java.lang.Object
  extended by javax.webbeans.manager.Bean<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
apiTypes, deploymentType, injectionPoints, manager, name, scopeType, type
 
Constructor Summary
AbstractClassBean(java.lang.Class<T> type, ManagerImpl manager)
          Constructor
 
Method Summary
protected  void checkBeanImplementation()
          Validates the bean implementation
protected  void checkRequiredTypesImplemented()
          Validates that the required types are implemented
protected  void checkScopeAllowed()
          Validate that the scope type is allowed by the stereotypes on the bean and the bean type
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<AnnotatedMethod<java.lang.Object>> getInitializerMethods()
          Gets the annotated methods
 java.util.Set<AnnotatedField<java.lang.Object>> getInjectableFields()
          Gets the injectable fields
 java.util.Set<AnnotatedMethod<java.lang.Object>> getObserverMethods()
          Gets the observer methods
 java.util.Set<AnnotatedField<java.lang.Object>> getProducerFields()
          Gets the producer fields
 java.util.Set<AnnotatedMethod<java.lang.Object>> getProducerMethods()
          Gets the producer methods
protected  void init()
          Initializes the bean and its metadata
protected  void initInitializerMethods()
          Initializes the initializer methods
protected  void initInjectionPoints()
          Initializes the injection points
protected  void initType()
          Initializes the bean type
 java.lang.String toDetailedString()
           
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
bindDecorators, bindInterceptors, checkDeploymentType, getBindingTypes, getDeclaredBeanType, getDeploymentType, getDeploymentType, getInjectionPoints, getMergedStereotypes, getName, getScopeType, getSpecializedType, getType, getTypes, initApiTypes, initBindingTypes, initDeploymentType, initName, initPrimitive, initScopeType, isAssignableFrom, isNullable, isPrimitive, isSerializable
 
Methods inherited from class javax.webbeans.manager.Bean
create, destroy, getManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

annotatedItem

protected AnnotatedClass<T> annotatedItem
Constructor Detail

AbstractClassBean

public AbstractClassBean(java.lang.Class<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>>

initType

protected void initType()
Initializes the bean type

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

getProducerMethods

public java.util.Set<AnnotatedMethod<java.lang.Object>> getProducerMethods()
Gets the producer methods

Returns:
A set of producer methods. An empty set is returned if there are none present

getProducerFields

public java.util.Set<AnnotatedField<java.lang.Object>> getProducerFields()
Gets the producer fields

Returns:
A set of producer fields. An empty set is returned if there are none present

getObserverMethods

public java.util.Set<AnnotatedMethod<java.lang.Object>> getObserverMethods()
Gets the observer methods

Returns:
A set of observer methods. An empty set is returned if there are no matches.

initInjectionPoints

protected void initInjectionPoints()
Initializes the injection points

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

initInitializerMethods

protected void initInitializerMethods()
Initializes the initializer methods


checkRequiredTypesImplemented

protected void checkRequiredTypesImplemented()
Validates that the required types are implemented


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


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

getInjectableFields

public java.util.Set<AnnotatedField<java.lang.Object>> getInjectableFields()
Gets the injectable fields

Returns:
The set of injectable fields

getInitializerMethods

public java.util.Set<AnnotatedMethod<java.lang.Object>> 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

toDetailedString

public java.lang.String toDetailedString()
Overrides:
toDetailedString in class AbstractBean<T,java.lang.Class<T>>

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


Copyright © 2008. All Rights Reserved.