Refine search
private int getPriority(Handler<?> handler) { Bean<?> bean = handler.getBean(); if (bean instanceof AbstractClassBean) { AbstractClassBean<?> classBean = (AbstractClassBean<?>) bean; Object priority = classBean.getAnnotated().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { return annotationApi.getPriority(priority); } } return 0; }
ResourceLoader resourceLoader = registry.get(ResourceLoader.class); if (resourceLoader == null) { resourceLoader = DefaultResourceLoader.INSTANCE; registry.add(ResourceLoader.class, resourceLoader); services.addAll(deploymentServices.entrySet()); services.addAll(registry.entrySet()); services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader)); services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(resourceLoader)); services.add(AnnotationApiAbstraction.class, new AnnotationApiAbstraction(resourceLoader)); this.beanManager = BeanManagerImpl.newManager(deploymentManager, BeanDeployments.getFinalId(beanDeploymentArchive.getId(), services.get(WeldConfiguration.class).getStringProperty(ROLLING_UPGRADES_ID_DELIMITER)), services); services.add(InjectionTargetService.class, new InjectionTargetService(beanManager)); beanDeployer = new BeanDeployer(beanManager, deploymentServices); beanManager.getServices().get(SpecializationAndEnablementRegistry.class).registerEnvironment(beanManager, beanDeployer.getEnvironment(), additionalBeanArchive); beanManager.addBean(new BeanManagerBean(beanManager)); beanManager.addBean(new BeanManagerImplBean(beanManager));
public AnnotationApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.PRIORITY_ANNOTATION_CLASS = annotationTypeForName("javax.annotation.Priority"); Method method = null; if (!PRIORITY_ANNOTATION_CLASS.equals(DummyAnnotation.class)) { try { method = PRIORITY_ANNOTATION_CLASS.getMethod("value"); } catch (Throwable e) { throw new WeldException(e); } } this.PRIORITY_VALUE = method; }
AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); JsonObjectBuilder deploymentBuilder = Json.objectBuilder(); deploymentBuilder.add(CONTEXT_ID, beanManager.getContextId()); ModuleEnablement enablement = beanDeploymentArchivesMap.get(bda).getEnabled(); JsonArrayBuilder interceptors = Json.arrayBuilder(); for (Class<?> interceptor : Components.getSortedProbeComponetCandidates(enablement.getInterceptors())) { builder.add(PRIORITY, annotationApi.getPriority(priority)); builder.add(PRIORITY, annotationApi.getPriority(priority)); Object priority = clazz.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { builder.add(PRIORITY, annotationApi.getPriority(priority)); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); for (ConfigurationKey key : Reports.getSortedConfigurationKeys()) { Object defaultValue = key.getDefaultValue();
if (BeanKind.INTERCEPTOR.equals(kind) || BeanKind.DECORATOR.equals(kind) || bean.isAlternative()) { JsonObjectBuilder enablementBuilder = Json.objectBuilder(); AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); Object priority = bean.getBeanClass().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { int priorityValue = annotationApi.getPriority(priority); enablementBuilder.add(PRIORITY, priorityValue); enablementBuilder.add(PRIORITY_RANGE, Components.PriorityRange.of(priorityValue).toString()); Collection<BeanManagerImpl> beanManagers = Container.instance(beanManager).beanDeploymentArchives().values(); for (BeanManagerImpl manager : beanManagers) { ModuleEnablement enablement = manager.getEnabled(); if ((BeanKind.INTERCEPTOR.equals(kind) && enablement.isInterceptorEnabled(bean.getBeanClass())) || (BeanKind.DECORATOR.equals(kind) && enablement.isDecoratorEnabled(bean.getBeanClass())) || isSelectedAlternative(enablement, bean)) { bdasBuilder.add(createSimpleBdaJson(manager.getId()));
AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); JsonObjectBuilder deploymentBuilder = Json.objectBuilder(); deploymentBuilder.add(CONTEXT_ID, beanManager.getContextId()); ModuleEnablement enablement = beanDeploymentArchivesMap.get(bda).getEnabled(); JsonArrayBuilder interceptors = Json.arrayBuilder(); for (Class<?> interceptor : Components.getSortedProbeComponetCandidates(enablement.getInterceptors())) { builder.add(PRIORITY, annotationApi.getPriority(priority)); builder.add(PRIORITY, annotationApi.getPriority(priority)); Object priority = clazz.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { builder.add(PRIORITY, annotationApi.getPriority(priority)); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); for (ConfigurationKey key : Reports.getSortedConfigurationKeys()) { Object defaultValue = key.getDefaultValue();
if (BeanKind.INTERCEPTOR.equals(kind) || BeanKind.DECORATOR.equals(kind) || bean.isAlternative()) { JsonObjectBuilder enablementBuilder = Json.objectBuilder(); AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); Object priority = bean.getBeanClass().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { int priorityValue = annotationApi.getPriority(priority); enablementBuilder.add(PRIORITY, priorityValue); enablementBuilder.add(PRIORITY_RANGE, Components.PriorityRange.of(priorityValue).toString()); Collection<BeanManagerImpl> beanManagers = Container.instance(beanManager).beanDeploymentArchives().values(); for (BeanManagerImpl manager : beanManagers) { ModuleEnablement enablement = manager.getEnabled(); if ((BeanKind.INTERCEPTOR.equals(kind) && enablement.isInterceptorEnabled(bean.getBeanClass())) || (BeanKind.DECORATOR.equals(kind) && enablement.isDecoratorEnabled(bean.getBeanClass())) || isSelectedAlternative(enablement, bean)) { bdasBuilder.add(createSimpleBdaJson(manager.getId()));
ResourceLoader resourceLoader = registry.get(ResourceLoader.class); if (resourceLoader == null) { resourceLoader = DefaultResourceLoader.INSTANCE; registry.add(ResourceLoader.class, resourceLoader); services.addAll(deploymentServices.entrySet()); services.addAll(registry.entrySet()); services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader)); services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(resourceLoader)); services.add(AnnotationApiAbstraction.class, new AnnotationApiAbstraction(resourceLoader)); this.beanManager = BeanManagerImpl.newManager(deploymentManager, BeanDeployments.getFinalId(beanDeploymentArchive.getId(), services.get(WeldConfiguration.class).getStringProperty(ROLLING_UPGRADES_ID_DELIMITER)), services); services.add(InjectionTargetService.class, new InjectionTargetService(beanManager)); beanDeployer = new BeanDeployer(beanManager, deploymentServices); beanManager.getServices().get(SpecializationAndEnablementRegistry.class).registerEnvironment(beanManager, beanDeployer.getEnvironment(), additionalBeanArchive); beanManager.addBean(new BeanManagerBean(beanManager)); beanManager.addBean(new BeanManagerImplBean(beanManager));
AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); JsonObjectBuilder deploymentBuilder = Json.objectBuilder(); deploymentBuilder.add(CONTEXT_ID, beanManager.getContextId()); ModuleEnablement enablement = beanDeploymentArchivesMap.get(bda).getEnabled(); JsonArrayBuilder interceptors = Json.arrayBuilder(); for (Class<?> interceptor : Components.getSortedProbeComponetCandidates(enablement.getInterceptors())) { builder.add(PRIORITY, annotationApi.getPriority(priority)); builder.add(PRIORITY, annotationApi.getPriority(priority)); Object priority = clazz.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { builder.add(PRIORITY, annotationApi.getPriority(priority)); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); for (ConfigurationKey key : Reports.getSortedConfigurationKeys()) { Object defaultValue = key.getDefaultValue();
if (BeanKind.INTERCEPTOR.equals(kind) || BeanKind.DECORATOR.equals(kind) || bean.isAlternative()) { JsonObjectBuilder enablementBuilder = Json.objectBuilder(); AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); Object priority = bean.getBeanClass().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { int priorityValue = annotationApi.getPriority(priority); enablementBuilder.add(PRIORITY, priorityValue); enablementBuilder.add(PRIORITY_RANGE, Components.PriorityRange.of(priorityValue).toString()); Collection<BeanManagerImpl> beanManagers = Container.instance(beanManager).beanDeploymentArchives().values(); for (BeanManagerImpl manager : beanManagers) { ModuleEnablement enablement = manager.getEnabled(); if ((BeanKind.INTERCEPTOR.equals(kind) && enablement.isInterceptorEnabled(bean.getBeanClass())) || (BeanKind.DECORATOR.equals(kind) && enablement.isDecoratorEnabled(bean.getBeanClass())) || isSelectedAlternative(enablement, bean)) { bdasBuilder.add(createSimpleBdaJson(manager.getId()));
private void processPriority(AnnotatedType<?> type) { Object priority = type.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { Integer value = annotationApi.getPriority(priority); if (value != null) { if (type.isAnnotationPresent(Interceptor.class)) { globalEnablementBuilder.addInterceptor(type.getJavaClass(), value); } else if (type.isAnnotationPresent(Decorator.class)) { globalEnablementBuilder.addDecorator(type.getJavaClass(), value); } else { /* * An alternative may be given a priority for the application by placing the @Priority annotation on the bean * class that declares the producer method, field or resource. */ globalEnablementBuilder.addAlternative(type.getJavaClass(), value); } } } }
public AnnotationApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.PRIORITY_ANNOTATION_CLASS = annotationTypeForName("javax.annotation.Priority"); Method method = null; if (!PRIORITY_ANNOTATION_CLASS.equals(DummyAnnotation.class)) { try { method = PRIORITY_ANNOTATION_CLASS.getMethod("value"); } catch (Throwable e) { throw new WeldException(e); } } this.PRIORITY_VALUE = method; }
ResourceLoader resourceLoader = registry.get(ResourceLoader.class); if (resourceLoader == null) { resourceLoader = DefaultResourceLoader.INSTANCE; registry.add(ResourceLoader.class, resourceLoader); services.addAll(deploymentServices.entrySet()); services.addAll(registry.entrySet()); services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader)); services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(resourceLoader)); services.add(AnnotationApiAbstraction.class, new AnnotationApiAbstraction(resourceLoader)); this.beanManager = BeanManagerImpl.newManager(deploymentManager, BeanDeployments.getFinalId(beanDeploymentArchive.getId(), services.get(WeldConfiguration.class).getStringProperty(ROLLING_UPGRADES_ID_DELIMITER)), services); services.add(InjectionTargetService.class, new InjectionTargetService(beanManager)); beanDeployer = new BeanDeployer(beanManager, deploymentServices); beanManager.getServices().get(SpecializationAndEnablementRegistry.class).registerEnvironment(beanManager, beanDeployer.getEnvironment(), additionalBeanArchive); beanManager.addBean(new BeanManagerBean(beanManager)); beanManager.addBean(new BeanManagerImplBean(beanManager));
AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); JsonObjectBuilder deploymentBuilder = Json.objectBuilder(); deploymentBuilder.add(CONTEXT_ID, beanManager.getContextId()); ModuleEnablement enablement = beanDeploymentArchivesMap.get(bda).getEnabled(); JsonArrayBuilder interceptors = Json.arrayBuilder(); for (Class<?> interceptor : Components.getSortedProbeComponetCandidates(enablement.getInterceptors())) { builder.add(PRIORITY, annotationApi.getPriority(priority)); builder.add(PRIORITY, annotationApi.getPriority(priority)); Object priority = clazz.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { builder.add(PRIORITY, annotationApi.getPriority(priority)); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); for (ConfigurationKey key : Reports.getSortedConfigurationKeys()) { Object defaultValue = key.getDefaultValue();
if (BeanKind.INTERCEPTOR.equals(kind) || BeanKind.DECORATOR.equals(kind) || bean.isAlternative()) { JsonObjectBuilder enablementBuilder = Json.objectBuilder(); AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); Object priority = bean.getBeanClass().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { int priorityValue = annotationApi.getPriority(priority); enablementBuilder.add(PRIORITY, priorityValue); enablementBuilder.add(PRIORITY_RANGE, Components.PriorityRange.of(priorityValue).toString()); Collection<BeanManagerImpl> beanManagers = Container.instance(beanManager).beanDeploymentArchives().values(); for (BeanManagerImpl manager : beanManagers) { ModuleEnablement enablement = manager.getEnabled(); if ((BeanKind.INTERCEPTOR.equals(kind) && enablement.isInterceptorEnabled(bean.getBeanClass())) || (BeanKind.DECORATOR.equals(kind) && enablement.isDecoratorEnabled(bean.getBeanClass())) || isSelectedAlternative(enablement, bean)) { bdasBuilder.add(createSimpleBdaJson(manager.getId()));
private void processPriority(AnnotatedType<?> type) { Object priority = type.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { Integer value = annotationApi.getPriority(priority); if (value != null) { if (type.isAnnotationPresent(Interceptor.class)) { globalEnablementBuilder.addInterceptor(type.getJavaClass(), value); } else if (type.isAnnotationPresent(Decorator.class)) { globalEnablementBuilder.addDecorator(type.getJavaClass(), value); } else { /* * An alternative may be given a priority for the application by placing the @Priority annotation on the bean * class that declares the producer method, field or resource. */ globalEnablementBuilder.addAlternative(type.getJavaClass(), value); } } } }
public AnnotationApiAbstraction(ResourceLoader resourceLoader) { super(resourceLoader); this.PRIORITY_ANNOTATION_CLASS = annotationTypeForName("javax.annotation.Priority"); Method method = null; if (!PRIORITY_ANNOTATION_CLASS.equals(DummyAnnotation.class)) { try { method = PRIORITY_ANNOTATION_CLASS.getMethod("value"); } catch (Throwable e) { throw new WeldException(e); } } this.PRIORITY_VALUE = method; }
ResourceLoader resourceLoader = registry.get(ResourceLoader.class); if (resourceLoader == null) { resourceLoader = DefaultResourceLoader.INSTANCE; registry.add(ResourceLoader.class, resourceLoader); services.addAll(deploymentServices.entrySet()); services.addAll(registry.entrySet()); services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader)); services.add(InterceptorsApiAbstraction.class, new InterceptorsApiAbstraction(resourceLoader)); services.add(AnnotationApiAbstraction.class, new AnnotationApiAbstraction(resourceLoader)); this.beanManager = BeanManagerImpl.newManager(deploymentManager, BeanDeployments.getFinalId(beanDeploymentArchive.getId(), services.get(WeldConfiguration.class).getStringProperty(ROLLING_UPGRADES_ID_DELIMITER)), services); services.add(InjectionTargetService.class, new InjectionTargetService(beanManager)); beanDeployer = new BeanDeployer(beanManager, deploymentServices); beanManager.getServices().get(SpecializationAndEnablementRegistry.class).registerEnvironment(beanManager, beanDeployer.getEnvironment(), additionalBeanArchive); beanManager.addBean(new BeanManagerBean(beanManager)); beanManager.addBean(new BeanManagerImplBean(beanManager));
AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); JsonObjectBuilder deploymentBuilder = Json.objectBuilder(); deploymentBuilder.add(CONTEXT_ID, beanManager.getContextId()); ModuleEnablement enablement = beanDeploymentArchivesMap.get(bda).getEnabled(); JsonArrayBuilder interceptors = Json.arrayBuilder(); for (Class<?> interceptor : Components.getSortedProbeComponetCandidates(enablement.getInterceptors())) { builder.add(PRIORITY, annotationApi.getPriority(priority)); builder.add(PRIORITY, annotationApi.getPriority(priority)); Object priority = clazz.getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { builder.add(PRIORITY, annotationApi.getPriority(priority)); WeldConfiguration configuration = beanManager.getServices().get(WeldConfiguration.class); for (ConfigurationKey key : Reports.getSortedConfigurationKeys()) { Object defaultValue = key.getDefaultValue();
if (BeanKind.INTERCEPTOR.equals(kind) || BeanKind.DECORATOR.equals(kind) || bean.isAlternative()) { JsonObjectBuilder enablementBuilder = Json.objectBuilder(); AnnotationApiAbstraction annotationApi = beanManager.getServices().get(AnnotationApiAbstraction.class); Object priority = bean.getBeanClass().getAnnotation(annotationApi.PRIORITY_ANNOTATION_CLASS); if (priority != null) { int priorityValue = annotationApi.getPriority(priority); enablementBuilder.add(PRIORITY, priorityValue); enablementBuilder.add(PRIORITY_RANGE, Components.PriorityRange.of(priorityValue).toString()); Collection<BeanManagerImpl> beanManagers = Container.instance(beanManager).beanDeploymentArchives().values(); for (BeanManagerImpl manager : beanManagers) { ModuleEnablement enablement = manager.getEnabled(); if ((BeanKind.INTERCEPTOR.equals(kind) && enablement.isInterceptorEnabled(bean.getBeanClass())) || (BeanKind.DECORATOR.equals(kind) && enablement.isDecoratorEnabled(bean.getBeanClass())) || isSelectedAlternative(enablement, bean)) { bdasBuilder.add(createSimpleBdaJson(manager.getId()));