org.apache.webbeans.component
Class NewBean<T>
java.lang.Object
org.apache.webbeans.component.AbstractOwbBean<T>
org.apache.webbeans.component.AbstractInjectionTargetBean<T>
org.apache.webbeans.component.ManagedBean<T>
org.apache.webbeans.component.NewBean<T>
- All Implemented Interfaces:
- Contextual<T>, Bean<T>, InjectionTargetBean<T>, InterceptedMarker, OwbBean<T>
public class NewBean<T>
- extends ManagedBean<T>
Component definition with New binding annotation.
It is defined as concrete java class component.
| 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 |
| 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, 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, isEnabled, isNullable, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toString |
| Methods inherited from interface org.apache.webbeans.component.OwbBean |
addApiType, addInjectionPoint, addQualifier, addStereoType, createNewInstance, destroyCreatedInstance, getId, getImplQualifiers, getImplScopeType, getInjectionPoint, getOwbStereotypes, getReturnType, getWebBeansType, isEnabled, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean |
NewBean
public NewBean(Class<T> returnType,
WebBeansType definedType)
createInstance
protected T createInstance(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,
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 destroyedcreationalContext - 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-2010 The Apache Software Foundation. All Rights Reserved.