Class WeakUtil


  • public class WeakUtil
    extends Object
    Author:
    Rein Raudjärv
    • Constructor Summary

      Constructors 
      Constructor Description
      WeakUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> Set<T> createWeakHashSet()  
      static <T> Set<T> createWeakHashSet​(Collection<T> elements)  
      static <T> Set<T> createWeakIdentityHashSet()  
      static <T> List<WeakReference<T>> createWeakReferenceList​(Collection<T> elements)  
      static org.zeroturnaround.javarebel.ClassBytecodeProcessor weak​(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)  
      static org.zeroturnaround.javarebel.ClassEventListener weak​(org.zeroturnaround.javarebel.ClassEventListener cel)  
      static org.zeroturnaround.javarebel.ClassIdentityFilter weak​(org.zeroturnaround.javarebel.ClassIdentityFilter cif)  
      static org.zeroturnaround.javarebel.ClassLoaderDestructionListener weak​(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)  
      static org.zeroturnaround.javarebel.FileEventListener weak​(org.zeroturnaround.javarebel.FileEventListener listener)  
      static org.zeroturnaround.javarebel.RequestListener weak​(org.zeroturnaround.javarebel.RequestListener listener)  
      static org.zeroturnaround.javarebel.ClassBytecodeProcessor weakCBP​(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)
      Alias for weak(ClassBytecodeProcessor)
      static org.zeroturnaround.javarebel.ClassLoaderDestructionListener weakCDL​(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)
      Alias for weak(ClassLoaderDestructionListener)
      static org.zeroturnaround.javarebel.ClassEventListener weakCEL​(org.zeroturnaround.javarebel.ClassEventListener cel)
      Alias for weak(ClassEventListener)
      static org.zeroturnaround.javarebel.ClassIdentityFilter weakCIF​(org.zeroturnaround.javarebel.ClassIdentityFilter cif)
      Alias for weak(ClassIdentityFilter)
    • Constructor Detail

      • WeakUtil

        public WeakUtil()
    • Method Detail

      • createWeakReferenceList

        public static <T> List<WeakReference<T>> createWeakReferenceList​(Collection<T> elements)
        Parameters:
        elements - the elements.
        Returns:
        List<Reference> the given elements wrapped into WeakReferences-s.
      • createWeakHashSet

        public static <T> Set<T> createWeakHashSet()
        Returns:
        the given elements in a weak set.
      • createWeakIdentityHashSet

        public static <T> Set<T> createWeakIdentityHashSet()
        Returns:
        the given elements in a weak identity set.
      • createWeakHashSet

        public static <T> Set<T> createWeakHashSet​(Collection<T> elements)
        Parameters:
        elements - the elements.
        Returns:
        the given elements in a weak set.
      • weakCBP

        public static org.zeroturnaround.javarebel.ClassBytecodeProcessor weakCBP​(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)
        Alias for weak(ClassBytecodeProcessor)
      • weak

        public static org.zeroturnaround.javarebel.ClassBytecodeProcessor weak​(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)
        Parameters:
        cbp -
        Returns:
        wrapper from given cbp that references the original cbp weakly
      • weakCEL

        public static org.zeroturnaround.javarebel.ClassEventListener weakCEL​(org.zeroturnaround.javarebel.ClassEventListener cel)
        Alias for weak(ClassEventListener)
      • weak

        public static org.zeroturnaround.javarebel.ClassEventListener weak​(org.zeroturnaround.javarebel.ClassEventListener cel)
        Parameters:
        cel -
        Returns:
        wrapper from given cbp that references the original cel weakly
      • weakCDL

        public static org.zeroturnaround.javarebel.ClassLoaderDestructionListener weakCDL​(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)
        Alias for weak(ClassLoaderDestructionListener)
      • weak

        public static org.zeroturnaround.javarebel.ClassLoaderDestructionListener weak​(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)
        Parameters:
        cdl -
        Returns:
        wrapper from given cdl that references the original cel weakly
      • weakCIF

        public static org.zeroturnaround.javarebel.ClassIdentityFilter weakCIF​(org.zeroturnaround.javarebel.ClassIdentityFilter cif)
        Alias for weak(ClassIdentityFilter)
      • weak

        public static org.zeroturnaround.javarebel.ClassIdentityFilter weak​(org.zeroturnaround.javarebel.ClassIdentityFilter cif)
        Parameters:
        cif -
        Returns:
        wrapper from given cdl that references the original cif weakly
      • weak

        public static org.zeroturnaround.javarebel.RequestListener weak​(org.zeroturnaround.javarebel.RequestListener listener)
        Parameters:
        listener -
        Returns:
        wrapper from given listener that references the original listener weakly
      • weak

        public static org.zeroturnaround.javarebel.FileEventListener weak​(org.zeroturnaround.javarebel.FileEventListener listener)
        Parameters:
        listener -
        Returns:
        wrapper from given listener that references the original listener weakly