org.apache.webbeans.component
Class ManagedBean<T>

java.lang.Object
  extended by org.apache.webbeans.component.AbstractOwbBean<T>
      extended by org.apache.webbeans.component.AbstractInjectionTargetBean<T>
          extended by org.apache.webbeans.component.ManagedBean<T>
All Implemented Interfaces:
Contextual<T>, Bean<T>, InjectionTargetBean<T>, InterceptedMarker, OwbBean<T>
Direct Known Subclasses:
NewBean, XMLManagedBean

public class ManagedBean<T>
extends AbstractInjectionTargetBean<T>
implements InterceptedMarker

Managed bean implementation of the Bean.

Version:
$Rev: 996645 $ $Date: 2010-09-13 21:06:00 +0200 (Mo, 13 Sep 2010) $

Field Summary
 
Fields inherited from class org.apache.webbeans.component.AbstractInjectionTargetBean
decorators, inheritedMetaData, interceptorStack
 
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
apiTypes, enabled, implQualifiers, implScopeType, injectionPoints, logger, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansType
 
Constructor Summary
ManagedBean(Class<T> returnType)
           
ManagedBean(Class<T> returnType, WebBeansType type)
          Creates a new instance.
 
Method Summary
protected  T createComponentInstance(CreationalContext<T> creationalContext)
          Sub-classes must override this method to create bean instance.
 Constructor<T> getConstructor()
          Get constructor.
 boolean isPassivationCapable()
          True if passivation capable false otherwise.
 void setConstructor(Constructor<T> constructor)
          Set constructor.
 void setIsAbstractDecorator(boolean flag)
           
 
Methods inherited from class org.apache.webbeans.component.AbstractInjectionTargetBean
addInjectedField, addInjectedFieldToSuper, addInjectedMethod, addInjectedMethodToSuper, addObservableMethod, afterConstructor, beforeConstructor, createDefaultInstance, createInstance, destroyComponentInstance, destroyInstance, getAnnotatedType, getDecoratorStack, getInheritedMetaData, getInjectedFields, getInjectedFromSuperFields, getInjectedFromSuperMethods, getInjectedMethods, getInjectionPoints, getInterceptorStack, getLogger, getObservableMethods, injectFields, injectMethods, injectResources, injectSuperFields, injectSuperMethods, postConstruct, postConstructDefault, preDestroy, preDestroyDefault, setAnnotatedType, setInheritedMetaData, validatePassivationDependencies
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, create, createNewInstance, destroy, destroyCreatedInstance, getBeanClass, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansType, isAlternative, isDependent, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.webbeans.component.OwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, createNewInstance, destroyCreatedInstance, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getOwbStereotypes, getReturnType, getWebBeansType, isDependent, isEnabled, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean
 
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative, isNullable
 
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
 

Constructor Detail

ManagedBean

public ManagedBean(Class<T> returnType)

ManagedBean

public ManagedBean(Class<T> returnType,
                   WebBeansType type)
Creates a new instance.

Parameters:
returnType - bean class
type - webbeans type
Method Detail

createComponentInstance

protected T createComponentInstance(CreationalContext<T> creationalContext)
Sub-classes must override this method to create bean instance.

Overrides:
createComponentInstance in class AbstractInjectionTargetBean<T>
Parameters:
creationalContext - creational context
Returns:
bean instance

getConstructor

public Constructor<T> getConstructor()
Get constructor.

Returns:
constructor

setConstructor

public void setConstructor(Constructor<T> constructor)
Set constructor.

Parameters:
constructor - constructor instance

isPassivationCapable

public boolean isPassivationCapable()
Description copied from interface: OwbBean
True if passivation capable false otherwise.

Specified by:
isPassivationCapable in interface OwbBean<T>
Overrides:
isPassivationCapable in class AbstractOwbBean<T>
Returns:
true if this bean is passivation capable

setIsAbstractDecorator

public void setIsAbstractDecorator(boolean flag)


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.