org.jboss.webbeans.bean.ee
Class AbstractJavaEEResourceBean<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.ee.AbstractJavaEEResourceBean<T>
All Implemented Interfaces:
Contextual<T>
Direct Known Subclasses:
AbstractResourceBean, PersistenceContextBean, PersistenceUnitBean

public abstract class AbstractJavaEEResourceBean<T>
extends RIBean<T>

Representation of a Java EE Resource bean

Author:
Pete Muir

Constructor Summary
protected AbstractJavaEEResourceBean(ManagerImpl manager, java.lang.Class<? extends java.lang.annotation.Annotation> deploymentType, java.util.Set<java.lang.annotation.Annotation> bindings, java.lang.Class<T> type)
           
protected AbstractJavaEEResourceBean(ManagerImpl manager, java.lang.Class<? extends java.lang.annotation.Annotation> deploymentType, java.util.Set<java.lang.annotation.Annotation> bindings, java.lang.Class<T> type, java.lang.reflect.Type... types)
           
 
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
 java.util.Set<java.lang.annotation.Annotation> getBindings()
          The bindings of a bean
 java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
          The deployment type of a bean
 java.util.Set<AnnotatedInjectionPoint<?,?>> getInjectionPoints()
          The injection points of a bean
 java.lang.String getName()
          The name of a bean
protected  java.lang.Class<T> getProxyClass()
           
 java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
          The scope of a bean
 RIBean<?> getSpecializedBean()
           
 java.lang.Class<T> getType()
           
 java.util.Set<? extends java.lang.reflect.Type> getTypes()
          The client-visible types of a bean
 void initialize(BeanDeployerEnvironment environment)
           
 boolean isDependent()
           
 boolean isNullable()
          The nullability of a bean
 boolean isPrimitive()
           
 boolean isProxyable()
           
 boolean isSerializable()
          The serializability of a bean
 boolean isSpecializing()
           
protected abstract  javassist.util.proxy.MethodHandler newMethodHandler()
           
 
Methods inherited from class org.jboss.webbeans.bean.RIBean
createId, equals, getId, getManager, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJavaEEResourceBean

protected AbstractJavaEEResourceBean(ManagerImpl manager,
                                     java.lang.Class<? extends java.lang.annotation.Annotation> deploymentType,
                                     java.util.Set<java.lang.annotation.Annotation> bindings,
                                     java.lang.Class<T> type)
Parameters:
manager - the manager used to create this bean
deploymentType - the deployment type of the bean
bindings - the bindings of bean
type - the concrete type of the bean

AbstractJavaEEResourceBean

protected AbstractJavaEEResourceBean(ManagerImpl manager,
                                     java.lang.Class<? extends java.lang.annotation.Annotation> deploymentType,
                                     java.util.Set<java.lang.annotation.Annotation> bindings,
                                     java.lang.Class<T> type,
                                     java.lang.reflect.Type... types)
Parameters:
manager - the manager used to create this bean
deploymentType - the deployment type of the bean
bindings - the bindings of bean
type - the concrete type of the bean
Method Detail

getBindings

public java.util.Set<java.lang.annotation.Annotation> getBindings()
Description copied from class: Bean
The bindings of a bean

Specified by:
getBindings in class Bean<T>
Returns:
the bindings

getScopeType

public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
Description copied from class: Bean
The scope of a bean

Specified by:
getScopeType in class Bean<T>
Returns:
the scope

getName

public java.lang.String getName()
Description copied from class: Bean
The name of a bean

Specified by:
getName in class Bean<T>
Returns:
the name

getDeploymentType

public java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
Description copied from class: Bean
The deployment type of a bean

Specified by:
getDeploymentType in class Bean<T>
Returns:
the deployment type

getType

public java.lang.Class<T> getType()
Specified by:
getType in class RIBean<T>

getTypes

public java.util.Set<? extends java.lang.reflect.Type> getTypes()
Description copied from class: Bean
The client-visible types of a bean

Specified by:
getTypes in class Bean<T>
Returns:
the bean types

isSpecializing

public boolean isSpecializing()
Specified by:
isSpecializing in class RIBean<T>

getSpecializedBean

public RIBean<?> getSpecializedBean()
Specified by:
getSpecializedBean in class RIBean<T>

isDependent

public boolean isDependent()
Overrides:
isDependent in class RIBean<T>

getInjectionPoints

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

Specified by:
getInjectionPoints in class RIBean<T>
Returns:
the injection points of a bean

isNullable

public boolean isNullable()
Description copied from class: Bean
The nullability of a bean

Specified by:
isNullable in class Bean<T>
Returns:
true if the bean is nullable

isPrimitive

public boolean isPrimitive()
Specified by:
isPrimitive in class RIBean<T>

isSerializable

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

Specified by:
isSerializable in class Bean<T>
Returns:
true if the bean is serializable

isProxyable

public boolean isProxyable()
Specified by:
isProxyable in class RIBean<T>

getProxyClass

protected java.lang.Class<T> getProxyClass()

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

newMethodHandler

protected abstract javassist.util.proxy.MethodHandler newMethodHandler()

initialize

public void initialize(BeanDeployerEnvironment environment)
Specified by:
initialize in class RIBean<T>

destroy

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

Parameters:
instance - the insance to destroy


Copyright © 2011. All Rights Reserved.