org.jboss.webbeans.bean
Class ProducerMethodBean<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,S>
              extended by org.jboss.webbeans.bean.AbstractProducerBean<T,java.lang.reflect.Method>
                  extended by org.jboss.webbeans.bean.ProducerMethodBean<T>
Type Parameters:
T -
All Implemented Interfaces:
Contextual<T>

public class ProducerMethodBean<T>
extends AbstractProducerBean<T,java.lang.reflect.Method>

Represents a producer method bean

Author:
Pete Muir

Field Summary
 
Fields inherited from class org.jboss.webbeans.bean.AbstractProducerBean
declaringBean
 
Fields inherited from class org.jboss.webbeans.bean.AbstractBean
_serializable, dependentInstancesStore, deploymentType, injectionPoints, manager, name, scopeType, type, types
 
Constructor Summary
protected ProducerMethodBean(AnnotatedMethod<T> method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
           
 
Method Summary
protected  void checkProducerMethod()
          Validates the producer method
protected  AnnotatedMethod<T> getAnnotatedItem()
          Gets the annotated item representing the method
protected  java.lang.String getDefaultName()
          Returns the default name
 AnnotatedMethod<?> getDisposalMethod()
          Returns the disposal method
 AbstractBean<?,?> getSpecializedBean()
           
protected  void init()
          Initializes the bean and its metadata
protected  void initDisposalMethod()
          Initializes the remove method
protected  void initInjectionPoints()
          Initializes the injection points
protected  void initSpecialization()
           
 boolean isSerializable()
           
static
<T> ProducerMethodBean<T>
of(AnnotatedMethod<T> method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
          Creates a producer method Web Bean
static
<T> ProducerMethodBean<T>
of(java.lang.reflect.Method method, AbstractClassBean<?> declaringBean, ManagerImpl manager)
           
protected  void preCheckSpecialization()
           
protected  T produceInstance(CreationalContext<T> creationalContext)
           
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class org.jboss.webbeans.bean.AbstractProducerBean
checkProducerReturnType, checkReturnValue, create, destroy, equals, getDeclaredBeanType, getDeclaringBean, getDefaultDeploymentType, getReceiver, initDeploymentType, initScopeType, initSerializable, initType, initTypes
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
bindDecorators, bindInterceptors, checkDeploymentType, checkInjectionPointsAreSerializable, checkRequiredTypesImplemented, getBindings, getDependentInstancesStore, getDeploymentType, getDeploymentType, getInjectionPoints, getMergedStereotypes, getName, getScopeType, getType, getTypes, hashCode, initBindingTypes, initDefaultBindings, initDeploymentTypeFromStereotype, initName, initPrimitive, initProxyable, initScopeTypeFromStereotype, isAssignableFrom, isDependent, isNullable, isPrimitive, isProxyable, 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
 

Constructor Detail

ProducerMethodBean

protected ProducerMethodBean(AnnotatedMethod<T> method,
                             AbstractClassBean<?> declaringBean,
                             ManagerImpl manager)
Method Detail

of

public static <T> ProducerMethodBean<T> of(AnnotatedMethod<T> method,
                                           AbstractClassBean<?> declaringBean,
                                           ManagerImpl manager)
Creates a producer method Web Bean

Parameters:
method - The underlying method abstraction
declaringBean - The declaring bean abstraction
manager - the current manager
Returns:
A producer Web Bean

of

public static <T> ProducerMethodBean<T> of(java.lang.reflect.Method method,
                                           AbstractClassBean<?> declaringBean,
                                           ManagerImpl manager)

produceInstance

protected T produceInstance(CreationalContext<T> creationalContext)
Specified by:
produceInstance in class AbstractProducerBean<T,java.lang.reflect.Method>

init

protected void init()
Initializes the bean and its metadata

Overrides:
init in class AbstractProducerBean<T,java.lang.reflect.Method>

initInjectionPoints

protected void initInjectionPoints()
Initializes the injection points


checkProducerMethod

protected void checkProducerMethod()
Validates the producer method


initDisposalMethod

protected void initDisposalMethod()
Initializes the remove method


getAnnotatedItem

protected AnnotatedMethod<T> getAnnotatedItem()
Gets the annotated item representing the method

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

getDefaultName

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

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

getDisposalMethod

public AnnotatedMethod<?> getDisposalMethod()
Returns the disposal method

Returns:
The method representation

toString

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

Overrides:
toString in class AbstractProducerBean<T,java.lang.reflect.Method>
Returns:
The string representation

isSerializable

public boolean isSerializable()
Overrides:
isSerializable in class AbstractBean<T,java.lang.reflect.Method>

getSpecializedBean

public AbstractBean<?,?> getSpecializedBean()
Specified by:
getSpecializedBean in class AbstractBean<T,java.lang.reflect.Method>

preCheckSpecialization

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

initSpecialization

protected void initSpecialization()
Overrides:
initSpecialization in class AbstractBean<T,java.lang.reflect.Method>


Copyright © 2008-2009. All Rights Reserved.