org.apache.webbeans.config
Class DefinitionUtil

java.lang.Object
  extended by org.apache.webbeans.config.DefinitionUtil

public final class DefinitionUtil
extends Object

Defines the web beans components common properties.


Constructor Summary
DefinitionUtil(WebBeansContext webBeansContext)
           
 
Method Summary
<T> void
addConstructorInjectionPointMetaData(AbstractOwbBean<T> owner, Constructor<T> constructor)
           
<T> void
addFieldInjectionPointMetaData(AbstractOwbBean<T> owner, Field field)
           
 void addImplicitComponentForInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
           
<T> void
addMethodInjectionPointMetaData(AbstractOwbBean<T> owner, Method method)
           
<X> ProducerMethodBean<X>
createProducerBeanFromAnnotatedType(Class<X> returnType, javax.enterprise.inject.spi.AnnotatedMethod<X> method, InjectionTargetBean<?> parent, boolean isSpecializes)
           
<T> ProducerMethodBean<T>
createProducerComponent(Class<T> returnType, Method method, InjectionTargetBean<?> parent, boolean isSpecializes)
           
static
<T> void
defineApiTypes(AbstractOwbBean<T> bean, Class<T> clazz)
          Configures the web bean api types.
 void defineBeanInterceptorStack(AbstractInjectionTargetBean<?> bean)
          Configure bean instance interceptor stack.
 void defineDecoratorStack(AbstractInjectionTargetBean<?> bean)
          Defines decorator stack of given bean.
static void defineDefaultScopeType(OwbBean<?> component, String exceptionMessage, boolean allowLazyInit)
           
<T> void
defineDisposalMethods(AbstractOwbBean<T> component)
           
<T> void
defineDisposalMethods(AbstractOwbBean<T> component, Class<?> clazz)
           
<T> void
defineInjectedFields(AbstractInjectionTargetBean<T> component)
           
<T> void
defineInjectedMethods(AbstractInjectionTargetBean<T> bean)
           
<T> void
defineInternalInjectedFields(AbstractInjectionTargetBean<T> component, Class<T> clazz, boolean fromSuperClazz)
           
<T> void
defineInternalInjectedFieldsRecursively(AbstractInjectionTargetBean<T> component, Class<T> clazz)
           
<T> void
defineInternalInjectedMethodsRecursively(AbstractInjectionTargetBean<T> component, Class<T> clazz)
           
<T> void
defineName(AbstractOwbBean<T> component, Annotation[] anns, String defaultName)
          Configure web beans component name.
<T> Set<javax.enterprise.inject.spi.ObserverMethod<?>>
defineObserverMethods(InjectionTargetBean<T> component, Class<T> clazz)
           
 Set<ProducerFieldBean<?>> defineProducerFields(InjectionTargetBean<?> component)
          Defines the set of ProducerFieldBean components.
 Set<ProducerFieldBean<?>> defineProducerFields(InjectionTargetBean<?> component, Class<?> returnType)
           
static
<T> void
defineProducerMethodApiTypes(AbstractProducerBean<T> producerBean, Type type, Annotation[] annots)
          Configures the producer method web bean api types.
 Set<ProducerMethodBean<?>> defineProducerMethods(AbstractInjectionTargetBean<?> component)
          Defines the Bean producer methods.
 Set<ProducerMethodBean<?>> defineProducerMethods(AbstractInjectionTargetBean<?> component, Class<?> clazz)
           
<X> Set<ProducerMethodBean<?>>
defineProducerMethods(InjectionTargetBean<X> bean, javax.enterprise.inject.spi.AnnotatedType<X> annotatedType)
           
<T> void
defineQualifiers(AbstractOwbBean<T> component, Annotation[] annotations)
          Configure web beans component qualifier.
static
<T> void
defineScopeType(AbstractOwbBean<T> component, Annotation[] annotations, String exceptionMessage, boolean allowLazyInit)
          Configure web beans component scope type.
<T> void
defineSerializable(AbstractOwbBean<T> component)
           
static
<T> void
defineStereoTypes(OwbBean<?> component, Annotation[] anns)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionUtil

public DefinitionUtil(WebBeansContext webBeansContext)
Method Detail

defineApiTypes

public static <T> void defineApiTypes(AbstractOwbBean<T> bean,
                                      Class<T> clazz)
Configures the web bean api types.

Type Parameters:
T - generic class type
Parameters:
bean - configuring web beans component
clazz - bean implementation class

defineProducerMethodApiTypes

public static <T> void defineProducerMethodApiTypes(AbstractProducerBean<T> producerBean,
                                                    Type type,
                                                    Annotation[] annots)
Configures the producer method web bean api types.

Type Parameters:
T - generic class type
Parameters:
producerBean - configuring web beans component
type - bean implementation class

defineQualifiers

public <T> void defineQualifiers(AbstractOwbBean<T> component,
                                 Annotation[] annotations)
Configure web beans component qualifier.

Parameters:
component - configuring web beans component
annotations - annotations

defineScopeType

public static <T> void defineScopeType(AbstractOwbBean<T> component,
                                       Annotation[] annotations,
                                       String exceptionMessage,
                                       boolean allowLazyInit)
Configure web beans component scope type.

Type Parameters:
T - generic class type
Parameters:
component - configuring web beans component
annotations - annotations

defineStereoTypes

public static <T> void defineStereoTypes(OwbBean<?> component,
                                         Annotation[] anns)

defineDefaultScopeType

public static void defineDefaultScopeType(OwbBean<?> component,
                                          String exceptionMessage,
                                          boolean allowLazyInit)

defineName

public <T> void defineName(AbstractOwbBean<T> component,
                           Annotation[] anns,
                           String defaultName)
Configure web beans component name.

Parameters:
component - configuring web beans component
defaultName - default name of the web bean

defineProducerFields

public Set<ProducerFieldBean<?>> defineProducerFields(InjectionTargetBean<?> component)
Defines the set of ProducerFieldBean components.

Parameters:
component - producer field owner component
Returns:
the set of producer field components

defineProducerFields

public Set<ProducerFieldBean<?>> defineProducerFields(InjectionTargetBean<?> component,
                                                      Class<?> returnType)

defineProducerMethods

public Set<ProducerMethodBean<?>> defineProducerMethods(AbstractInjectionTargetBean<?> component)
Defines the Bean producer methods. Moreover, it configures the producer methods with using the Produces annotations.

Parameters:
component -
Returns:
the set of producer components
Throws:
WebBeansConfigurationException - if any exception occurs

defineProducerMethods

public Set<ProducerMethodBean<?>> defineProducerMethods(AbstractInjectionTargetBean<?> component,
                                                        Class<?> clazz)

createProducerComponent

public <T> ProducerMethodBean<T> createProducerComponent(Class<T> returnType,
                                                         Method method,
                                                         InjectionTargetBean<?> parent,
                                                         boolean isSpecializes)

defineDisposalMethods

public <T> void defineDisposalMethods(AbstractOwbBean<T> component)

defineDisposalMethods

public <T> void defineDisposalMethods(AbstractOwbBean<T> component,
                                      Class<?> clazz)

defineInjectedFields

public <T> void defineInjectedFields(AbstractInjectionTargetBean<T> component)

defineInternalInjectedFieldsRecursively

public <T> void defineInternalInjectedFieldsRecursively(AbstractInjectionTargetBean<T> component,
                                                        Class<T> clazz)

defineInternalInjectedFields

public <T> void defineInternalInjectedFields(AbstractInjectionTargetBean<T> component,
                                             Class<T> clazz,
                                             boolean fromSuperClazz)

defineInjectedMethods

public <T> void defineInjectedMethods(AbstractInjectionTargetBean<T> bean)

defineInternalInjectedMethodsRecursively

public <T> void defineInternalInjectedMethodsRecursively(AbstractInjectionTargetBean<T> component,
                                                         Class<T> clazz)

defineBeanInterceptorStack

public void defineBeanInterceptorStack(AbstractInjectionTargetBean<?> bean)
Configure bean instance interceptor stack.

Parameters:
bean - bean instance

defineDecoratorStack

public void defineDecoratorStack(AbstractInjectionTargetBean<?> bean)
Defines decorator stack of given bean.

Parameters:
bean - injection target bean

defineObserverMethods

public <T> Set<javax.enterprise.inject.spi.ObserverMethod<?>> defineObserverMethods(InjectionTargetBean<T> component,
                                                                                    Class<T> clazz)

defineSerializable

public <T> void defineSerializable(AbstractOwbBean<T> component)

addFieldInjectionPointMetaData

public <T> void addFieldInjectionPointMetaData(AbstractOwbBean<T> owner,
                                               Field field)

addMethodInjectionPointMetaData

public <T> void addMethodInjectionPointMetaData(AbstractOwbBean<T> owner,
                                                Method method)

addConstructorInjectionPointMetaData

public <T> void addConstructorInjectionPointMetaData(AbstractOwbBean<T> owner,
                                                     Constructor<T> constructor)

addImplicitComponentForInjectionPoint

public void addImplicitComponentForInjectionPoint(javax.enterprise.inject.spi.InjectionPoint injectionPoint)

defineProducerMethods

public <X> Set<ProducerMethodBean<?>> defineProducerMethods(InjectionTargetBean<X> bean,
                                                            javax.enterprise.inject.spi.AnnotatedType<X> annotatedType)

createProducerBeanFromAnnotatedType

public <X> ProducerMethodBean<X> createProducerBeanFromAnnotatedType(Class<X> returnType,
                                                                     javax.enterprise.inject.spi.AnnotatedMethod<X> method,
                                                                     InjectionTargetBean<?> parent,
                                                                     boolean isSpecializes)


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