Package io.micronaut.context
Interface RuntimeBeanDefinition.Builder<B>
- Type Parameters:
B- The bean type
- Enclosing interface:
RuntimeBeanDefinition<T>
public static interface RuntimeBeanDefinition.Builder<B>
A builder for constructing
RuntimeBeanDefinition instances.-
Method Summary
Modifier and TypeMethodDescription@NonNull RuntimeBeanDefinition.Builder<B> annotationMetadata(@Nullable AnnotationMetadata annotationMetadata) The annotation metadata for the bean.@NonNull RuntimeBeanDefinition<B> build()Builds the runtime bean.@NonNull RuntimeBeanDefinition.Builder<B> exposedTypes(Class<?>... types) Limit the exposed types of this bean.default @NonNull RuntimeBeanDefinition.Builder<B> The qualifier to use.@NonNull RuntimeBeanDefinition.Builder<B> The qualifier to use.@NonNull RuntimeBeanDefinition.Builder<B> Adds this type as a bean replacement of the given type.@NonNull RuntimeBeanDefinition.Builder<B> scope(@Nullable Class<? extends Annotation> scope) The scope to use.@NonNull RuntimeBeanDefinition.Builder<B> singleton(boolean isSingleton) Is the bean singleton.@NonNull RuntimeBeanDefinition.Builder<B> typeArguments(Argument<?>... arguments) The type arguments for the type.@NonNull RuntimeBeanDefinition.Builder<B> typeArguments(Class<?> implementedType, Argument<?>... arguments) The type arguments for an implemented type of this type.
-
Method Details
-
qualifier
The qualifier to use.- Parameters:
qualifier- The qualifier- Returns:
- This builder
-
replaces
Adds this type as a bean replacement of the given type.- Parameters:
otherType- The other type- Returns:
- This bean builder
- Since:
- 4.0.0
-
named
The qualifier to use.- Parameters:
name- The named qualifier to use.- Returns:
- This builder
- Since:
- 3.7.0
-
scope
The scope to use.- Parameters:
scope- The scope- Returns:
- This builder
-
singleton
Is the bean singleton.- Parameters:
isSingleton- True if it is singleton- Returns:
- This builder
-
exposedTypes
Limit the exposed types of this bean.- Parameters:
types- The exposed types- Returns:
- This builder
-
typeArguments
The type arguments for the type.- Parameters:
arguments- The arguments- Returns:
- This builder
-
typeArguments
@NonNull RuntimeBeanDefinition.Builder<B> typeArguments(Class<?> implementedType, Argument<?>... arguments) The type arguments for an implemented type of this type.- Parameters:
implementedType- The implemented typearguments- The arguments- Returns:
- This builder
-
annotationMetadata
@NonNull RuntimeBeanDefinition.Builder<B> annotationMetadata(@Nullable AnnotationMetadata annotationMetadata) The annotation metadata for the bean.- Parameters:
annotationMetadata- The annotation metadata- Returns:
- This builder
-
build
@NonNull RuntimeBeanDefinition<B> build()Builds the runtime bean.- Returns:
- The runtime bean
-