org.eclipse.core.internal.runtime.AdapterManager.computeInterfaceOrder()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(66)

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

AdapterManager.computeInterfaceOrder介绍

暂无

代码示例

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common

private void computeInterfaceOrder(Class<?>[] interfaces, Collection<Class<?>> classes, Set<Class<?>> seen) {
  List<Class<?>> newInterfaces = new ArrayList<Class<?>>(interfaces.length);
  for (int i = 0; i < interfaces.length; i++) {
    Class<?> interfac = interfaces[i];
    if (seen.add(interfac)) {
      //note we cannot recurse here without changing the resulting interface order
      classes.add(interfac);
      newInterfaces.add(interfac);
    }
  }
  for (Class<?> clazz : newInterfaces)
    computeInterfaceOrder(clazz.getInterfaces(), classes, seen);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common

private void computeInterfaceOrder(Class<?>[] interfaces, Collection<Class<?>> classes, Set<Class<?>> seen) {
  List<Class<?>> newInterfaces = new ArrayList<>(interfaces.length);
  for (int i = 0; i < interfaces.length; i++) {
    Class<?> interfac = interfaces[i];
    if (seen.add(interfac)) {
      //note we cannot recurse here without changing the resulting interface order
      classes.add(interfac);
      newInterfaces.add(interfac);
    }
  }
  for (Class<?> clazz : newInterfaces)
    computeInterfaceOrder(clazz.getInterfaces(), classes, seen);
}

代码示例来源:origin: org.eclipse.equinox/common

private void computeInterfaceOrder(Class[] interfaces, Collection classes, Set seen) {
  List newInterfaces = new ArrayList(interfaces.length);
  for (int i = 0; i < interfaces.length; i++) {
    Class interfac = interfaces[i];
    if (seen.add(interfac)) {
      //note we cannot recurse here without changing the resulting interface order
      classes.add(interfac);
      newInterfaces.add(interfac);
    }
  }
  for (Iterator it = newInterfaces.iterator(); it.hasNext();)
    computeInterfaceOrder(((Class) it.next()).getInterfaces(), classes, seen);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common

private void computeInterfaceOrder(Class[] interfaces, Collection classes, Set seen) {
  List newInterfaces = new ArrayList(interfaces.length);
  for (int i = 0; i < interfaces.length; i++) {
    Class interfac = interfaces[i];
    if (seen.add(interfac)) {
      //note we cannot recurse here without changing the resulting interface order
      classes.add(interfac);
      newInterfaces.add(interfac);
    }
  }
  for (Iterator it = newInterfaces.iterator(); it.hasNext();)
    computeInterfaceOrder(((Class) it.next()).getInterfaces(), classes, seen);
}

代码示例来源:origin: org.eclipse.equinox/common

/**
 * Computes the super-type search order starting with <code>adaptable</code>. 
 * The search order is defined in this class' comment.
 */
private Class[] doComputeClassOrder(Class adaptable) {
  List classes = new ArrayList();
  Class clazz = adaptable;
  Set seen = new HashSet(4);
  //first traverse class hierarchy
  while (clazz != null) {
    classes.add(clazz);
    clazz = clazz.getSuperclass();
  }
  //now traverse interface hierarchy for each class
  Class[] classHierarchy = (Class[]) classes.toArray(new Class[classes.size()]);
  for (int i = 0; i < classHierarchy.length; i++)
    computeInterfaceOrder(classHierarchy[i].getInterfaces(), classes, seen);
  return (Class[]) classes.toArray(new Class[classes.size()]);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.common

/**
 * Computes the super-type search order starting with <code>adaptable</code>. 
 * The search order is defined in this class' comment.
 */
private Class<?>[] doComputeClassOrder(Class<?> adaptable) {
  List<Class<?>> classes = new ArrayList<Class<?>>();
  Class<?> clazz = adaptable;
  Set<Class<?>> seen = new HashSet<Class<?>>(4);
  //first traverse class hierarchy
  while (clazz != null) {
    classes.add(clazz);
    clazz = clazz.getSuperclass();
  }
  //now traverse interface hierarchy for each class
  Class<?>[] classHierarchy = classes.toArray(new Class[classes.size()]);
  for (int i = 0; i < classHierarchy.length; i++)
    computeInterfaceOrder(classHierarchy[i].getInterfaces(), classes, seen);
  return classes.toArray(new Class[classes.size()]);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.equinox.common

/**
 * Computes the super-type search order starting with <code>adaptable</code>. 
 * The search order is defined in this class' comment.
 */
private Class<?>[] doComputeClassOrder(Class<?> adaptable) {
  List<Class<?>> classes = new ArrayList<>();
  Class<?> clazz = adaptable;
  Set<Class<?>> seen = new HashSet<>(4);
  //first traverse class hierarchy
  while (clazz != null) {
    classes.add(clazz);
    clazz = clazz.getSuperclass();
  }
  //now traverse interface hierarchy for each class
  Class<?>[] classHierarchy = classes.toArray(new Class[classes.size()]);
  for (int i = 0; i < classHierarchy.length; i++)
    computeInterfaceOrder(classHierarchy[i].getInterfaces(), classes, seen);
  return classes.toArray(new Class[classes.size()]);
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.equinox.common

/**
 * Computes the super-type search order starting with <code>adaptable</code>. 
 * The search order is defined in this class' comment.
 */
private Class[] doComputeClassOrder(Class adaptable) {
  List classes = new ArrayList();
  Class clazz = adaptable;
  Set seen = new HashSet(4);
  //first traverse class hierarchy
  while (clazz != null) {
    classes.add(clazz);
    clazz = clazz.getSuperclass();
  }
  //now traverse interface hierarchy for each class
  Class[] classHierarchy = (Class[]) classes.toArray(new Class[classes.size()]);
  for (int i = 0; i < classHierarchy.length; i++)
    computeInterfaceOrder(classHierarchy[i].getInterfaces(), classes, seen);
  return (Class[]) classes.toArray(new Class[classes.size()]);
}

相关文章