- java.lang.Object
-
- jdk.jfr.consumer.RecordedObject
-
- jdk.jfr.consumer.RecordedClass
-
public final class RecordedClass extends RecordedObject
A recorded Java type, such as a class or an interface.- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordedClassLoader
getClassLoader()
Returns the class loader that defined the class.long
getId()
Returns a unique ID for the class.int
getModifiers()
Returns the modifiers of the class.String
getName()
Returns the fully qualified name of the class (for example,"java.lang.String"
).int
getObjectSize()
Returns the object size for the class.boolean
isArray()
Checks whether the class is for instance or array.-
Methods declared in class jdk.jfr.consumer.RecordedObject
getBoolean, getByte, getChar, getClass, getDouble, getDuration, getFields, getFloat, getInstant, getInt, getLong, getShort, getString, getThread, getValue, hasField, toString
-
-
-
-
Method Detail
-
getModifiers
public int getModifiers()
Returns the modifiers of the class.See
Modifier
- Returns:
- the modifiers
- See Also:
Modifier
-
getClassLoader
public RecordedClassLoader getClassLoader()
Returns the class loader that defined the class.If the bootstrap class loader is represented as
null
in the Java Virtual Machine (JVM), thennull
is also the return value of this method.- Returns:
- the class loader defining this class, can be
null
-
getName
public String getName()
Returns the fully qualified name of the class (for example,"java.lang.String"
).- Returns:
- the class name, not
null
-
getId
public long getId()
Returns a unique ID for the class.The ID might not be the same between Java Virtual Machine (JVM) instances.
- Returns:
- a unique ID
-
getObjectSize
public int getObjectSize()
Returns the object size for the class.The object size for instance class is accurate. But for the array class, it is a magic code 0x1111baba. The array object size can not be determined statically from the JVM klass information because array object size is affected by actual element length.
- Returns:
- the object size (instance object), or magic code 0x1111baba (array object)
-
isArray
public boolean isArray()
Checks whether the class is for instance or array.- Returns:
- true or false
-
-