Search in sources :

Example 6 with ClassType

use of com.sun.jdi.ClassType in project jdk8u_jdk by JetBrains.

the class InvokableTypeImpl method allMethods.

/**
     * Shared implementation of {@linkplain ClassType#allMethods()} and
     * {@linkplain InterfaceType#allMethods()}
     * @return A list of all methods (recursively)
     */
public final List<Method> allMethods() {
    ArrayList<Method> list = new ArrayList<>(methods());
    ClassType clazz = superclass();
    while (clazz != null) {
        list.addAll(clazz.methods());
        clazz = clazz.superclass();
    }
    /*
         * Avoid duplicate checking on each method by iterating through
         * duplicate-free allInterfaces() rather than recursing
         */
    for (InterfaceType interfaze : getAllInterfaces()) {
        list.addAll(interfaze.methods());
    }
    return list;
}
Also used : InterfaceType(com.sun.jdi.InterfaceType) ArrayList(java.util.ArrayList) Method(com.sun.jdi.Method) ClassType(com.sun.jdi.ClassType)

Aggregations

ClassType (com.sun.jdi.ClassType)6 InterfaceType (com.sun.jdi.InterfaceType)3 Method (com.sun.jdi.Method)3 Type (com.sun.jdi.Type)2 ArrayList (java.util.ArrayList)2 DebugProcessImpl (com.intellij.debugger.engine.DebugProcessImpl)1 EvaluateException (com.intellij.debugger.engine.evaluation.EvaluateException)1 ClassObject (com.intellij.openapi.compiler.ClassObject)1 ArrayType (com.sun.jdi.ArrayType)1 BooleanType (com.sun.jdi.BooleanType)1 ClassNotLoadedException (com.sun.jdi.ClassNotLoadedException)1 Field (com.sun.jdi.Field)1 InvocationException (com.sun.jdi.InvocationException)1 ObjectReference (com.sun.jdi.ObjectReference)1 PrimitiveType (com.sun.jdi.PrimitiveType)1 ReferenceType (com.sun.jdi.ReferenceType)1 Nullable (org.jetbrains.annotations.Nullable)1