Missing invokeMethod in com.sun.jdi.InterfaceType

Oracle Javadocs for Java 8 states that InterfaceType has a method named invokeMethod.

However, when I test my system, I do not see such a method in the interface:

kshitiz:/usr/lib/jvm/jdk1.8.0/lib$ javap -classpath tools.jar com.sun.jdi.InterfaceType
Compiled from "InterfaceType.java"
public interface com.sun.jdi.InterfaceType extends com.sun.jdi.ReferenceType {
  public abstract java.util.List<com.sun.jdi.InterfaceType> superinterfaces();
  public abstract java.util.List<com.sun.jdi.InterfaceType> subinterfaces();
  public abstract java.util.List<com.sun.jdi.ClassType> implementors();
}

Check Java version:

kshitiz:/usr/lib/jvm/jdk1.8.0/lib$ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

What am I missing?

+4
source share
1 answer

After testing different versions, it seems that Oracle has added this method to a small update u40. Versions below that do not have this method.

In JDK 1.8.0_40:

Compiled from "InterfaceType.java"
public interface com.sun.jdi.InterfaceType extends com.sun.jdi.ReferenceType {
  public abstract java.util.List<com.sun.jdi.InterfaceType> superinterfaces();
  public abstract java.util.List<com.sun.jdi.InterfaceType> subinterfaces();
  public abstract java.util.List<com.sun.jdi.ClassType> implementors();
  public com.sun.jdi.Value invokeMethod(com.sun.jdi.ThreadReference, com.sun.jdi.Method, java.util.List<? extends com.sun.jdi.Value>, int) throws com.sun.jdi.InvalidTypeException, com.sun.jdi.ClassNotLoadedException, com.sun.jdi.IncompatibleThreadStateException, com.sun.jdi.InvocationException;
}

, , . com.sun API Oracle .

+2

All Articles