org.apache.webbeans.component
Class NewManagedBean<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>
              extended by org.apache.webbeans.component.NewManagedBean<T>
All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, InjectionTargetBean<T>, InterceptedMarker, NewBean<T>, OwbBean<T>

public class NewManagedBean<T>
extends ManagedBean<T>
implements NewBean<T>

Component definition with New binding annotation.

It is defined as concrete java class component.


Field Summary
 
Fields inherited from class org.apache.webbeans.component.ManagedBean
isAbstractDecorator
 
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, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansType
 
Constructor Summary
NewManagedBean(Class<T> returnType, WebBeansType definedType, WebBeansContext webBeansContext)
           
 
Method Summary
protected  T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Creates the instance of the bean that has a specific implementation type.
protected  void destroyInstance(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Destroy the instance of the bean.
 WebBeansType getDefinedType()
           
 boolean isDependent()
          always true for New qualifier
 
Methods inherited from class org.apache.webbeans.component.ManagedBean
addQualifier, createComponentInstance, getConstructor, isFullInit, isPassivationCapable, setConstructor, setFullInit, setIsAbstractDecorator
 
Methods inherited from class org.apache.webbeans.component.AbstractInjectionTargetBean
addInjectedField, addInjectedFieldToSuper, addInjectedMethod, addInjectedMethodToSuper, addObservableMethod, afterConstructor, beforeConstructor, createDefaultInstance, destroyComponentInstance, getAnnotatedType, getDecoratorStack, getInheritedMetaData, getInjectedFields, getInjectedFromSuperFields, getInjectedFromSuperMethods, getInjectedMethods, getInjectionPoints, getInterceptorStack, getObservableMethods, injectFields, injectMethods, injectResources, injectSuperFields, injectSuperMethods, postConstruct, postConstructDefault, preDestroy, preDestroyDefault, setAnnotatedType, setInheritedMetaData, validatePassivationDependencies
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addStereoType, create, createNewInstance, destroy, destroyCreatedInstance, equals, getBeanClass, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getLogger, getManager, getName, getOwbStereotypes, getQualifiers, getReturnType, getScope, getStereotypes, getTypes, getWebBeansContext, getWebBeansType, hashCode, isAlternative, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.webbeans.component.OwbBean
addApiType, addInjectionPoint, addStereoType, createNewInstance, destroyCreatedInstance, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getOwbStereotypes, getReturnType, getWebBeansContext, getWebBeansType, 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

NewManagedBean

public NewManagedBean(Class<T> returnType,
                      WebBeansType definedType,
                      WebBeansContext webBeansContext)
Method Detail

createInstance

protected T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Description copied from class: AbstractInjectionTargetBean
Creates the instance of the bean that has a specific implementation type. Each subclass must define its own create mechanism.

Overrides:
createInstance in class AbstractInjectionTargetBean<T>
Parameters:
creationalContext - the contextual instance shall be created in
Returns:
instance of the bean

destroyInstance

protected void destroyInstance(T instance,
                               javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Description copied from class: AbstractInjectionTargetBean
Destroy the instance of the bean. Each subclass must define its own destroy mechanism.

Overrides:
destroyInstance in class AbstractInjectionTargetBean<T>
Parameters:
instance - instance of the bean that is being destroyed
creationalContext - the contextual instance has been created in

getDefinedType

public WebBeansType getDefinedType()
Returns:
the definedType

isDependent

public boolean isDependent()
always true for New qualifier

Specified by:
isDependent in interface OwbBean<T>
Overrides:
isDependent in class AbstractOwbBean<T>
Returns:
true if this is a dependent bean


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