Package org.jboss.weld.util
Class WeakLazyValueHolder<T>
- java.lang.Object
-
- org.jboss.weld.util.WeakLazyValueHolder<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
ValueHolder<T>
public abstract class WeakLazyValueHolder<T> extends Object implements ValueHolder<T>
LazyValueHolderthat usesWeakReference.- Author:
- Jozef Hartinger
-
-
Constructor Summary
Constructors Constructor Description WeakLazyValueHolder()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()protected abstract TcomputeValue()static <T> WeakLazyValueHolder<T>forSupplier(Supplier<T> supplier)Tget()TgetIfPresent()
-
-
-
Method Detail
-
forSupplier
public static <T> WeakLazyValueHolder<T> forSupplier(Supplier<T> supplier)
-
get
public T get()
- Specified by:
getin interfaceValueHolder<T>
-
getIfPresent
public T getIfPresent()
- Specified by:
getIfPresentin interfaceValueHolder<T>
-
clear
public void clear()
-
computeValue
protected abstract T computeValue()
-
-