org.apache.webbeans.component.xml
Class XMLManagedBean<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.xml.XMLManagedBean<T>
All Implemented Interfaces:
Contextual<T>, Bean<T>, InjectionTargetBean<T>, InterceptedMarker, OwbBean<T>

public class XMLManagedBean<T>
extends ManagedBean<T>


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, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansType
 
Constructor Summary
XMLManagedBean(Class<T> returnType)
          Creates new XML defined webbeans component.
 
Method Summary
 void addFieldInjectionPoint(Field field, XMLInjectionPointModel model)
          Adds new field injection point
 void addFieldValue(Field name, Object value)
          Add new field value.
 void addMethodInjectionPoint(Method method, XMLInjectionPointModel model)
          Adds new method injection point
protected  T createInstance(CreationalContext<T> creationalContext)
          Creates the instance of the bean that has a specific implementation type.
 Map<Field,Object> getFieldValues()
           
 void injectFields(T instance, CreationalContext<T> creationalContext)
          Injects fields of the bean after constructing.
protected  void injectFieldValues(T instance)
           
 void injectMethods(T instance, CreationalContext<T> creationalContext)
          Injects all Inject methods of the bean instance.
 void setInjectableConstructor(XMLInjectableConstructor<T> constructor)
          Sets injection point for constructor.
 
Methods inherited from class org.apache.webbeans.component.ManagedBean
createComponentInstance, getConstructor, isPassivationCapable, setConstructor, setIsAbstractDecorator
 
Methods inherited from class org.apache.webbeans.component.AbstractInjectionTargetBean
addInjectedField, addInjectedFieldToSuper, addInjectedMethod, addInjectedMethodToSuper, addObservableMethod, afterConstructor, beforeConstructor, createDefaultInstance, destroyComponentInstance, destroyInstance, getAnnotatedType, getDecoratorStack, getInheritedMetaData, getInjectedFields, getInjectedFromSuperFields, getInjectedFromSuperMethods, getInjectedMethods, getInjectionPoints, getInterceptorStack, getLogger, getObservableMethods, 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

XMLManagedBean

public XMLManagedBean(Class<T> returnType)
Creates new XML defined webbeans component.

Parameters:
returnType - type of the webbeans component
Method Detail

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

injectFields

public void injectFields(T instance,
                         CreationalContext<T> creationalContext)
Description copied from class: AbstractInjectionTargetBean
Injects fields of the bean after constructing.

Specified by:
injectFields in interface InjectionTargetBean<T>
Overrides:
injectFields in class AbstractInjectionTargetBean<T>
Parameters:
instance - bean instance
creationalContext - creational context

injectFieldValues

protected void injectFieldValues(T instance)

injectMethods

public void injectMethods(T instance,
                          CreationalContext<T> creationalContext)
Description copied from class: AbstractInjectionTargetBean
Injects all Inject methods of the bean instance.

Specified by:
injectMethods in interface InjectionTargetBean<T>
Overrides:
injectMethods in class AbstractInjectionTargetBean<T>
Parameters:
instance - bean instance
creationalContext - creational context instance

setInjectableConstructor

public void setInjectableConstructor(XMLInjectableConstructor<T> constructor)
Sets injection point for constructor.

Parameters:
constructor - constructor injection point

addFieldInjectionPoint

public void addFieldInjectionPoint(Field field,
                                   XMLInjectionPointModel model)
Adds new field injection point

Parameters:
field - field injection point
model - injection point model

addMethodInjectionPoint

public void addMethodInjectionPoint(Method method,
                                    XMLInjectionPointModel model)
Adds new method injection point

Parameters:
method - method injection point
model - injection point model

addFieldValue

public void addFieldValue(Field name,
                          Object value)
Add new field value.

Parameters:
name - name of the field
value - value of the field

getFieldValues

public Map<Field,Object> getFieldValues()
Returns:
the fieldValues


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