Package org.incendo.cloud.injection
Interface InjectionRequest<C>
-
Method Summary
Modifier and TypeMethodDescriptionReturns an annotation accessor that can be used to access the annotations of the field that is being injected.Returns the context associated with the request.Returns the type that is being injected.Returns the type that is being injected.static <C> @NonNull InjectionRequest<C> of(@NonNull CommandContext<C> context, @NonNull TypeToken<?> injectedType) Creates a new injection request.static <C> @NonNull InjectionRequest<C> of(@NonNull CommandContext<C> context, @NonNull TypeToken<?> injectedType, @NonNull AnnotationAccessor annotationAccessor) Creates a new injection request.
-
Method Details
-
of
static <C> @NonNull InjectionRequest<C> of(@NonNull CommandContext<C> context, @NonNull TypeToken<?> injectedType, @NonNull AnnotationAccessor annotationAccessor) Creates a new injection request.- Type Parameters:
C- command sender type- Parameters:
context- context associated with the requestinjectedType- type that is being injectedannotationAccessor- associated annotation accessor- Returns:
- the request
-
of
static <C> @NonNull InjectionRequest<C> of(@NonNull CommandContext<C> context, @NonNull TypeToken<?> injectedType) Creates a new injection request.- Type Parameters:
C- command sender type- Parameters:
context- context associated with the requestinjectedType- type that is being injected- Returns:
- the request
-
commandContext
@NonNull CommandContext<C> commandContext()Returns the context associated with the request.- Returns:
- the context
-
injectedType
Returns the type that is being injected.- Returns:
- the injected type
-
injectedClass
Returns the type that is being injected.- Returns:
- the injected type
-
annotationAccessor
@NonNull AnnotationAccessor annotationAccessor()Returns an annotation accessor that can be used to access the annotations of the field that is being injected.If no field is injected then
AnnotationAccessor.empty()will be returned.- Returns:
- the annotation accessor
-