Class ScopedValueInjectionContextScope
java.lang.Object
dev.derklaro.aerogel.scopedvalue.ScopedValueInjectionContextScope
- All Implemented Interfaces:
dev.derklaro.aerogel.internal.context.scope.InjectionContextScope
@API(status=INTERNAL,
since="3.0")
final class ScopedValueInjectionContextScope
extends Object
implements dev.derklaro.aerogel.internal.context.scope.InjectionContextScope
ScopedValueInjectionContextScope relies on preview features of the Java platform:
ScopedValueInjectionContextScoperefers to one or more preview APIs:Carrier,ScopedValue<T>.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A context scope that uses scope value carries to set the scope during injection.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final dev.derklaro.aerogel.internal.context.InjectionContextprivate final ScopedValue.CarrierPREVIEW -
Constructor Summary
ConstructorsConstructorDescriptionScopedValueInjectionContextScope(@NotNull dev.derklaro.aerogel.internal.context.InjectionContext context, @NotNull ScopedValuePREVIEW<dev.derklaro.aerogel.internal.context.scope.InjectionContextScope> scopeScopedValue) Constructs a new injection context scope for the given context and scoped value. -
Method Summary
Modifier and TypeMethodDescription@NotNull dev.derklaro.aerogel.internal.context.InjectionContextcontext()<T> @UnknownNullability TexecuteScoped(@NotNull Supplier<T> operation)
-
Field Details
-
context
private final dev.derklaro.aerogel.internal.context.InjectionContext context -
contextScopeCarrier
-
-
Constructor Details
-
ScopedValueInjectionContextScope
public ScopedValueInjectionContextScope(@NotNull @NotNull dev.derklaro.aerogel.internal.context.InjectionContext context, @NotNull @NotNull ScopedValuePREVIEW<dev.derklaro.aerogel.internal.context.scope.InjectionContextScope> scopeScopedValue) Constructs a new injection context scope for the given context and scoped value.- Parameters:
context- the context that is bound to this scope.scopeScopedValue- the scoped value for the injection scopes.
-
-
Method Details
-
context
-
executeScoped
- Specified by:
executeScopedin interfacedev.derklaro.aerogel.internal.context.scope.InjectionContextScope
-
ScopedValueInjectionContextScopewhen preview features are enabled.