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:
    • 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.
      • getSubclasses

        List<IClass> getSubclasses()
        Returns the direct sub-classes.
      • 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.