Home » apache-openwebbeans-1.0.0-incubating-M3-sources » org.apache.webbeans.util » [javadoc | source]
org.apache.webbeans.util
public final class: WebBeansUtil [javadoc | source]
java.lang.Object
   org.apache.webbeans.util.WebBeansUtil
Contains some utility methods used in the all project.
Method from org.apache.webbeans.util.WebBeansUtil Summary:
addInjectedImplicitEventComponent,   addInjectedImplicitInstanceComponent,   checkAroundInvokeAnnotationCriterias,   checkCommonAnnotationCriterias,   checkDecoratorResolverParams,   checkForNewQualifierForDeployment,   checkForValidResources,   checkGenericType,   checkInjectedMethodParameterConditions,   checkInterceptorResolverParams,   checkNullInstance,   checkNullable,   checkObtainsInjectionPointConditions,   checkPassivationScope,   checkProducerGenericType,   checkProducerMethodDisposal,   checkProducerMethodForDeployment,   checkSerializableScopeType,   checkStereoTypeClass,   checkUnproxiableApiType,   configureInterceptorMethods,   configureProducerSpecialization,   configureSpecializations,   configuredProducerSpecializedName,   createExtensionComponent,   createInstanceComponent,   createNewComponent,   createNewSimpleBeanComponent,   createObservableImplicitComponent,   defineConstructor,   defineDecorators,   defineInterceptors,   fireProcessAnnotatedTypeEvent,   fireProcessInjectionTargetEvent,   fireProcessProducerEventForField,   fireProcessProducerEventForMethod,   fireProcessProducerFieldBeanEvent,   fireProcessProducerMethodBeanEvent,   getComponentStereoTypes,   getConversationComponent,   getCurrentClassLoader,   getInjectionPointComponent,   getInterceptorMethods,   getManagerComponent,   getMaxPrecedenceSteroTypeDeploymentType,   getMostSpecializedBean,   getProducerDefaultName,   getSimpleWebBeanDefaultName,   isBeanHasEnterpriseMarker,   isComponentHasStereoType,   isConfiguredWebBeans,   isConstructureOk,   isContainsInterceptorMethod,   isDeploymentTypeEnabled,   isEnterpriseBean,   isManagedBean,   isManagedBeanClass,   isNamedExistOnStereoTypes,   isScopeEncloseOther,   isScopeTypeNormal
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.webbeans.util.WebBeansUtil Detail:
 public static  void addInjectedImplicitEventComponent(InjectionPoint injectionPoint) 
 public static  void addInjectedImplicitInstanceComponent(InjectionPoint injectionPoint) 
 public static Method checkAroundInvokeAnnotationCriterias(Class<?> clazz) 
    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.

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

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

 public static  void checkDecoratorResolverParams(Set<Type> apiTypes,
    Annotation qualifiers) 
 public static Annotation[] checkForNewQualifierForDeployment(Type type,
    Class<?> clazz,
    String name,
    Annotation[] annotations) 
    Check conditions for the new binding.
 public static  void checkForValidResources(Type type,
    Class<?> clazz,
    String name,
    Annotation[] annotations) 
    Check conditions for the resources.
 public static  void checkGenericType(Bean<?> bean) 
    Checks the generic type requirements.
 public static  void checkInjectedMethodParameterConditions(Method method,
    Class<?> clazz) 
 public static  void checkInterceptorResolverParams(Annotation interceptorBindings) 
 public static  void checkNullInstance(Object instance,
    Class<?> scopeType,
    String errorMessage) 
 public static  void checkNullable(Class<?> type,
    AbstractBean<?> component) 
 public static boolean checkObtainsInjectionPointConditions(InjectionPoint injectionPoint) 
    Returns true if instance injection point false otherwise.
 public static  void checkPassivationScope(AbstractBean<T> component,
    NormalScope scope) 
 public static  void checkProducerGenericType(Bean<?> bean,
    Member member) 
    Check producer method/field bean return type.
 public static  void checkProducerMethodDisposal(Method disposalMethod,
    String definedBeanClassName) 
    CheckProducerMethodDisposal.
 public static  void checkProducerMethodForDeployment(Method method,
    String parentImplClazzName) 
    Check producer method is ok for deployment.
 public static  void checkSerializableScopeType(Class<?> scopeType,
    boolean isSerializable,
    String errorMessage) 
 public static  void checkStereoTypeClass(Class<?> clazz) 
    Validates that given class obeys stereotype model defined by the specification.
 public static  void checkUnproxiableApiType(Bean<?> bean,
    Class<Annotation> scopeType) 
 public static  void configureInterceptorMethods(Interceptor<?> webBeansInterceptor,
    Class<?> clazz,
    Class<Annotation> annotation,
    boolean definedInInterceptorClass,
    boolean definedInMethod,
    List<InterceptorData> stack,
    Method annotatedInterceptorClassMethod,
    boolean isDefinedWithWebBeans) 
    Configures the interceptor stack of the web beans component.
 public static  void configureProducerSpecialization(AbstractBean<?> component,
    Method method,
    Class<?> superClass) 
    Configures the producer method specialization.
 public static  void configureSpecializations(Class<?> specializedClass) 
    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.

 public static  void configuredProducerSpecializedName(AbstractBean<?> component,
    Method method,
    Method superMethod) 
    Configures the name of the producer method for specializing the parent.
 public static ExtensionBean<T> createExtensionComponent(Class<T> clazz) 
    Creates a new extension bean.
 public static InstanceBean<T> createInstanceComponent(ParameterizedType instance,
    Class<T> clazz,
    Type injectedType,
    Annotation obtainsBindings) 
    Creates a new instance bean.
 public static NewBean<T> createNewComponent(Class<T> clazz) 
    New WebBeans component class.
 public static NewBean<T> createNewSimpleBeanComponent(ManagedBean<T> component) 
    Returns a new managed bean from given bean.
 public static EventBean<T> createObservableImplicitComponent(Class<T> returnType,
    Type eventType,
    Annotation annotations) 
    Creates a new event bean instance.
 public static Constructor<T> defineConstructor(Class<T> clazz) throws WebBeansConfigurationException 
    Defines applicable constructor.
 public static  void defineDecorators(Class<T> clazz) 
 public static  void defineInterceptors(Class<T> clazz) 
 public static GProcessAnnotatedType fireProcessAnnotatedTypeEvent(AnnotatedType<T> annotatedType) 
    Returns ProcessAnnotatedType event.
 public static GProcessInjectionTarget fireProcessInjectionTargetEvent(AbstractInjectionTargetBean<T> bean) 
    Returns ProcessInjectionTarget event.
 public static GProcessProducer fireProcessProducerEventForField(ProducerFieldBean<?> producerField,
    AnnotatedField<?> field) 
 public static GProcessProducer fireProcessProducerEventForMethod(ProducerMethodBean<?> producerMethod,
    AnnotatedMethod<?> method) 
 public static  void fireProcessProducerFieldBeanEvent(Map<?> annotatedFields) 
 public static  void fireProcessProducerMethodBeanEvent(Map<?> annotatedMethods) 
 public static Annotation[] getComponentStereoTypes(BaseBean<?> bean) 
    Returns bean stereotypes.
 public static ConversationBean getConversationComponent() 
    Returns new conversation bean instance.
 public static ClassLoader getCurrentClassLoader() 
    Gets current classloader with current thread.
 public static InjectionPointBean getInjectionPointComponent() 
    Returns a new injected point bean instance.
 public static List<InterceptorData> getInterceptorMethods(List<InterceptorData> stack,
    InterceptorType type) 
    Gets list of interceptors with the given type.
 public static BeanManagerBean getManagerComponent() 
    Creates a new manager bean instance.
 public static Annotation getMaxPrecedenceSteroTypeDeploymentType(BaseBean<?> component) 
 public static Bean<?> getMostSpecializedBean(BeanManager manager,
    Bean<?> component) 
 public static String getProducerDefaultName(String methodName) 
 public static String getSimpleWebBeanDefaultName(String clazzName) 
 public static boolean isBeanHasEnterpriseMarker(Object beanInstance) 
    Returns true if bean instance is an enterprise bean instance false otherwise.
 public static boolean isComponentHasStereoType(BaseBean<?> component) 
    Returns true if array contains the StereoType meta annotation
 public static Set<?> isConfiguredWebBeans(Class<?> clazz,
    boolean annotate) 
 public static boolean isConstructureOk(Class<?> clazz) throws WebBeansConfigurationException 
    Check that simple web beans class has compatible constructor.
 public static boolean isContainsInterceptorMethod(List<InterceptorData> stack,
    InterceptorType type) 
    Returns true if interceptor stack contains interceptor with given type.
 public static boolean isDeploymentTypeEnabled(Class<Annotation> deploymentType) 
 public static boolean isEnterpriseBean(AbstractBean<?> bean) 
    Returns true if bean is an enterprise bean, false otherwise.
 public static boolean isManagedBean(AbstractBean<?> component) 
 public static  void isManagedBeanClass(Class<?> clazz) 
    Return true if the given class is ok for manage bean conditions, false otherwise.
 public static boolean isNamedExistOnStereoTypes(BaseBean<?> bean) 
    Returns true if name exists,false otherwise.
 public static boolean isScopeEncloseOther(Class<Annotation> src,
    Class<Annotation> target) 
    Returns true if src scope encloses the target.
 public static boolean isScopeTypeNormal(Class<Annotation> scopeType)