org.jboss.weld.environment.se.Weld.loadExtensions()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(103)

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

Weld.loadExtensions介绍

暂无

代码示例

代码示例来源:origin: org.jboss.weld.se/weld-se

protected Iterable<Metadata<Extension>> getExtensions() {
  Set<Metadata<Extension>> result = new HashSet<Metadata<Extension>>();
  if (discoveryEnabled) {
    Iterables.addAll(result, loadExtensions(resourceLoader));
  }
  if (!extensions.isEmpty()) {
    result.addAll(extensions);
  }
  // Ensure that WeldSEBeanRegistrant is present
  WeldSEBeanRegistrant weldSEBeanRegistrant = null;
  for (Metadata<Extension> metadata : result) {
    if (metadata.getValue().getClass().getName().equals(WeldSEBeanRegistrant.class.getName())) {
      weldSEBeanRegistrant = (WeldSEBeanRegistrant) metadata.getValue();
      break;
    }
  }
  if (weldSEBeanRegistrant == null) {
    try {
      weldSEBeanRegistrant = SecurityActions.newInstance(WeldSEBeanRegistrant.class);
      result.add(new MetadataImpl<Extension>(weldSEBeanRegistrant, SYNTHETIC_LOCATION_PREFIX + WeldSEBeanRegistrant.class.getName()));
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }
  if (isEnabled(DEV_MODE_SYSTEM_PROPERTY, false)) {
    // The development mode is enabled - register the Probe extension
    result.add(new MetadataImpl<Extension>(DevelopmentMode.getProbeExtension(resourceLoader), "N/A"));
  }
  return result;
}

代码示例来源:origin: weld/core

protected Iterable<Metadata<Extension>> getExtensions() {
  Set<Metadata<Extension>> result = new HashSet<Metadata<Extension>>();
  if (discoveryEnabled) {
    Iterables.addAll(result, loadExtensions(resourceLoader));

代码示例来源:origin: weld/core

protected Iterable<Metadata<Extension>> getExtensions() {
  Set<Metadata<Extension>> result = new HashSet<Metadata<Extension>>();
  if (discoveryEnabled) {
    Iterables.addAll(result, loadExtensions(resourceLoader));

代码示例来源:origin: org.jboss.weld.se/weld-se-shaded

protected Iterable<Metadata<Extension>> getExtensions() {
  Set<Metadata<Extension>> result = new HashSet<Metadata<Extension>>();
  if (discoveryEnabled) {
    Iterables.addAll(result, loadExtensions(resourceLoader));

相关文章