热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.webbeans.config.WebBeansContext.getAlternativesManager()方法的使用及代码示例

本文整理了Java中org.apache.webbeans.config.WebBeansContext.getAlternativesManager()方法的一些代码

本文整理了Java中org.apache.webbeans.config.WebBeansContext.getAlternativesManager()方法的一些代码示例,展示了WebBeansContext.getAlternativesManager()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebBeansContext.getAlternativesManager()方法的具体详情如下:
包路径:org.apache.webbeans.config.WebBeansContext
类名称:WebBeansContext
方法名:getAlternativesManager

WebBeansContext.getAlternativesManager介绍

暂无

代码示例

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

private boolean isEnabledAlternative(AnnotatedType at, Set> stereotypes)
{
AlternativesManager alternativesManager = webBeansContext.getAlternativesManager();
if (alternativesManager.isAlternative(at.getJavaClass(), stereotypes))
{
return true;
}
if (stereotypes != null && !stereotypes.isEmpty() && at.getAnnotations(Priority.class) != null)
{
for (Class stereotype : stereotypes)
{
if (alternativesManager.isAlternativeStereotype(stereotype))
{
return true;
}
}
}
return false;
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

public SpecializationUtil(WebBeansContext webBeansContext)
{
this.webBeansCOntext= webBeansContext;
this.alternativesManager = webBeansContext.getAlternativesManager();
this.webBeansUtil = webBeansContext.getWebBeansUtil();
this.ejbPlugin = webBeansContext.getPluginLoader().getEjbPlugin();
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

public boolean isBeanEnabled(AnnotatedType at, Set> stereotypes)
{
boolean isAlternative = isAlternative(at, stereotypes);
if (!isAlternative)
{
return true;
}
AlternativesManager alternativesManager = webBeansContext.getAlternativesManager();
if (alternativesManager.isAlternative(at.getJavaClass(), stereotypes))
{
return true;
}
if (stereotypes != null && !stereotypes.isEmpty() && at.getAnnotation(Priority.class) != null)
{
for (Class stereotype : stereotypes)
{
if (alternativesManager.isAlternativeStereotype(stereotype))
{
return true;
}
}
}
return false;
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

/**
* Creates a new injection resolve for given bean manager.
*
* @param webBeansContext WebBeansContext
*/
public InjectionResolver(WebBeansContext webBeansContext)
{
this.webBeansCOntext= webBeansContext;
alternativesManager = webBeansContext.getAlternativesManager();
startup = true;
fastMatching = false;
instanceBean = webBeansContext.getWebBeansUtil().getInstanceBean();
eventBean = webBeansContext.getWebBeansUtil().getEventBean();
}

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

Set> xmlCOnfiguredAlternatives= webBeansContext.getAlternativesManager().getXmlConfiguredAlternatives();
InjectionResolver injectiOnResolver= webBeansContext.getBeanManagerImpl().getInjectionResolver();

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

private void configureAlternatives(URL bdaLocation, List alternatives, boolean isStereotype)
AlternativesManager manager = webBeansContext.getAlternativesManager();
AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

private void registerAlternativesDecoratorsAndInterceptorsWithPriority(List> annotatedTypes)
AlternativesManager alternativesManager = webBeansContext.getAlternativesManager();

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

List> interceptors = interceptorsManager.getPrioritizedInterceptors();
List> decorators = decoratorsManager.getPrioritizedDecorators();
List> alternatives = webBeansContext.getAlternativesManager().getPrioritizedAlternatives();

代码示例来源:origin: org.apache.openejb/openejb-core

final AlternativesManager alternativesManager = webBeansContext.getAlternativesManager();
final DecoratorsManager decoratorsManager = webBeansContext.getDecoratorsManager();
final InterceptorsManager interceptorsManager = webBeansContext.getInterceptorsManager();

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

if (bean.isAlternative() && !webBeansContext.getAlternativesManager().isAlternative(bean)
&& !(bean instanceof Prioritized) && !bean.getBeanClass().isAnnotationPresent(Priority.class))
webBeansContext.getAlternativesManager().addPrioritizedAlternativeBean(bean);

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

producer.setEnabled(isAlternative(parent.getAnnotatedType(), parent.getStereotypes()) && webBeansContext.getAlternativesManager().isAlternative(parent) ||
isAlternative(parent.getAnnotatedType(), stereotypes) && webBeansContext.getAlternativesManager().isAlternative(producer));

代码示例来源:origin: org.apache.openwebbeans/openwebbeans-impl

if (priority != null && !webBeansContext.getAlternativesManager()
.isAlternative(annotatedType.getJavaClass(), Collections.>emptySet()))
webBeansContext.getAlternativesManager().addPriorityClazzAlternative(annotatedType.getJavaClass(), priority);

推荐阅读
author-avatar
pingyuki
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有