Wednesday, February 3, 2016

Java Signature Types Revealed

javap and javap -s with a class name returns the types of the values in the method signature but the abbreviations returns need some clarification:
Type SignatureJava Type
B byte
C char
D double
F float
I int
J long
S short
V Void
Z boolean
L fully-qualified-class
[ typetype[]
( arg-types )ret-type method type


For Example:

$ javap -s com.frontier.geocoding.GeoService

public static void main(java.lang.String[]);
Signature: ([Ljava/lang/String;)V

public static java.lang.String getLongLat(java.lang.String);
Signature: (Ljava/lang/String;)Ljava/lang/String;

public static byte[] getLongLatInBytes(java.lang.String);
Signature: (Ljava/lang/String;)[B