Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

JVM signatures

// Method signature is
(<arg1><arg2>...<argN>)<return_type>

// where the arguments and the return types are:
V - void
Z - boolean
C - char
B - byte
S - short
I - int
J - long
F - float
D - double
Ljava/lang/String; - String
Lfully/qualified/package/name/ClassName; - class reference
[type - type[]

// Example
package com.example

public class ArgumentClass;

public class ExampleClass {
    public void exampleMethod(ArgumentClass arg, int[] intarr);
}

// The signature will be (Lcom/example/ArgumentClass;[I)V

// Note: some sources suggest X as the signature for String, but it doesn't work for me.
Source by www.microfocus.com #
 
PREVIOUS NEXT
Tagged: #JVM #signatures
ADD COMMENT
Topic
Name
9+9 =