org.eclipse.mat.snapshot.model
Interface IClass

All Superinterfaces:
IObject, java.io.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
static java.lang.String JAVA_LANG_CLASS
           
static java.lang.String JAVA_LANG_CLASSLOADER
           
 
Method Summary
 boolean doesExtend(java.lang.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.
 java.util.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.
 java.util.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.
 java.lang.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.
 java.util.List<Field> getStaticFields()
          Returns the static fields and it values.
 java.util.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 java.lang.String JAVA_LANG_CLASS
See Also:
Constant Field Values

JAVA_LANG_CLASSLOADER

static final java.lang.String JAVA_LANG_CLASSLOADER
See Also:
Constant Field Values
Method Detail

getName

java.lang.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

java.util.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

java.util.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.


getSubclasses

java.util.List<IClass> getSubclasses()
Returns the direct sub-classes.


getAllSubclasses

java.util.List<IClass> getAllSubclasses()
Returns all sub-classes including sub-classes of its sub-classes.


doesExtend

boolean doesExtend(java.lang.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.