org.jboss.webbeans.bean
Class DisposalMethodBean<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.reflect.Method>
              extended by org.jboss.webbeans.bean.DisposalMethodBean<T>
All Implemented Interfaces:
Contextual<T>

public class DisposalMethodBean<T>
extends AbstractBean<T,java.lang.reflect.Method>


Field Summary
protected  AbstractClassBean<?> declaringBean
           
protected  java.util.Set<AnnotatedInjectionPoint<?,?>> disposalInjectionPoints
           
protected  MethodInjectionPoint<T> disposalMethodInjectionPoint
           
 
Fields inherited from class org.jboss.webbeans.bean.AbstractBean
_serializable, bindings, dependentInstancesStore, deploymentType, injectionPoints, manager, name, scopeType, type, types
 
Constructor Summary
protected DisposalMethodBean(ManagerImpl manager, AnnotatedMethod<T> disposalMethod, AbstractClassBean<?> declaringBean)
           
 
Method Summary
 T create(CreationalContext<T> creationalContext)
          Create a new instance of the contextual type
 void destroy(T instance)
          Destroys an instance of the contexual type
 AnnotatedMethod<T> getAnnotatedItem()
          Returns the annotated time the bean represents
 java.util.Set<java.lang.annotation.Annotation> getBindings()
          Gets the binding types
protected  java.lang.Class<? extends java.lang.annotation.Annotation> getDefaultDeploymentType()
          Gets the default deployment type
protected  java.lang.String getDefaultName()
          Gets the default name of the bean
 java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
          Gets the deployment type of the bean
 java.lang.String getId()
           
 java.util.Set<AnnotatedInjectionPoint<?,?>> getInjectionPoints()
          The injection points of a bean
 java.lang.String getName()
          Gets the name of the bean
 java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
          Gets the scope type of the bean
 AbstractBean<?,?> getSpecializedBean()
           
 java.lang.Class<T> getType()
          Gets the type of the bean
 java.util.Set<? extends java.lang.reflect.Type> getTypes()
          Gets the API types of the bean
protected  void initDeploymentType()
          Initializes the deployment types
protected  void initScopeType()
          Initializes the scope type
protected  void initType()
           
protected  void initTypes()
          Initializes the API types
 void invokeDisposeMethod(java.lang.Object instance)
           
 boolean isNullable()
          Indicates if bean is nullable
 boolean isSerializable()
          The serializability of a bean
static
<T> DisposalMethodBean<T>
of(ManagerImpl manager, AnnotatedMethod<T> disposalMethod, AbstractClassBean<?> declaringBean)
           
protected  void preSpecialize(BeanDeployerEnvironment environment)
           
protected  void specialize(BeanDeployerEnvironment environment)
           
 java.lang.String toString()
          Gets a string representation
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
checkDeploymentType, checkRequiredTypesImplemented, getDeploymentType, getMergedStereotypes, initBindings, initDefaultBindings, initDeploymentTypeFromStereotype, initialize, initName, initPrimitive, initProxyable, initScopeTypeFromStereotype, initSerializable, isAssignableFrom, isDependent, isInitialized, isPrimitive, isProxyable, isSpecializing, postSpecialize
 
Methods inherited from class org.jboss.webbeans.bean.RIBean
createId, equals, getManager, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

declaringBean

protected AbstractClassBean<?> declaringBean

disposalMethodInjectionPoint

protected MethodInjectionPoint<T> disposalMethodInjectionPoint

disposalInjectionPoints

protected java.util.Set<AnnotatedInjectionPoint<?,?>> disposalInjectionPoints
Constructor Detail

DisposalMethodBean

protected DisposalMethodBean(ManagerImpl manager,
                             AnnotatedMethod<T> disposalMethod,
                             AbstractClassBean<?> declaringBean)
Method Detail

initType

protected void initType()

getAnnotatedItem

public AnnotatedMethod<T> getAnnotatedItem()
Description copied from class: AbstractBean
Returns the annotated time the bean represents

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

of

public static <T> DisposalMethodBean<T> of(ManagerImpl manager,
                                           AnnotatedMethod<T> disposalMethod,
                                           AbstractClassBean<?> declaringBean)

getBindings

public java.util.Set<java.lang.annotation.Annotation> getBindings()
Description copied from class: AbstractBean
Gets the binding types

Overrides:
getBindings in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The set of binding types
See Also:
Bean.getBindings()

getDeploymentType

public java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
Description copied from class: AbstractBean
Gets the deployment type of the bean

Overrides:
getDeploymentType in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The deployment type
See Also:
Bean.getDeploymentType()

initTypes

protected void initTypes()
Initializes the API types

Overrides:
initTypes in class AbstractBean<T,java.lang.reflect.Method>

getInjectionPoints

public java.util.Set<AnnotatedInjectionPoint<?,?>> getInjectionPoints()
Description copied from class: Bean
The injection points of a bean

Overrides:
getInjectionPoints in class AbstractBean<T,java.lang.reflect.Method>
Returns:
the injection points of a bean

getName

public java.lang.String getName()
Description copied from class: AbstractBean
Gets the name of the bean

Overrides:
getName in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The name
See Also:
Bean.getName()

getScopeType

public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
Description copied from class: AbstractBean
Gets the scope type of the bean

Overrides:
getScopeType in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The scope type
See Also:
Bean.getScopeType()

getTypes

public java.util.Set<? extends java.lang.reflect.Type> getTypes()
Description copied from class: AbstractBean
Gets the API types of the bean

Overrides:
getTypes in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The set of API types
See Also:
Bean.getTypes()

toString

public java.lang.String toString()
Description copied from class: AbstractBean
Gets a string representation

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

isNullable

public boolean isNullable()
Description copied from class: AbstractBean
Indicates if bean is nullable

Overrides:
isNullable in class AbstractBean<T,java.lang.reflect.Method>
Returns:
True if nullable, false otherwise
See Also:
Bean.isNullable()

isSerializable

public boolean isSerializable()
Description copied from class: Bean
The serializability of a bean

Overrides:
isSerializable in class AbstractBean<T,java.lang.reflect.Method>
Returns:
true if the bean is serializable

create

public T create(CreationalContext<T> creationalContext)
Description copied from interface: Contextual
Create a new instance of the contextual type

Parameters:
creationalContext - the creational context in which incompletely initialized contexts may be placed
Returns:
the contextual instance

invokeDisposeMethod

public void invokeDisposeMethod(java.lang.Object instance)

preSpecialize

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

specialize

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

getType

public java.lang.Class<T> getType()
Description copied from class: AbstractBean
Gets the type of the bean

Overrides:
getType in class AbstractBean<T,java.lang.reflect.Method>
Returns:
The type

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.reflect.Method>
Returns:
The default deployment type

getDefaultName

protected java.lang.String getDefaultName()
Description copied from class: AbstractBean
Gets the default name of the bean

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

initDeploymentType

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

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

initScopeType

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

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

getSpecializedBean

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

destroy

public void destroy(T instance)
Description copied from interface: Contextual
Destroys an instance of the contexual type

Parameters:
instance - the insance to destroy

getId

public java.lang.String getId()
Specified by:
getId in class RIBean<T>


Copyright © 2011. All Rights Reserved.