了解NoSuchMethod异常中的方法签名 [英] Understanding method signature in NoSuchMethod exception

查看:239
本文介绍了了解NoSuchMethod异常中的方法签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个例外,但已解决。

I got this exception but resolved it.

java.lang.NoSuchMethodError: antlr.NoViableAltForCharException.<init>
(CLjava/lang/String;II)V

但我想知道如何解释这些类型的消息:(CLjava / lang / String; II)V
此外,这个init是否提及NoViableAltForCharException类的构造函数

But i'd like to know how to interpret these kind of messages: "(CLjava/lang/String;II)V" Also, does this "init" mention the constructor of NoViableAltForCharException class??

感谢。

推荐答案

类型签名 - 取自此页

JNI使用Java VM的表示形式类型签名。表3-2显示了这些类型签名。

The JNI uses the Java VM’s representation of type signatures. Table 3-2 shows these type signatures.

Z                               boolean
B                               byte
C                               char
S                               short
I                               int
J                               long
F                               float
D                               double
L fully-qualified-class ;       fully-qualified-class
[ type                          type[]
( arg-types ) ret-type          method type

例如,Java方法:

long f (int n, String s, int[] arr);

具有以下类型签名:

(ILjava/lang/String;[I)J

这篇关于了解NoSuchMethod异常中的方法签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆