"([ljava/lang/string;) V" It is an encoding of function return values and parameters. This encoding is called the Jni field descriptor (javanative Interface fielddescriptors). An array int[], it needs to be represented as such "[I". If multiple arrays double[][][] is required to be represented as such "[[[D]. In other words, each square bracket begins, representing an array dimension. After multiple boxes, is the type of the array.
A descriptor that starts with an L is a class descriptor, followed by the string of the class, and then the semicolon ";" ends.
Like "ljava/lang/string;" is the presentation type string;
"[I" means int[];
"[Ljava/lang/object;" is to express object[].
The Jni method descriptor, which places the argument in parentheses, places the return type behind the parentheses, as follows:
(parameter descriptor) return type
When a function does not need to return a parameter type, it is represented using "V".
For example "() ljava/lang/string;" is to represent string f ();
"(Iljava/lang/class;) J" means long f (int i, Class c);
"([B) V" means void String (byte[] bytes);
java type |
Symbol |
Boolean |
Z |
Byte |
B |
Char |
C |
Short |
S |
Int |
I |
Long |
J |
Float |
F |
Double |
D |
Voi D |
V |
Objects Object |
start with "L" with ";" At the end, the middle is a "/" separated package and class name. For example: ljava/lang/string; if it is a nested class, then the $ is used to represent nesting. For example "(ljava/lang/string; landroid/os/fileutils$filestatus;) Z " |
Another shorthand for an array type is represented by "[" plus a shorthand for the corresponding type as shown in Table A.
For example: [I represents int [];[ L/java/lang/objects means objects[], in addition. The label of a reference type (other than an array of basic types) has a last ";"
For example:
"() V" means void Func ();
"(II) V" means void Func (int, int);
"(ljava/lang/string; ljava/lang/string) I ". Represents int Func (string,string)