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: 1002992 $ $Date: 2010-09-30 12:19:45 +0200 (Do, 30 Sep 2010) $

Method Summary
static
<T> Method
checkAroundInvokeAnnotationCriterias(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.
static
<T> Method
checkCommonAnnotationCriterias(AnnotatedType<T> annotatedType, Class<? extends Annotation> commonAnnotation, boolean invocationContext)
           
static 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 checkDecoratorResolverParams(Set<Type> apiTypes, Annotation... qualifiers)
           
static Annotation[] checkForNewQualifierForDeployment(Type type, Class<?> clazz, String name, Annotation[] annotations)
          Check conditions for the new binding.
static void checkGenericType(Bean<?> bean)
          Checks the generic type requirements.
static void checkInjectedMethodParameterConditions(Method method, Class<?> clazz)
           
static void checkInjectionPointNamedQualifier(InjectionPoint injectionPoint)
           
static void checkInterceptorResolverParams(Annotation... interceptorBindings)
           
static void checkNullable(Class<?> type, AbstractOwbBean<?> component)
           
static void checkNullInstance(Object instance, Class<?> scopeType, String errorMessage)
           
static boolean checkObtainsInjectionPointConditions(InjectionPoint injectionPoint)
          Returns true if instance injection point false otherwise.
static void checkProducerGenericType(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.
static void checkSerializableScopeType(Class<? extends Annotation> scopeType, boolean isSerializable, String errorMessage)
           
static void checkStereoTypeClass(Class<? extends Annotation> clazz)
          Validates that given class obeys stereotype model defined by the specification.
static void checkStereoTypeClass(Class<? extends Annotation> clazz, Annotation... annotations)
          Validates that given class obeys stereotype model defined by the specification.
static void checkUnproxiableApiType(Bean<?> bean, Class<? extends Annotation> scopeType)
          Checks the unproxiable condition.
protected static 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.
static boolean configuredProducerSpecializedName(AbstractOwbBean<?> component, Method method, Method superMethod)
          Configures the name of the producer method for specializing the parent.
static
<T> void
configureInterceptorMethods(Interceptor<?> webBeansInterceptor, AnnotatedType<T> annotatedType, Class<? extends Annotation> annotation, boolean definedInInterceptorClass, boolean definedInMethod, List<InterceptorData> stack, Method annotatedInterceptorClassMethod)
           
static void configureInterceptorMethods(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.
static void configureProducerMethodSpecializations()
          Configure direct/indirect specialized producer method beans.
static void configureProducerSpecialization(AbstractOwbBean<?> component, Method method, Class<?> superClass)
          Configures the producer method specialization.
protected static void configureSpecializations(Class<?> specializedClass, List<Class<?>> beanClasses)
          Configures the bean specializations.
static void configureSpecializations(List<Class<?>> beanClasses)
           
static
<T> ExtensionBean<T>
createExtensionComponent(Class<T> clazz)
          Creates a new extension bean.
static
<T> NewBean<T>
createNewBean(AbstractInjectionTargetBean<T> bean)
          Returns a new managed bean from given bean.
static
<T> NewBean<T>
createNewComponent(Class<T> clazz, Type apiType)
          New WebBeans component class.
static
<T> ManagedBean<T>
defineAbstractDecorator(ManagedBeanCreatorImpl<T> managedBeanCreator, ProcessInjectionTarget<T> processInjectionTargetEvent)
           
static
<T> Constructor<T>
defineConstructor(Class<T> clazz)
          Defines applicable constructor.
static
<T> Constructor<T>
defineConstructor(Constructor<T>[] constructors, Class<T> clazz)
           
static
<T> void
defineDecorator(ManagedBeanCreatorImpl<T> creator, ProcessInjectionTarget<T> processInjectionTargetEvent)
          Define decorator bean.
static
<T> void
defineInterceptor(ManagedBeanCreatorImpl<T> managedBeanCreator, ProcessInjectionTarget<T> injectionTargetEvent)
           
static
<T> ManagedBean<T>
defineManagedBean(ManagedBeanCreatorImpl<T> managedBeanCreator, ProcessInjectionTarget<T> processInjectionTargetEvent)
           
static
<T> ManagedBean<T>
defineManagedBeanWithoutFireEvents(AnnotatedType<T> type)
           
static
<T> GProcessAnnotatedType
fireProcessAnnotatedTypeEvent(AnnotatedType<T> annotatedType)
          Returns ProcessAnnotatedType event.
static
<T> GProcessInjectionTarget
fireProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean)
          Returns ProcessInjectionTarget event.
static
<T> GProcessInjectionTarget
fireProcessInjectionTargetEventForJavaEeComponents(Class<T> componentClass)
          Returns ProcessInjectionTarget event.
static void fireProcessObservableMethodBeanEvent(Map<ObserverMethod<?>,AnnotatedMethod<?>> annotatedMethods)
           
static GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField, AnnotatedField<?> field)
           
static GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod, AnnotatedMethod<?> method)
           
static void fireProcessProducerFieldBeanEvent(Map<ProducerFieldBean<?>,AnnotatedField<?>> annotatedFields)
           
static void fireProcessProducerMethodBeanEvent(Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods, AnnotatedType<?> annotatedType)
           
static Annotation[] getComponentStereoTypes(OwbBean<?> bean)
          Returns bean stereotypes.
static ConversationBean getConversationBean()
          Returns new conversation bean instance.
static ClassLoader getCurrentClassLoader()
          Gets current classloader with current thread.
static
<T> EventBean<T>
getEventBean()
          Creates a new event bean.
static InjectionPointBean getInjectionPointBean()
          Returns a new injected point bean instance.
static
<T> InstanceBean<T>
getInstanceBean()
          Creates a new instance bean.
static String getManagedBeanDefaultName(String clazzName)
           
static BeanManagerBean getManagerBean()
          Creates a new manager bean instance.
static Bean<?> getMostSpecializedBean(BeanManager manager, Bean<?> component)
           
static String getProducerDefaultName(String methodName)
           
static boolean hasInjectionTargetBeanAnnotatedWithAlternative(InjectionTargetBean<?> bean)
           
static boolean hasNamedOnStereoTypes(OwbBean<?> bean)
          Returns true if name exists,false otherwise.
static void initProxyFactoryClassLoaderProvider()
           
static void inspectErrorStack(String logMessage)
           
static boolean isBeanHasEnterpriseMarker(Object beanInstance)
          Returns true if bean instance is an enterprise bean instance false otherwise.
static boolean isComponentHasStereoType(OwbBean<?> component)
          Returns true if array contains the StereoType meta annotation
static Set<Bean<?>> isConfiguredWebBeans(Class<?> clazz, boolean annotate)
           
static 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(Bean<?> bean)
           
protected static boolean isDirectlySpecializedBeanSet(Set<Bean<?>> beans)
          Return true if a list of beans are directly specialized/extended each other.
static boolean isEnterpriseBean(AbstractOwbBean<?> bean)
          Returns true if bean is an enterprise bean, false otherwise.
static boolean isExtensionBeanEventType(Class<?> clazz)
           
static boolean isExtensionEventType(Class<?> clazz)
           
static boolean isExtensionProducerOrObserverEventType(Class<?> clazz)
           
static boolean isManagedBean(AbstractOwbBean<?> component)
           
static void isManagedBeanClass(Class<?> clazz)
          Return true if the given class is ok for manage bean conditions, false otherwise.
static String isPassivationCapable(Contextual<?> contextual)
           
static boolean isPassivationCapableDependency(InjectionPoint injectionPoint)
           
static boolean isProducerBean(AbstractOwbBean<?> bean)
           
static boolean isScopeEncloseOther(Class<? extends Annotation> src, Class<? extends Annotation> target)
          Returns true if src scope encloses the target.
static boolean isScopeTypeNormal(Class<? extends Annotation> scopeType)
          The result of this invocation get's cached
static boolean isStaticInjection(InjectionPoint injectionPoint)
          Determines if the injection is to be performed into a static field.
static
<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.
static void setBeanEnableFlagForProducerBean(InjectionTargetBean<?> parent, AbstractProducerBean<?> producer, Annotation[] annotations)
           
static void setInjectionTargetBeanEnableFlag(InjectionTargetBean<?> bean)
          Sets bean enabled flag.
static 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
 

Method Detail

getCurrentClassLoader

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

Returns:
Current class loader instance

checkGenericType

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

Parameters:
bean - managed bean instance

checkProducerGenericType

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

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

isManagedBeanClass

public static 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 static 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 static <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 static <T> Constructor<T> defineConstructor(Constructor<T>[] constructors,
                                                   Class<T> clazz)

isConstructureOk

public static 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

checkForNewQualifierForDeployment

public static Annotation[] checkForNewQualifierForDeployment(Type type,
                                                             Class<?> clazz,
                                                             String name,
                                                             Annotation[] annotations)
Check conditions for the new binding.

Parameters:
annotations - annotations
Returns:
Annotation[] with all binding annotations
Throws:
WebBeansConfigurationException - if New plus any other binding annotation is set

isScopeEncloseOther

public static boolean isScopeEncloseOther(Class<? extends Annotation> src,
                                          Class<? extends Annotation> target)
Returns true if src scope encloses the target.

Parameters:
src - src scope
target - target scope
Returns:
true if src scope encloses the target

createNewComponent

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

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

createExtensionComponent

public static <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

createNewBean

public static <T> NewBean<T> createNewBean(AbstractInjectionTargetBean<T> bean)
Returns a new managed bean from given bean.

Type Parameters:
T - bean type parameter
Parameters:
bean - bean instance
Returns:
the new bean from given managed bean

getManagerBean

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

Returns:
new manager bean instance

getInstanceBean

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

Returns:
new instance bean

getEventBean

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

Returns:
new event bean

getConversationBean

public static ConversationBean getConversationBean()
Returns new conversation bean instance.

Returns:
new conversation bean

getInjectionPointBean

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

Returns:
new injected point bean

checkCommonAnnotationCriterias

public static 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 static <T> Method checkCommonAnnotationCriterias(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(AnnotatedType<T> annotatedType,
                                                              Class<? extends Annotation> annot)

configureInterceptorMethods

public static void configureInterceptorMethods(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 static <T> void configureInterceptorMethods(Interceptor<?> webBeansInterceptor,
                                                   AnnotatedType<T> annotatedType,
                                                   Class<? extends Annotation> annotation,
                                                   boolean definedInInterceptorClass,
                                                   boolean definedInMethod,
                                                   List<InterceptorData> stack,
                                                   Method annotatedInterceptorClassMethod)

newInstanceForced

public static <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

isComponentHasStereoType

public static boolean isComponentHasStereoType(OwbBean<?> component)
Returns true if array contains the StereoType meta annotation

Returns:
true if array contains the StereoType meta annotation

getComponentStereoTypes

public static Annotation[] getComponentStereoTypes(OwbBean<?> bean)
Returns bean stereotypes.

Parameters:
bean - bean instance
Returns:
bean stereotypes

hasNamedOnStereoTypes

public static boolean hasNamedOnStereoTypes(OwbBean<?> bean)
Returns true if name exists,false otherwise.

Parameters:
bean - bean instance
Returns:
true if name exists

getManagedBeanDefaultName

public static String getManagedBeanDefaultName(String clazzName)

getProducerDefaultName

public static String getProducerDefaultName(String methodName)

checkStereoTypeClass

public static void checkStereoTypeClass(Class<? extends Annotation> clazz)
Validates that given class obeys stereotype model defined by the specification.

Parameters:
clazz - stereotype class

checkStereoTypeClass

public static void checkStereoTypeClass(Class<? extends Annotation> clazz,
                                        Annotation... annotations)
Validates that given class obeys stereotype model defined by the specification.

Parameters:
clazz - stereotype class

isDirectlySpecializedBeanSet

protected static boolean isDirectlySpecializedBeanSet(Set<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 static void configureSpecializations(List<Class<?>> beanClasses)

configureSpecializations

protected static 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 static 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 static void configureProducerMethodSpecializations()
Configure direct/indirect specialized producer method beans.


isConfiguredWebBeans

public static Set<Bean<?>> isConfiguredWebBeans(Class<?> clazz,
                                                boolean annotate)

checkUnproxiableApiType

public static void checkUnproxiableApiType(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

checkNullable

public static void checkNullable(Class<?> type,
                                 AbstractOwbBean<?> component)

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 static 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)

checkInterceptorResolverParams

public static void checkInterceptorResolverParams(Annotation... interceptorBindings)

checkDecoratorResolverParams

public static void checkDecoratorResolverParams(Set<Type> apiTypes,
                                                Annotation... qualifiers)

checkObtainsInjectionPointConditions

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

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

defineInterceptor

public static <T> void defineInterceptor(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                         ProcessInjectionTarget<T> injectionTargetEvent)

defineDecorator

public static <T> void defineDecorator(ManagedBeanCreatorImpl<T> creator,
                                       ProcessInjectionTarget<T> processInjectionTargetEvent)
Define decorator bean.

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

isScopeTypeNormal

public static 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)

checkSerializableScopeType

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

isManagedBean

public static boolean isManagedBean(AbstractOwbBean<?> component)

isProducerBean

public static boolean isProducerBean(AbstractOwbBean<?> bean)

isEnterpriseBean

public static boolean isEnterpriseBean(AbstractOwbBean<?> bean)
Returns true if bean is an enterprise bean, false otherwise.

Parameters:
bean - bean instance
Returns:
true if bean is an enterprise bean

getMostSpecializedBean

public static Bean<?> getMostSpecializedBean(BeanManager manager,
                                             Bean<?> component)

fireProcessAnnotatedTypeEvent

public static <T> GProcessAnnotatedType fireProcessAnnotatedTypeEvent(AnnotatedType<T> annotatedType)
Returns ProcessAnnotatedType event.

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

fireProcessInjectionTargetEvent

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

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

fireProcessInjectionTargetEventForJavaEeComponents

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

Type Parameters:
T - bean type
Returns:
event

fireProcessProducerEventForMethod

public static GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod,
                                                                 AnnotatedMethod<?> method)

fireProcessProducerEventForField

public static GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField,
                                                                AnnotatedField<?> field)

fireProcessProducerMethodBeanEvent

public static void fireProcessProducerMethodBeanEvent(Map<ProducerMethodBean<?>,AnnotatedMethod<?>> annotatedMethods,
                                                      AnnotatedType<?> annotatedType)

fireProcessObservableMethodBeanEvent

public static void fireProcessObservableMethodBeanEvent(Map<ObserverMethod<?>,AnnotatedMethod<?>> annotatedMethods)

fireProcessProducerFieldBeanEvent

public static void fireProcessProducerFieldBeanEvent(Map<ProducerFieldBean<?>,AnnotatedField<?>> annotatedFields)

isBeanHasEnterpriseMarker

public static boolean isBeanHasEnterpriseMarker(Object beanInstance)
Returns true if bean instance is an enterprise bean instance false otherwise.

Parameters:
beanInstance - bean instance
Returns:
true if bean instance is an enterprise bean instance

checkInjectionPointNamedQualifier

public static void checkInjectionPointNamedQualifier(InjectionPoint injectionPoint)

setInjectionTargetBeanEnableFlag

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

Parameters:
bean - bean instance

hasInjectionTargetBeanAnnotatedWithAlternative

public static boolean hasInjectionTargetBeanAnnotatedWithAlternative(InjectionTargetBean<?> bean)

setBeanEnableFlagForProducerBean

public static 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(Bean<?> bean)

inspectErrorStack

public static void inspectErrorStack(String logMessage)

isPassivationCapable

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

defineAbstractDecorator

public static <T> ManagedBean<T> defineAbstractDecorator(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                                         ProcessInjectionTarget<T> processInjectionTargetEvent)

defineManagedBean

public static <T> ManagedBean<T> defineManagedBean(ManagedBeanCreatorImpl<T> managedBeanCreator,
                                                   ProcessInjectionTarget<T> processInjectionTargetEvent)

defineManagedBeanWithoutFireEvents

public static <T> ManagedBean<T> defineManagedBeanWithoutFireEvents(AnnotatedType<T> type)

isStaticInjection

public static boolean isStaticInjection(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 static boolean isPassivationCapableDependency(InjectionPoint injectionPoint)

throwRuntimeExceptions

public static void throwRuntimeExceptions(Exception e)

initProxyFactoryClassLoaderProvider

public static void initProxyFactoryClassLoaderProvider()


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