Package io.micronaut.inject
Interface BeanContextConditional
- All Known Subinterfaces:
AdvisedBeanType<T>
,BeanConfiguration
,BeanDefinition<T>
,BeanDefinitionReference<T>
,BeanType<T>
,DelegatingBeanDefinition<T>
,DisposableBeanDefinition<T>
,InitializingBeanDefinition<T>
,InjectableBeanDefinition<T>
,InstantiatableBeanDefinition<T>
,ParametrizedInstantiatableBeanDefinition<T>
,ProxyBeanDefinition<T>
,QualifiedBeanType<T>
,RuntimeBeanDefinition<T>
,ValidatedBeanDefinition<T>
- All Known Implementing Classes:
AbstractBeanConfiguration
,AbstractInitializableBeanDefinition
,AbstractInitializableBeanDefinitionAndReference
,AbstractInitializableBeanDefinitionReference
,AbstractProviderDefinition
,ApplicationEventPublisherFactory
,ArgumentBeanType
,BeanProviderDefinition
,BeanRegistration
,DisabledBean
,InterceptorRegistryBean
,JakartaProviderBeanDefinition
,JavaxProviderBeanDefinition
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Interface for other types that are conditional within a context.
- Since:
- 1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
isEnabled
(@NonNull BeanContext context) Return whether this component is enabled for the given context.boolean
isEnabled
(@NonNull BeanContext context, @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.
-
Method Details
-
isEnabled
Return whether this component is enabled for the given context.- Parameters:
context
- The context- Returns:
- True if it is
-
isEnabled
boolean isEnabled(@NonNull @NonNull BeanContext context, @Nullable @Nullable BeanResolutionContext resolutionContext) Return whether this component is enabled for the given context.- Parameters:
context
- The contextresolutionContext
- The bean resolution context- Returns:
- True if it is
-