public interface LayeredDependencyContext
This interface allows building a hierarchy of dependency contexts where dependencies are resolved in priority order through multiple layers. Each new layer added takes precedence over existing layers during dependency resolution.
This is particularly useful for the ExecutionRuntime to support
session-scoped and transaction-scoped dependency injection, where
dependencies added later (e.g., during transaction initialization)
take precedence over base dependencies.
| Modifier and Type | Method and Description |
|---|---|
void |
addContextLayer(ContextResolver contextOnTop)
Adds a new context layer with higher priority than existing layers.
|
void addContextLayer(ContextResolver contextOnTop)
Dependencies in the new layer will be resolved first before searching in lower layers. This enables overriding or supplementing existing dependencies without modifying the base context.
contextOnTop - the new context layer to add with highest priority