[ACCEPTED]-What do those strange class names in a java heap dump mean?-jmap

Accepted answer
Score: 69

You'll find the complete list documented 13 under Class.getName():

If this class object represents a reference 12 type that is not an array type then the 11 binary name of the class is returned, as 10 specified by the Java™ Language Specification, Second Edition.

If this class object represents 9 a primitive type or void, then the name returned 8 is a String equal to the Java language keyword 7 corresponding to the primitive type or 6 void.

If this class object represents a class 5 of arrays, then the internal form of the 4 name consists of the name of the element 3 type preceded by one or more '[' characters 2 representing the depth of the array nesting. The encoding 1 of element type names is as follows:

Element Type        Encoding
boolean             Z
byte                B
char                C
class or interface  Lclassname;
double              D
float               F
int                 I
long                J
short               S 
Score: 15

it is an array of objects as specified by 2 JVM Specifications for internal representation of class names:

  • a single [ means an array of
  • L followed by a fully qualified class name (e.g. java/lang/Object) is the class name terminated by semicolon ;

so 1 [Ljava.lang.object; means Object[]

Score: 6

The rules are listed in the API doc of Class.getName().

[Ljava.lang.Object; would 3 be an instance of Object[]. Note that multidimensional 2 arrays are displayed with multiple opening 1 braces.

More Related questions