java 查看native方法_Java-如何查看java里的native方法?

java 查看native方法_Java-如何查看java里的native方法?位置在这里:openjdkjdksrcsharenativenativejavalangThread.c中有一段静态代码块:staticJNINativeMethodmethods[]={{“start0″,”()V”,(void*)&JVM_StartThread},{“stop0”,”(“OBJ”)V”,(v…

大家好,欢迎来到IT知识分享网。java 查看native方法_Java-如何查看java里的native方法?

位置在这里:openjdkjdksrcsharenative

nativejavalangThread.c中有一段静态代码块:

static JNINativeMethod methods[] = {

{“start0”, “()V”, (void *)&JVM_StartThread},

{“stop0”, “(” OBJ “)V”, (void *)&JVM_StopThread},

{“isAlive”, “()Z”, (void *)&JVM_IsThreadAlive},

{“suspend0”, “()V”, (void *)&JVM_SuspendThread},

{“resume0”, “()V”, (void *)&JVM_ResumeThread},

{“setPriority0”, “(I)V”, (void *)&JVM_SetThreadPriority},

{“yield”, “()V”, (void *)&JVM_Yield},

{“sleep”, “(J)V”, (void *)&JVM_Sleep},

{“currentThread”, “()” THD, (void *)&JVM_CurrentThread},

{“countStackFrames”, “()I”, (void *)&JVM_CountStackFrames},

{“interrupt0”, “()V”, (void *)&JVM_Interrupt},

{“isInterrupted”, “(Z)Z”, (void *)&JVM_IsInterrupted},

{“holdsLock”, “(” OBJ “)Z”, (void *)&JVM_HoldsLock},

{“getThreads”, “()[” THD, (void *)&JVM_GetAllThreads},

{“dumpThreads”, “([” THD “)[[” STE, (void *)&JVM_DumpThreads},

};

这里只是举个例子,虽然我不太懂C,但这段代码还是能猜个大概的。楼主应该能够看明白的。

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/10429.html

(0)
上一篇 2024-04-01 11:00
下一篇 2024-04-01 12:45

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信