org.jvnet.hk2.config.DomDocument.addXRef()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(89)

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

DomDocument.addXRef介绍

暂无

代码示例

代码示例来源:origin: javaee/glassfish

/**
 * probably a bit slow, calculates all the @Configured interfaces subclassing, useful
 * to find all possible subclasses of a type.
 * 
 * @throws ClassNotFoundException
 */
private void initXRef() throws ClassNotFoundException {
  // force initialization of all the config models.
  for (ServiceHandle<?> i : habitat.getAllServiceHandles(ConfigInjector.class)) {
    buildModel((ActiveDescriptor<? extends ConfigInjector>) i.getActiveDescriptor());
  }
  for (ConfigModel cm : models.values()) {
    Class targetType = cm.classLoaderHolder.loadClass(cm.targetTypeName);
    do {
      Class[] intfs = targetType.getInterfaces();
      for (Class intf : intfs) {
        if (intf.isAnnotationPresent(Configured.class)) {
          addXRef(intf, cm);
        }
      }
      targetType = targetType.getSuperclass();
    } while (targetType!=null);
  }
}

代码示例来源:origin: org.glassfish.hk2/config

/**
 * probably a bit slow, calculates all the @Configured interfaces subclassing, useful
 * to find all possible subclasses of a type.
 * 
 * @throws ClassNotFoundException
 */
private void initXRef() throws ClassNotFoundException {
  // force initialization of all the config models.
  for (Inhabitant<? extends ConfigInjector> i : habitat.getInhabitants(ConfigInjector.class)) {
    buildModel(i);
  }
  for (ConfigModel cm : models.values()) {
    Class targetType = cm.classLoaderHolder.get().loadClass(cm.targetTypeName);
    do {
      Class[] intfs = targetType.getInterfaces();
      for (Class intf : intfs) {
        if (intf.isAnnotationPresent(Configured.class)) {
          addXRef(intf, cm);
        }
      }
      targetType = targetType.getSuperclass();
    } while (targetType!=null);
  }
}

代码示例来源:origin: org.glassfish.hk2/hk2-config

/**
 * probably a bit slow, calculates all the @Configured interfaces subclassing, useful
 * to find all possible subclasses of a type.
 * 
 * @throws ClassNotFoundException
 */
private void initXRef() throws ClassNotFoundException {
  // force initialization of all the config models.
  for (ServiceHandle<?> i : habitat.getAllServiceHandles(ConfigInjector.class)) {
    buildModel((ActiveDescriptor<? extends ConfigInjector>) i.getActiveDescriptor());
  }
  for (ConfigModel cm : models.values()) {
    Class targetType = cm.classLoaderHolder.loadClass(cm.targetTypeName);
    do {
      Class[] intfs = targetType.getInterfaces();
      for (Class intf : intfs) {
        if (intf.isAnnotationPresent(Configured.class)) {
          addXRef(intf, cm);
        }
      }
      targetType = targetType.getSuperclass();
    } while (targetType!=null);
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

/**
 * probably a bit slow, calculates all the @Configured interfaces subclassing, useful
 * to find all possible subclasses of a type.
 * 
 * @throws ClassNotFoundException
 */
private void initXRef() throws ClassNotFoundException {
  // force initialization of all the config models.
  for (ServiceHandle<?> i : habitat.getAllServiceHandles(ConfigInjector.class)) {
    buildModel((ActiveDescriptor<? extends ConfigInjector>) i.getActiveDescriptor());
  }
  for (ConfigModel cm : models.values()) {
    Class targetType = cm.classLoaderHolder.loadClass(cm.targetTypeName);
    do {
      Class[] intfs = targetType.getInterfaces();
      for (Class intf : intfs) {
        if (intf.isAnnotationPresent(Configured.class)) {
          addXRef(intf, cm);
        }
      }
      targetType = targetType.getSuperclass();
    } while (targetType!=null);
  }
}

相关文章