Package org.aspectj.apache.bcel.util

Examples of org.aspectj.apache.bcel.util.ClassQueue


  /**
   * Get all interfaces implemented by this JavaClass (transitively).
   */
  public JavaClass[] getAllInterfaces() {
    ClassQueue  queue = new ClassQueue();
    ClassVector vec   = new ClassVector();
   
    queue.enqueue(this);
   
    while(!queue.empty()) {
      JavaClass clazz = queue.dequeue();
     
      JavaClass   souper     = clazz.getSuperClass();
      JavaClass[] interfaces = clazz.getInterfaces();
     
      if(clazz.isInterface()) {
  vec.addElement(clazz);
      } else {
  if(souper != null) {
    queue.enqueue(souper);
  }
      }
     
      for(int i = 0; i < interfaces.length; i++) {
  queue.enqueue(interfaces[i]);
      }
    }
     
    return vec.toArray();
  }
View Full Code Here

TOP

Related Classes of org.aspectj.apache.bcel.util.ClassQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.