作者:pingyuki | 来源:互联网 | 2023-10-13 11:35
本文整理了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 extends Annotation> 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 extends Annotation> 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);