Class WeakCacheKey<T>

  • Type Parameters:
    T - type of the reference

    public class WeakCacheKey<T>
    extends java.lang.ref.WeakReference<T>
    Allows to check for object equality, yet the class does not keep strong reference to the target. equals(Object) returns true if and only if the reference is not yet expired and target objects are equal in terms of equals(Object).

    This an internal class, thus it might disappear in future cglib releases.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hash  
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakCacheKey​(T referent)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.ref.Reference

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

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • hash

        private final int hash
    • Constructor Detail

      • WeakCacheKey

        public WeakCacheKey​(T referent)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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