org.jboss.webbeans.bean
Class AbstractProducerBean<T,S>

java.lang.Object
  extended by javax.webbeans.manager.Bean<T>
      extended by org.jboss.webbeans.bean.AbstractBean<T,S>
          extended by org.jboss.webbeans.bean.AbstractProducerBean<T,S>
Type Parameters:
T -
S -
All Implemented Interfaces:
Contextual<T>
Direct Known Subclasses:
ProducerFieldBean, ProducerMethodBean

public abstract class AbstractProducerBean<T,S>
extends AbstractBean<T,S>

The implicit producer bean

Author:
Gavin King

Field Summary
protected  AbstractClassBean<?> declaringBean
           
 
Fields inherited from class org.jboss.webbeans.bean.AbstractBean
apiTypes, deploymentType, injectionPoints, manager, name, scopeType, type
 
Constructor Summary
AbstractProducerBean(AbstractClassBean<?> declaringBean, ManagerImpl manager)
          Constructor
 
Method Summary
protected  void checkProducerReturnType()
          Validates the producer method
protected  void checkReturnValue(T instance)
          Validates the return value
 AbstractClassBean<?> getDeclaringBean()
          Returns the declaring bean
protected  java.lang.Class<? extends java.lang.annotation.Annotation> getDefaultDeploymentType()
          Gets the deployment types
protected  java.lang.Object getReceiver()
          Gets the receiver of the product
protected  void init()
          Initializes the bean and its metadata
protected  void initApiTypes()
          Initializes the API types
protected  void initType()
          Initializes the type
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
bindDecorators, bindInterceptors, checkDeploymentType, getAnnotatedItem, getBindingTypes, getDeclaredBeanType, getDefaultName, getDeploymentType, getDeploymentType, getInjectionPoints, getMergedStereotypes, getName, getScopeType, getSpecializedType, getType, getTypes, initBindingTypes, initDeploymentType, initInjectionPoints, initName, initPrimitive, initScopeType, isAssignableFrom, isNullable, isPrimitive, isSerializable, toDetailedString
 
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

declaringBean

protected AbstractClassBean<?> declaringBean
Constructor Detail

AbstractProducerBean

public AbstractProducerBean(AbstractClassBean<?> declaringBean,
                            ManagerImpl manager)
Constructor

Parameters:
declaringBean - The declaring bean
manager - The Web Beans manager
Method Detail

getDefaultDeploymentType

protected java.lang.Class<? extends java.lang.annotation.Annotation> getDefaultDeploymentType()
Gets the deployment types

Specified by:
getDefaultDeploymentType in class AbstractBean<T,S>
Returns:
The deployment types of the declaring bean

initApiTypes

protected void initApiTypes()
Initializes the API types

Overrides:
initApiTypes in class AbstractBean<T,S>

initType

protected void initType()
Initializes the type

Specified by:
initType in class AbstractBean<T,S>

getDeclaringBean

public AbstractClassBean<?> getDeclaringBean()
Returns the declaring bean

Returns:
The bean representation

checkProducerReturnType

protected void checkProducerReturnType()
Validates the producer method


init

protected void init()
Initializes the bean and its metadata

Overrides:
init in class AbstractBean<T,S>

checkReturnValue

protected void checkReturnValue(T instance)
Validates the return value

Parameters:
instance - The instance to validate

getReceiver

protected java.lang.Object getReceiver()
Gets the receiver of the product

Returns:
The receiver

toString

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

Overrides:
toString in class AbstractBean<T,S>
Returns:
The string representation


Copyright © 2008. All Rights Reserved.