Class ObjectArrayImpl

    • Constructor Detail

      • ObjectArrayImpl

        public ObjectArrayImpl​(int objectId,
                               long address,
                               ClassImpl classInstance,
                               int length)
        Constructs an array of objects.
        Parameters:
        objectId - the object id of the array
        address - the actual address
        classInstance - the type of the array
        length - the length of the array in elements
    • Method Detail

      • doGetUsedHeapSize

        public static long doGetUsedHeapSize​(ClassImpl clazz,
                                             int length)
        Calculates the size of an object array
        Parameters:
        clazz - the type
        length - the length in elements
        Returns:
        the size in bytes
        Since:
        1.0
      • getReferenceArray

        public long[] getReferenceArray()
        Description copied from interface: IObjectArray
        Get an array with the object addresses. 0 indicates null values in the array.
        Specified by:
        getReferenceArray in interface IObjectArray
        Returns:
        the addresses of the objects held in the array, in index order
      • getReferenceArray

        public long[] getReferenceArray​(int offset,
                                        int length)
        Description copied from interface: IObjectArray
        Get an array with the object addresses, beginning at offset and length number of elements.
        Specified by:
        getReferenceArray in interface IObjectArray
        Parameters:
        offset - where to start
        length - how many entries to return
        Returns:
        the addresses of the objects held in the array, in index order from the index starting at offset, with length entries
      • getOutboundReferences

        public java.util.List<NamedReference> getOutboundReferences()
        Description copied from interface: IObject
        Get list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced.
        Specified by:
        getOutboundReferences in interface IObject
        Returns:
        list of snapshot objects referenced from this snapshot object with the name of the field over which it was referenced