Interface SupplierCompileContext
-
- All Known Subinterfaces:
SupplierCompileConfiguration
,SupplierCompletionContext
,SupplierSourceContext
- All Known Implementing Classes:
SupplierSourceContextImpl
public interface SupplierCompileContext
Compile context for theSupplierSource
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addInternalSupplier(InternalSupplier internalSupplier)
Adds anInternalSupplier
.<D extends java.lang.Enum<D>,F extends java.lang.Enum<F>>
SuppliedManagedObjectSourceaddManagedObjectSource(java.lang.String qualifier, java.lang.Class<?> type, ManagedObjectSource<D,F> managedObjectSource)
Adds a potentialManagedObjectSource
for dependency injection.<T> SupplierThreadLocal<T>
addSupplierThreadLocal(java.lang.String qualifier, java.lang.Class<? extends T> type)
Adds aSupplierThreadLocal
.void
addThreadSynchroniser(ThreadSynchroniserFactory threadSynchroniserFactory)
Adds aThreadSynchroniser
.
-
-
-
Method Detail
-
addSupplierThreadLocal
<T> SupplierThreadLocal<T> addSupplierThreadLocal(java.lang.String qualifier, java.lang.Class<? extends T> type)
Adds a
SupplierThreadLocal
.This allows integrating third party libraries that require
ThreadLocal
access to objects.- Type Parameters:
T
- Type of object to be returned from theSupplierThreadLocal
.- Parameters:
qualifier
- Qualifier for theAutoWire
. May benull
to match only on type.type
- Type forAutoWire
.- Returns:
SupplierThreadLocal
to obtain the object.
-
addThreadSynchroniser
void addThreadSynchroniser(ThreadSynchroniserFactory threadSynchroniserFactory)
Adds a
ThreadSynchroniser
.This enables keeping the
ThreadLocal
instances of the integrating third party library consistent across theThread
instances.- Parameters:
threadSynchroniserFactory
-ThreadSynchroniserFactory
.
-
addManagedObjectSource
<D extends java.lang.Enum<D>,F extends java.lang.Enum<F>> SuppliedManagedObjectSource addManagedObjectSource(java.lang.String qualifier, java.lang.Class<?> type, ManagedObjectSource<D,F> managedObjectSource)
Adds a potentialManagedObjectSource
for dependency injection.- Type Parameters:
D
- Dependency type keys.F
-Flow
type keys.- Parameters:
qualifier
- Qualifier for theManagedObjectSource
. May benull
to match only on type.type
- Type of theManagedObjectSource
.managedObjectSource
-ManagedObjectSource
.- Returns:
SuppliedManagedObjectSource
.
-
addInternalSupplier
void addInternalSupplier(InternalSupplier internalSupplier)
Adds anInternalSupplier
.- Parameters:
internalSupplier
-InternalSupplier
.
-
-