Package net.officefloor.dependency
Class OfficeFloorThreadLocalDependency
java.lang.Object
net.officefloor.dependency.OfficeFloorThreadLocalDependency
OfficeFloor ThreadLocal dependency.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TnewStaticProxy(Class<? extends T> type, ClassLoader classLoader, Supplier<? extends T> supplierThreadLocal) Creates a proxy dependency that delegates to theSupplierThreadLocalof the currentThread.
-
Constructor Details
-
OfficeFloorThreadLocalDependency
public OfficeFloorThreadLocalDependency()
-
-
Method Details
-
newStaticProxy
public static <T> T newStaticProxy(Class<? extends T> type, ClassLoader classLoader, Supplier<? extends T> supplierThreadLocal) Creates a proxy dependency that delegates to theSupplierThreadLocalof the currentThread.- Type Parameters:
T- Dependency type.- Parameters:
type- Type.classLoader-ClassLoader.supplierThreadLocal-Supplierto provide theSupplierThreadLocaldependency.- Returns:
- Static dependency.
-