Class LeakDetector.LeakInfo

  • Enclosing class:
    LeakDetector<T>

    public class LeakDetector.LeakInfo
    extends java.lang.ref.PhantomReference<T>
    Information about the leak of a resource.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String description  
      private java.lang.String id  
      private java.lang.Throwable stackFrames  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private LeakInfo​(T referent, java.lang.String id)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getResourceDescription()  
      java.lang.Throwable getStackFrames()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.ref.PhantomReference

        get
      • Methods inherited from class java.lang.ref.Reference

        clear, enqueue, isEnqueued
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • id

        private final java.lang.String id
      • description

        private final java.lang.String description
      • stackFrames

        private final java.lang.Throwable stackFrames
    • Constructor Detail

      • LeakInfo

        private LeakInfo​(T referent,
                         java.lang.String id)
    • Method Detail

      • getResourceDescription

        public java.lang.String getResourceDescription()
        Returns:
        the resource description as provided by the resource's Object.toString() method.
      • getStackFrames

        public java.lang.Throwable getStackFrames()
        Returns:
        a Throwable instance that contains the stack frames at the time of resource acquisition.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object