org.apache.webbeans.util
Class WebBeansUtil

java.lang.Object
  extended by org.apache.webbeans.util.WebBeansUtil

public final class WebBeansUtil
extends Object

Contains some utility methods used in the all project.

Version:
$Rev: 1309109 $ $Date: 2012-04-03 21:37:56 +0200 (Di, 03 Apr 2012) $

Constructor Summary
WebBeansUtil(WebBeansContext webBeansContext)
           
 
Method Summary
static
<T> Method
checkAroundInvokeAnnotationCriterias(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, Class<? extends Annotation> annot)
           
static Method checkAroundInvokeAnnotationCriterias(Class<?> clazz, Class<? extends Annotation> annot)
          Check the AroundInvoke annotated method criterias, and return around invoke method.
<T> Method
checkCommonAnnotationCriterias(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, Class<? extends Annotation> commonAnnotation, boolean invocationContext)
           
 Method checkCommonAnnotationCriterias(Class<?> clazz, Class<? extends Annotation> commonAnnotation, boolean invocationContext)
          Check the PostConstruct or PreDestroy annotated method criterias, and return post construct or pre destroyDependents method.
static void checkGenericType(javax.enterprise.inject.spi.Bean<?> bean)
          Checks the generic type requirements.
static void checkInjectedMethodParameterConditions(Method method, Class<?> clazz)
           
static void checkInjectionPointNamedQualifier(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
           
<X> void
checkManagedBeanCondition(javax.enterprise.inject.spi.AnnotatedType<X> type)
          Checks the implementation class for checking conditions.
static void checkNullInstance(Object instance, Class<?> scopeType, String errorMessage, Object... errorMessageArgs)
           
static boolean checkObtainsInjectionPointConditions(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Returns true if instance injection point false otherwise.
static void checkProducerGenericType(javax.enterprise.inject.spi.Bean<?> bean, Member member)
          Check producer method/field bean return type.
static void checkProducerMethodDisposal(Method disposalMethod, String definedBeanClassName)
          CheckProducerMethodDisposal.
static void checkProducerMethodForDeployment(Method method, String parentImplClazzName)
          Check producer method is ok for deployment.
 void checkSerializableScopeType(Class<? extends Annotation> scopeType, boolean isSerializable, String errorMessage, Object... errorMessageArgs)
           
 void checkUnproxiableApiType(javax.enterprise.inject.spi.Bean<?> bean, Class<? extends Annotation> scopeType)
          Checks the unproxiable condition.
protected  void configSpecializedProducerMethodBeans(List<ProducerMethodBean> sortedProducerBeans)
          Configure a list of producer method beans, which override the same method and the bean classes are directly extended each other.
 boolean configuredProducerSpecializedName(AbstractOwbBean<?> component, Method method, Method superMethod)
          Configures the name of the producer method for specializing the parent.
<T> void
configureInterceptorMethods(javax.enterprise.inject.spi.Interceptor<?> webBeansInterceptor, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, Class<? extends Annotation> annotation, boolean definedInInterceptorClass, boolean definedInMethod, List<InterceptorData> stack, Method annotatedInterceptorClassMethod)
           
 void configureInterceptorMethods(javax.enterprise.inject.spi.Interceptor<?> webBeansInterceptor, Class<?> interceptorClass, Class<? extends Annotation> interceptorType, boolean definedInInterceptorClass, boolean definedInMethod, List<InterceptorData> stack, Method annotatedInterceptorClassMethod, boolean defineWithInterceptorBinding)
          Configures the interceptor stack of the web beans component.
 void configureProducerMethodSpecializations()
          Configure direct/indirect specialized producer method beans.
static void configureProducerSpecialization(AbstractOwbBean<?> component, Method method, Class<?> superClass)
          Configures the producer method specialization.
protected  void configureSpecializations(Class<?> specializedClass, List<Class<?>> beanClasses)
          Configures the bean specializations.
 void configureSpecializations(List<Class<?>> beanClasses)
           
<T> ExtensionBean<T>
createExtensionComponent(Class<T> clazz)
          Creates a new extension bean.
<T> NewManagedBean<T>
createNewComponent(Class<T> clazz, Type apiType)
          New WebBeans component class.
<T> GProcessInjectionTarget
createProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
           
<T> ManagedBean<T>
defineAbstractDecorator(javax.enterprise.inject.spi.AnnotatedType<T> type)
           
<T> ManagedBean<T>
defineAbstractDecorator(ManagedBeanCreatorImpl<T> managedBeanCreator, javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent)
           
<T> Constructor<T>
defineConstructor(Class<T> clazz)
          Defines applicable constructor.
<T> Constructor<T>
defineConstructor(Constructor<?>[] constructors, Class<T> clazz)
           
<T> void
defineDecorator(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
          Define decorator bean.
<T> void
defineDecorator(ManagedBeanCreatorImpl<T> creator, javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent)
          Define decorator bean.
<T> void
defineInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
           
<T> void
defineInterceptor(ManagedBeanCreatorImpl<T> managedBeanCreator, javax.enterprise.inject.spi.ProcessInjectionTarget<T> injectionTargetEvent)
           
<T> ManagedBean<T>
defineManagedBean(javax.enterprise.inject.spi.AnnotatedType<T> type)
           
<T> ManagedBean<T>
defineManagedBean(ManagedBeanCreatorImpl<T> managedBeanCreator, javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent, boolean allowLazyInit)
           
<T> ManagedBean<T>
defineManagedBeanWithoutFireEvents(javax.enterprise.inject.spi.AnnotatedType<T> type)
          This method will be used in AfterBeanDiscovery.addBean(javax.enterprise.inject.spi.Bean)}
<T> GProcessAnnotatedType
fireProcessAnnotatedTypeEvent(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
          Returns ProcessAnnotatedType event.
<T> GProcessInjectionTarget
fireProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
          Returns ProcessInjectionTarget event.
 GProcessInjectionTarget fireProcessInjectionTargetEvent(GProcessInjectionTarget processInjectionTargetEvent)
           
<T> GProcessInjectionTarget
fireProcessInjectionTargetEventForJavaEeComponents(Class<T> componentClass)
          Returns ProcessInjectionTarget event.
 void fireProcessObservableMethodBeanEvent(Map<javax.enterprise.inject.spi.ObserverMethod<?>,javax.enterprise.inject.spi.AnnotatedMethod<?>> annotatedMethods)
           
 GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField, javax.enterprise.inject.spi.AnnotatedField<?> field)
           
 GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod, javax.enterprise.inject.spi.AnnotatedMethod<?> method)
           
 void fireProcessProducerFieldBeanEvent(Map<ProducerFieldBean<?>,javax.enterprise.inject.spi.AnnotatedField<?>> annotatedFields)
           
 void fireProcessProducerMethodBeanEvent(Map<ProducerMethodBean<?>,javax.enterprise.inject.spi.AnnotatedMethod<?>> annotatedMethods, javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
           
 ConversationBean getConversationBean()
          Returns new conversation bean instance.
static ClassLoader getCurrentClassLoader()
          Gets current classloader with current thread.
<T> EventBean<T>
getEventBean()
          Creates a new event bean.
 InjectionPointBean getInjectionPointBean()
          Returns a new injected point bean instance.
<T> InstanceBean<T>
getInstanceBean()
          Creates a new instance bean.
static String getManagedBeanDefaultName(String clazzName)
           
 BeanManagerBean getManagerBean()
          Creates a new manager bean instance.
static javax.enterprise.inject.spi.Bean<?> getMostSpecializedBean(javax.enterprise.inject.spi.BeanManager manager, javax.enterprise.inject.spi.Bean<?> component)
           
static String getProducerDefaultName(String methodName)
           
static boolean hasInjectionTargetBeanAnnotatedWithAlternative(InjectionTargetBean<?> bean)
           
static void initProxyFactoryClassLoaderProvider()
           
 void inspectErrorStack(String logMessage)
           
static boolean isAnnotatedTypeDecorator(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
          Return true if this annotated type represents a decorator.
 boolean isAnnotatedTypeDecoratorOrInterceptor(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
          Return true if this annotated type represents a decorator.
static boolean isAnnotatedTypeInterceptor(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
          Return true if this annotated type represents a decorator.
 Set<javax.enterprise.inject.spi.Bean<?>> isConfiguredWebBeans(Class<?> clazz, boolean annotate)
           
 boolean isConstructureOk(Class<?> clazz)
          Check that simple web beans class has compatible constructor.
static boolean isContainsInterceptorMethod(List<InterceptorData> stack, InterceptorType type)
          Returns true if interceptor stack contains interceptor with given type.
static boolean isDefaultExtensionBeanEventType(Class<?> clazz)
           
static boolean isDefaultExtensionProducerOrObserverEventType(Class<?> clazz)
           
static boolean isDependent(javax.enterprise.inject.spi.Bean<?> bean)
           
protected static boolean isDirectlySpecializedBeanSet(Set<javax.enterprise.inject.spi.Bean<?>> beans)
          Return true if a list of beans are directly specialized/extended each other.
static boolean isExtensionBeanEventType(Class<?> clazz)
           
static boolean isExtensionEventType(Class<?> clazz)
           
static boolean isExtensionProducerOrObserverEventType(Class<?> clazz)
           
 void isManagedBeanClass(Class<?> clazz)
          Return true if the given class is ok for manage bean conditions, false otherwise.
static String isPassivationCapable(javax.enterprise.context.spi.Contextual<?> contextual)
           
 boolean isPassivationCapableDependency(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
           
 boolean isScopeTypeNormal(Class<? extends Annotation> scopeType)
          The result of this invocation get's cached
static boolean isStaticInjection(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Determines if the injection is to be performed into a static field.
 void lazyInitializeManagedBean(Class<?> clazz, ManagedBean<?> managedBean, ManagedBeanCreatorImpl<?> managedBeanCreator)
           
<T> T
newInstanceForced(Class<T> clazz)
          Create a new instance of the given class using it's default constructor regardless if the constructor is visible or not.
 void setBeanEnableFlagForProducerBean(InjectionTargetBean<?> parent, AbstractProducerBean<?> producer, Annotation[] annotations)
           
 void setInjectionTargetBeanEnableFlag(InjectionTargetBean<?> bean)
          Sets bean enabled flag.
 boolean supportsJavaEeComponentInjections(Class<?> clazz)
          Returns true if given class supports injections, false otherwise.
static void throwRuntimeExceptions(Exception e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebBeansUtil

public WebBeansUtil(WebBeansContext webBeansContext)
Method Detail

getCurrentClassLoader

public static ClassLoader getCurrentClassLoader()
Gets current classloader with current thread.

Returns:
Current class loader instance

checkGenericType

public static void checkGenericType(javax.enterprise.inject.spi.Bean<?> bean)
Checks the generic type requirements.

Parameters:
bean - managed bean instance

checkProducerGenericType

public static void checkProducerGenericType(javax.enterprise.inject.spi.Bean<?> bean,
                                            Member member)
Check producer method/field bean return type.

Parameters:
bean - producer bean instance
member - related member instance

isManagedBeanClass

public void isManagedBeanClass(Class<?> clazz)
Return true if the given class is ok for manage bean conditions, false otherwise.

Parameters:
clazz - class in hand

supportsJavaEeComponentInjections

public boolean supportsJavaEeComponentInjections(Class<?> clazz)
Returns true if given class supports injections, false otherwise.

Each plugin is asked with given class that supports injections or not.

Parameters:
clazz - scanned class
Returns:
true if given class supports injections

defineConstructor

public <T> Constructor<T> defineConstructor(Class<T> clazz)
                                 throws WebBeansConfigurationException
Defines applicable constructor.

Type Parameters:
T - type info
Parameters:
clazz - class type
Returns:
constructor
Throws:
WebBeansConfigurationException - any configuration exception

defineConstructor

public <T> Constructor<T> defineConstructor(Constructor<?>[] constructors,
                                            Class<T> clazz)

isConstructureOk

public boolean isConstructureOk(Class<?> clazz)
                         throws WebBeansConfigurationException
Check that simple web beans class has compatible constructor.

Parameters:
clazz - web beans simple class
Throws:
WebBeansConfigurationException - if the web beans has incompatible constructor

checkProducerMethodForDeployment

public static void checkProducerMethodForDeployment(Method method,
                                                    String parentImplClazzName)
Check producer method is ok for deployment.

Parameters:
method - producer method
parentImplClazzName - parent class name

checkProducerMethodDisposal

public static void checkProducerMethodDisposal(Method disposalMethod,
                                               String definedBeanClassName)
CheckProducerMethodDisposal.

Parameters:
disposalMethod - disposal method
definedBeanClassName - bean class name

createNewComponent

public <T> NewManagedBean<T> createNewComponent(Class<T> clazz,
                                                Type apiType)
New WebBeans component class.

Type Parameters:
T -
Parameters:
clazz - impl. class
Returns:
the new component

createExtensionComponent

public <T> ExtensionBean<T> createExtensionComponent(Class<T> clazz)
Creates a new extension bean.

Type Parameters:
T - extension service class
Parameters:
clazz - impl. class
Returns:
a new extension service bean

getManagerBean

public BeanManagerBean getManagerBean()
Creates a new manager bean instance.

Returns:
new manager bean instance

getInstanceBean

public <T> InstanceBean<T> getInstanceBean()
Creates a new instance bean.

Returns:
new instance bean

getEventBean

public <T> EventBean<T> getEventBean()
Creates a new event bean.

Returns:
new event bean

getConversationBean

public ConversationBean getConversationBean()
Returns new conversation bean instance. The name is explicitly specified in 6.7.2 and is not the normal default name.

Returns:
new conversation bean

getInjectionPointBean

public InjectionPointBean getInjectionPointBean()
Returns a new injected point bean instance.

Returns:
new injected point bean

checkCommonAnnotationCriterias

public Method checkCommonAnnotationCriterias(Class<?> clazz,
                                             Class<? extends Annotation> commonAnnotation,
                                             boolean invocationContext)
Check the PostConstruct or PreDestroy annotated method criterias, and return post construct or pre destroyDependents method.

Web Beans container is responsible for setting the post construct or pre destroyDependents annotation if the web beans component is not an EJB components, in this case EJB container is responsible for this.

Parameters:
clazz - checked class
commonAnnotation - post construct or predestroy annotation
invocationContext - whether the takes an invocationContext, as in interceptors defiend outside of the bean class.
Returns:
post construct or predestroy method

checkCommonAnnotationCriterias

public <T> Method checkCommonAnnotationCriterias(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
                                                 Class<? extends Annotation> commonAnnotation,
                                                 boolean invocationContext)

checkAroundInvokeAnnotationCriterias

public static Method checkAroundInvokeAnnotationCriterias(Class<?> clazz,
                                                          Class<? extends Annotation> annot)
Check the AroundInvoke annotated method criterias, and return around invoke method.

Web Beans container is responsible for setting around invoke annotation if the web beans component is not an EJB components, in this case EJB container is responsible for this.

Parameters:
clazz - checked class
Returns:
around invoke method

checkAroundInvokeAnnotationCriterias

public static <T> Method checkAroundInvokeAnnotationCriterias(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
                                                              Class<? extends Annotation> annot)

configureInterceptorMethods

public void configureInterceptorMethods(javax.enterprise.inject.spi.Interceptor<?> webBeansInterceptor,
                                        Class<?> interceptorClass,
                                        Class<? extends Annotation> interceptorType,
                                        boolean definedInInterceptorClass,
                                        boolean definedInMethod,
                                        List<InterceptorData> stack,
                                        Method annotatedInterceptorClassMethod,
                                        boolean defineWithInterceptorBinding)
Configures the interceptor stack of the web beans component.

Parameters:
interceptorClass - interceptor class
interceptorType - annotation type
definedInInterceptorClass - check if annotation is defined in interceptor class (as opposed to bean class)
definedInMethod - check if the interceptor is defined in the comp. method
stack - interceptor stack
annotatedInterceptorClassMethod - if definedInMethod, this specify method
defineWithInterceptorBinding - if interceptor is defined with WebBeans spec, not EJB spec

configureInterceptorMethods

public <T> void configureInterceptorMethods(javax.enterprise.inject.spi.Interceptor<?> webBeansInterceptor,
                                            javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
                                            Class<? extends Annotation> annotation,
                                            boolean definedInInterceptorClass,
                                            boolean definedInMethod,
                                            List<InterceptorData> stack,
                                            Method annotatedInterceptorClassMethod)

newInstanceForced

public <T> T newInstanceForced(Class<T> clazz)
                    throws WebBeansConfigurationException
Create a new instance of the given class using it's default constructor regardless if the constructor is visible or not. This is needed to construct some package scope classes in the TCK.

Type Parameters:
T -
Parameters:
clazz -
Returns:
Throws:
WebBeansConfigurationException

isContainsInterceptorMethod

public static boolean isContainsInterceptorMethod(List<InterceptorData> stack,
                                                  InterceptorType type)
Returns true if interceptor stack contains interceptor with given type.

Parameters:
stack - interceptor stack
type - interceptor type
Returns:
true if stack contains the interceptor with given type

getManagedBeanDefaultName

public static String getManagedBeanDefaultName(String clazzName)

getProducerDefaultName

public static String getProducerDefaultName(String methodName)

isDirectlySpecializedBeanSet

protected static boolean isDirectlySpecializedBeanSet(Set<javax.enterprise.inject.spi.Bean<?>> beans)
Return true if a list of beans are directly specialized/extended each other.

Parameters:
beans, - a set of specialized beans.
Returns:

configureSpecializations

public void configureSpecializations(List<Class<?>> beanClasses)

configureSpecializations

protected void configureSpecializations(Class<?> specializedClass,
                                        List<Class<?>> beanClasses)
Configures the bean specializations.

Specialized beans inherit the name property from their parents. Specialized bean deployment priority must be higher than its super class related bean.

Parameters:
specializedClass - specialized class
Throws:
DefinitionException - if name is defined
InconsistentSpecializationException - related with priority
WebBeansConfigurationException - any other exception

configSpecializedProducerMethodBeans

protected void configSpecializedProducerMethodBeans(List<ProducerMethodBean> sortedProducerBeans)
Configure a list of producer method beans, which override the same method and the bean classes are directly extended each other.

Parameters:
sortedProducerBeans -

configureProducerMethodSpecializations

public void configureProducerMethodSpecializations()
Configure direct/indirect specialized producer method beans.


isConfiguredWebBeans

public Set<javax.enterprise.inject.spi.Bean<?>> isConfiguredWebBeans(Class<?> clazz,
                                                                     boolean annotate)

checkUnproxiableApiType

public void checkUnproxiableApiType(javax.enterprise.inject.spi.Bean<?> bean,
                                    Class<? extends Annotation> scopeType)
Checks the unproxiable condition.

Parameters:
bean - managed bean
scopeType - scope type
Throws:
WebBeansConfigurationException - if bean is not proxied by the container

configureProducerSpecialization

public static void configureProducerSpecialization(AbstractOwbBean<?> component,
                                                   Method method,
                                                   Class<?> superClass)
Configures the producer method specialization.

Parameters:
component - producer method component
method - specialized producer method
superClass - bean super class that has overriden method
Throws:
DefinitionException - if the name is exist on the producer method when parent also has name
WebBeansConfigurationException - any other exceptions

configuredProducerSpecializedName

public boolean configuredProducerSpecializedName(AbstractOwbBean<?> component,
                                                 Method method,
                                                 Method superMethod)
Configures the name of the producer method for specializing the parent.

Parameters:
component - producer method component
method - specialized producer method
superMethod - overriden super producer method

checkInjectedMethodParameterConditions

public static void checkInjectedMethodParameterConditions(Method method,
                                                          Class<?> clazz)

checkObtainsInjectionPointConditions

public static boolean checkObtainsInjectionPointConditions(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Returns true if instance injection point false otherwise.

Parameters:
injectionPoint - injection point definition
Returns:
true if instance injection point

defineInterceptor

public <T> void defineInterceptor(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                  javax.enterprise.inject.spi.ProcessInjectionTarget<T> injectionTargetEvent)

defineDecorator

public <T> void defineDecorator(ManagedBeanCreatorImpl<T> creator,
                                javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent)
Define decorator bean.

Type Parameters:
T - type info
Parameters:
creator - bean creator
processInjectionTargetEvent -

isScopeTypeNormal

public boolean isScopeTypeNormal(Class<? extends Annotation> scopeType)
The result of this invocation get's cached

Parameters:
scopeType -
Returns:
true if the given scopeType represents a NormalScoped bean
See Also:
isScopeTypeNormalCache

checkNullInstance

public static void checkNullInstance(Object instance,
                                     Class<?> scopeType,
                                     String errorMessage,
                                     Object... errorMessageArgs)

checkSerializableScopeType

public void checkSerializableScopeType(Class<? extends Annotation> scopeType,
                                       boolean isSerializable,
                                       String errorMessage,
                                       Object... errorMessageArgs)

getMostSpecializedBean

public static javax.enterprise.inject.spi.Bean<?> getMostSpecializedBean(javax.enterprise.inject.spi.BeanManager manager,
                                                                         javax.enterprise.inject.spi.Bean<?> component)

fireProcessAnnotatedTypeEvent

public <T> GProcessAnnotatedType fireProcessAnnotatedTypeEvent(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
Returns ProcessAnnotatedType event.

Type Parameters:
T - bean type
Parameters:
annotatedType - bean class
Returns:
event

fireProcessInjectionTargetEvent

public <T> GProcessInjectionTarget fireProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
Returns ProcessInjectionTarget event.

Type Parameters:
T - bean type
Parameters:
bean - bean instance
Returns:
event

fireProcessInjectionTargetEvent

public GProcessInjectionTarget fireProcessInjectionTargetEvent(GProcessInjectionTarget processInjectionTargetEvent)

createProcessInjectionTargetEvent

public <T> GProcessInjectionTarget createProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)

fireProcessInjectionTargetEventForJavaEeComponents

public <T> GProcessInjectionTarget fireProcessInjectionTargetEventForJavaEeComponents(Class<T> componentClass)
Returns ProcessInjectionTarget event.

Type Parameters:
T - bean type
Returns:
event

fireProcessProducerEventForMethod

public GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod,
                                                          javax.enterprise.inject.spi.AnnotatedMethod<?> method)

fireProcessProducerEventForField

public GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField,
                                                         javax.enterprise.inject.spi.AnnotatedField<?> field)

fireProcessProducerMethodBeanEvent

public void fireProcessProducerMethodBeanEvent(Map<ProducerMethodBean<?>,javax.enterprise.inject.spi.AnnotatedMethod<?>> annotatedMethods,
                                               javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)

fireProcessObservableMethodBeanEvent

public void fireProcessObservableMethodBeanEvent(Map<javax.enterprise.inject.spi.ObserverMethod<?>,javax.enterprise.inject.spi.AnnotatedMethod<?>> annotatedMethods)

fireProcessProducerFieldBeanEvent

public void fireProcessProducerFieldBeanEvent(Map<ProducerFieldBean<?>,javax.enterprise.inject.spi.AnnotatedField<?>> annotatedFields)

checkInjectionPointNamedQualifier

public static void checkInjectionPointNamedQualifier(javax.enterprise.inject.spi.InjectionPoint injectionPoint)

setInjectionTargetBeanEnableFlag

public void setInjectionTargetBeanEnableFlag(InjectionTargetBean<?> bean)
Sets bean enabled flag.

Parameters:
bean - bean instance

hasInjectionTargetBeanAnnotatedWithAlternative

public static boolean hasInjectionTargetBeanAnnotatedWithAlternative(InjectionTargetBean<?> bean)

setBeanEnableFlagForProducerBean

public void setBeanEnableFlagForProducerBean(InjectionTargetBean<?> parent,
                                             AbstractProducerBean<?> producer,
                                             Annotation[] annotations)

isExtensionEventType

public static boolean isExtensionEventType(Class<?> clazz)

isExtensionBeanEventType

public static boolean isExtensionBeanEventType(Class<?> clazz)

isDefaultExtensionBeanEventType

public static boolean isDefaultExtensionBeanEventType(Class<?> clazz)

isExtensionProducerOrObserverEventType

public static boolean isExtensionProducerOrObserverEventType(Class<?> clazz)

isDefaultExtensionProducerOrObserverEventType

public static boolean isDefaultExtensionProducerOrObserverEventType(Class<?> clazz)

isDependent

public static boolean isDependent(javax.enterprise.inject.spi.Bean<?> bean)

inspectErrorStack

public void inspectErrorStack(String logMessage)

isPassivationCapable

public static String isPassivationCapable(javax.enterprise.context.spi.Contextual<?> contextual)
Parameters:
contextual - the Bean to check
Returns:
the uniqueId if it is PassivationCapable and enabled

defineAbstractDecorator

public <T> ManagedBean<T> defineAbstractDecorator(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                                  javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent)

defineManagedBean

public <T> ManagedBean<T> defineManagedBean(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                            javax.enterprise.inject.spi.ProcessInjectionTarget<T> processInjectionTargetEvent,
                                            boolean allowLazyInit)

defineManagedBeanWithoutFireEvents

public <T> ManagedBean<T> defineManagedBeanWithoutFireEvents(javax.enterprise.inject.spi.AnnotatedType<T> type)
This method will be used in AfterBeanDiscovery.addBean(javax.enterprise.inject.spi.Bean)}


isStaticInjection

public static boolean isStaticInjection(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Determines if the injection is to be performed into a static field.

Parameters:
injectionPoint -
Returns:
true if the injection is into a static field

isPassivationCapableDependency

public boolean isPassivationCapableDependency(javax.enterprise.inject.spi.InjectionPoint injectionPoint)

throwRuntimeExceptions

public static void throwRuntimeExceptions(Exception e)

initProxyFactoryClassLoaderProvider

public static void initProxyFactoryClassLoaderProvider()

isAnnotatedTypeDecorator

public static boolean isAnnotatedTypeDecorator(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
Return true if this annotated type represents a decorator.

Parameters:
annotatedType - annotated type
Returns:
true if decorator

isAnnotatedTypeDecoratorOrInterceptor

public boolean isAnnotatedTypeDecoratorOrInterceptor(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
Return true if this annotated type represents a decorator.

Parameters:
annotatedType - annotated type
Returns:
true if decorator

isAnnotatedTypeInterceptor

public static boolean isAnnotatedTypeInterceptor(javax.enterprise.inject.spi.AnnotatedType<?> annotatedType)
Return true if this annotated type represents a decorator.

Parameters:
annotatedType - annotated type
Returns:
true if decorator

defineManagedBean

public <T> ManagedBean<T> defineManagedBean(javax.enterprise.inject.spi.AnnotatedType<T> type)

lazyInitializeManagedBean

public void lazyInitializeManagedBean(Class<?> clazz,
                                      ManagedBean<?> managedBean,
                                      ManagedBeanCreatorImpl<?> managedBeanCreator)

defineAbstractDecorator

public <T> ManagedBean<T> defineAbstractDecorator(javax.enterprise.inject.spi.AnnotatedType<T> type)

defineDecorator

public <T> void defineDecorator(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
Define decorator bean.

Type Parameters:
T - type info
Parameters:
annotatedType - decorator class

defineInterceptor

public <T> void defineInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)

checkManagedBeanCondition

public <X> void checkManagedBeanCondition(javax.enterprise.inject.spi.AnnotatedType<X> type)
                               throws WebBeansConfigurationException
Checks the implementation class for checking conditions.

Parameters:
type - implementation class
Throws:
WebBeansConfigurationException - if any configuration exception occurs


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