I was reading source code of Object class in classpath project http://fuseyism.com/classpath/doc/ and in wait() and other methods there was a reference to VMObject.
public final void wait()
throws IllegalMonitorStateException, InterruptedException {
VMObject.wait(this, 0, 0);
}
I tried searching answer on Google and asking on #java channel but no one has an answer.
Well in the OpenJDK
wait()looks like this:Using google I found the code for VMObject
In there,
VMObject.wait()looks like this:I am only guessing, but I think VMObject is an implementation detail, specific of GNUClassPath, for some unknown reason they decided not to use native calls directly on “Object” and instead decided to have an extra layer of abstraction with the native calls in static methods in this “VMObject” class.}
From the Java Language and Virtual Machine Specification:
If you would like to know more on what a native method is, you can read this.