Package net.officefloor.dependency
Class OfficeFloorThreadLocalDependency
- java.lang.Object
-
- net.officefloor.dependency.OfficeFloorThreadLocalDependency
-
public class OfficeFloorThreadLocalDependency extends java.lang.Object
OfficeFloor
ThreadLocal
dependency.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OfficeFloorThreadLocalDependency()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T
newStaticProxy(java.lang.Class<? extends T> type, java.lang.ClassLoader classLoader, java.util.function.Supplier<? extends T> supplierThreadLocal)
Creates a proxy dependency that delegates to theSupplierThreadLocal
of the currentThread
.
-
-
-
Method Detail
-
newStaticProxy
public static <T> T newStaticProxy(java.lang.Class<? extends T> type, java.lang.ClassLoader classLoader, java.util.function.Supplier<? extends T> supplierThreadLocal)
Creates a proxy dependency that delegates to theSupplierThreadLocal
of the currentThread
.- Type Parameters:
T
- Dependency type.- Parameters:
type
- Type.classLoader
-ClassLoader
.supplierThreadLocal
-Supplier
to provide theSupplierThreadLocal
dependency.- Returns:
- Static dependency.
-
-