Interface ConditionContext<T extends AnnotationMetadataProvider>
- Type Parameters:
T- The type
- All Superinterfaces:
BeanLocator, PropertyResolver, ValueResolver<String>
public interface ConditionContext<T extends AnnotationMetadataProvider>
extends BeanLocator, PropertyResolver
The ConditionContext passed to a
Condition.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptionFail the condition with the given message.default ConditionContext<T> Fail the condition with the given message.<K> Collection<BeanDefinition<K>> findBeanDefinitions(Class<K> beanType) Finds and returns all bean definitions of the specified type.@Nullable BeanResolutionContextThe component for which the condition is being evaluated.default booleanMethods inherited from interface BeanLocator
findBean, findBean, findBean, findBean, findOrInstantiateBean, getBean, getBean, getBean, getBean, getBean, getBeansOfType, getBeansOfType, getBeansOfType, getBeansOfType, getProvider, getProvider, getProvider, getProvider, getProxyTargetBean, getProxyTargetBean, mapOfType, mapOfType, mapOfType, mapOfType, streamOfType, streamOfType, streamOfType, streamOfTypeMethods inherited from interface PropertyResolver
containsProperties, containsProperty, get, getProperties, getProperties, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyEntries, getPropertyEntries, getPropertyPathMatches, getRequiredPropertyMethods inherited from interface ValueResolver
get, get, get
-
Method Details
-
getComponent
T getComponent()The component for which the condition is being evaluated.- Returns:
- Either a
BeanDefinitionor aBeanConfiguration
-
getBeanContext
BeanContext getBeanContext()- Returns:
- The bean context
-
getBeanResolutionContext
@Nullable BeanResolutionContext getBeanResolutionContext()- Returns:
- The resolution context
-
findBeanDefinitions
Finds and returns all bean definitions of the specified type.- Type Parameters:
K- The type of the beans.- Parameters:
beanType- The class type of the beans to find.- Returns:
- A collection of
BeanDefinitioninstances corresponding to the specified type. - Since:
- 5.0
-
fail
Fail the condition with the given message.- Parameters:
failure- The failure- Returns:
- The
ConditionContext
-
fail
Fail the condition with the given message.- Parameters:
failure- The failure- Returns:
- The
ConditionContext
-
getFailures
-
isFailing
default boolean isFailing()- Returns:
- Whether there are any failures
-