Package org.eclipse.mat.snapshot.model
Interface IClass
-
- All Superinterfaces:
IObject
,Serializable
- All Known Implementing Classes:
ClassImpl
public interface IClass extends IObject
Interface for a class instance in the heap dump.- No Implement:
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.mat.snapshot.model.IObject
IObject.Type
-
-
Field Summary
Fields Modifier and Type Field Description static String
JAVA_LANG_CLASS
static String
JAVA_LANG_CLASSLOADER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
doesExtend(String className)
Does this class extend a class of the supplied name? With multiple class loaders the supplied name might not be the class you were intending to find.List<IClass>
getAllSubclasses()
Returns all sub-classes including sub-classes of its sub-classes.long
getClassLoaderAddress()
Returns the address of the class loader which loaded this class.int
getClassLoaderId()
Returns the id of the class loader which loaded this class.List<FieldDescriptor>
getFieldDescriptors()
Returns field descriptors for all member variables of instances of this class.long
getHeapSizePerInstance()
Returns the heap size of one instance of this class.String
getName()
Returns the fully qualified class name of this class.int
getNumberOfObjects()
Returns the number of instances of this class present in the heap dump.int[]
getObjectIds()
Ids of all instances of this class (an empty array if there are no instances of the class)long
getRetainedHeapSizeOfObjects(boolean calculateIfNotAvailable, boolean calculateMinRetainedSize, IProgressListener listener)
Returns the retained size of all objects of this instance including the class instance.List<Field>
getStaticFields()
Returns the static fields and it values.List<IClass>
getSubclasses()
Returns the direct sub-classes.IClass
getSuperClass()
Returns the super class.int
getSuperClassId()
Returns the id of the super class.boolean
hasSuperClass()
Returns true if the class has a super class.boolean
isArrayType()
Returns true if the class is an array class.-
Methods inherited from interface org.eclipse.mat.snapshot.model.IObject
getClassSpecificName, getClazz, getDisplayName, getGCRootInfo, getObjectAddress, getObjectId, getOutboundReferences, getRetainedHeapSize, getSnapshot, getTechnicalName, getUsedHeapSize, resolveValue
-
-
-
-
Field Detail
-
JAVA_LANG_CLASS
static final String JAVA_LANG_CLASS
- See Also:
- Constant Field Values
-
JAVA_LANG_CLASSLOADER
static final String JAVA_LANG_CLASSLOADER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Returns the fully qualified class name of this class. The package components are separated by dots '.'. Inner classes use $ to separate the parts.
-
getNumberOfObjects
int getNumberOfObjects()
Returns the number of instances of this class present in the heap dump.
-
getObjectIds
int[] getObjectIds() throws SnapshotException
Ids of all instances of this class (an empty array if there are no instances of the class)- Throws:
SnapshotException
-
getClassLoaderId
int getClassLoaderId()
Returns the id of the class loader which loaded this class.
-
getClassLoaderAddress
long getClassLoaderAddress()
Returns the address of the class loader which loaded this class.
-
getFieldDescriptors
List<FieldDescriptor> getFieldDescriptors()
Returns field descriptors for all member variables of instances of this class. If the snapshot data format does not contain field data then this will be an empty list.
-
getStaticFields
List<Field> getStaticFields()
Returns the static fields and it values. If the snapshot data format does not contain field data then this will be an empty list.
-
getHeapSizePerInstance
long getHeapSizePerInstance()
Returns the heap size of one instance of this class. Not valid if this class represents an array.- Since:
- 1.0
-
getRetainedHeapSizeOfObjects
long getRetainedHeapSizeOfObjects(boolean calculateIfNotAvailable, boolean calculateMinRetainedSize, IProgressListener listener) throws SnapshotException
Returns the retained size of all objects of this instance including the class instance.- Throws:
SnapshotException
-
getSuperClassId
int getSuperClassId()
Returns the id of the super class. -1 if it has no super class, i.e. if it is java.lang.Object.
-
getSuperClass
IClass getSuperClass()
Returns the super class.
-
hasSuperClass
boolean hasSuperClass()
Returns true if the class has a super class.
-
getAllSubclasses
List<IClass> getAllSubclasses()
Returns all sub-classes including sub-classes of its sub-classes.
-
doesExtend
boolean doesExtend(String className) throws SnapshotException
Does this class extend a class of the supplied name? With multiple class loaders the supplied name might not be the class you were intending to find.- Parameters:
className
-- Returns:
- true if it does extend
- Throws:
SnapshotException
-
isArrayType
boolean isArrayType()
Returns true if the class is an array class.
-
-