Class WeakUtil
- java.lang.Object
-
- org.zeroturnaround.javarebel.integration.util.WeakUtil
-
public class WeakUtil extends Object
- Author:
- Rein Raudjärv
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceWeakUtil.RemovableListenerstatic classWeakUtil.WeakListenerReference<T>
-
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.ClassBytecodeProcessorweak(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)static org.zeroturnaround.javarebel.ClassEventListenerweak(org.zeroturnaround.javarebel.ClassEventListener cel)static org.zeroturnaround.javarebel.ClassIdentityFilterweak(org.zeroturnaround.javarebel.ClassIdentityFilter cif)static org.zeroturnaround.javarebel.ClassLoaderDestructionListenerweak(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)static org.zeroturnaround.javarebel.FileEventListenerweak(org.zeroturnaround.javarebel.FileEventListener listener)static org.zeroturnaround.javarebel.RequestListenerweak(org.zeroturnaround.javarebel.RequestListener listener)static org.zeroturnaround.javarebel.ClassBytecodeProcessorweakCBP(org.zeroturnaround.javarebel.ClassBytecodeProcessor cbp)Alias for weak(ClassBytecodeProcessor)static org.zeroturnaround.javarebel.ClassLoaderDestructionListenerweakCDL(org.zeroturnaround.javarebel.ClassLoaderDestructionListener cdl)Alias for weak(ClassLoaderDestructionListener)static org.zeroturnaround.javarebel.ClassEventListenerweakCEL(org.zeroturnaround.javarebel.ClassEventListener cel)Alias for weak(ClassEventListener)static org.zeroturnaround.javarebel.ClassIdentityFilterweakCIF(org.zeroturnaround.javarebel.ClassIdentityFilter cif)Alias for weak(ClassIdentityFilter)static org.zeroturnaround.javarebel.RequestListenerweakRL(org.zeroturnaround.javarebel.RequestListener listener)Alias for weak(RequestListener)
-
-
-
Method Detail
-
createWeakReferenceList
public static <T> List<WeakReference<T>> createWeakReferenceList(Collection<T> elements)
- Parameters:
elements- the elements.- Returns:
List<Reference>the given elements wrapped intoWeakReferences-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
-
weakRL
public static org.zeroturnaround.javarebel.RequestListener weakRL(org.zeroturnaround.javarebel.RequestListener listener)
Alias for weak(RequestListener)
-
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
-
-