class ConditionEvaluator
extends java.lang.Object
Conditional
annotations.Modifier and Type | Class and Description |
---|---|
private static class |
ConditionEvaluator.ConditionContextImpl
Implementation of a
ConditionContext . |
Modifier and Type | Field and Description |
---|---|
private ConditionEvaluator.ConditionContextImpl |
context |
Constructor and Description |
---|
ConditionEvaluator(BeanDefinitionRegistry registry,
Environment environment,
ResourceLoader resourceLoader)
Create a new
ConditionEvaluator instance. |
Modifier and Type | Method and Description |
---|---|
private Condition |
getCondition(java.lang.String conditionClassName,
java.lang.ClassLoader classloader) |
private java.util.List<java.lang.String[]> |
getConditionClasses(AnnotatedTypeMetadata metadata) |
boolean |
shouldSkip(AnnotatedTypeMetadata metadata)
Determine if an item should be skipped based on
@Conditional annotations. |
boolean |
shouldSkip(AnnotatedTypeMetadata metadata,
ConfigurationCondition.ConfigurationPhase phase)
Determine if an item should be skipped based on
@Conditional annotations. |
private final ConditionEvaluator.ConditionContextImpl context
public ConditionEvaluator(BeanDefinitionRegistry registry, Environment environment, ResourceLoader resourceLoader)
ConditionEvaluator
instance.public boolean shouldSkip(AnnotatedTypeMetadata metadata)
@Conditional
annotations.
The ConfigurationCondition.ConfigurationPhase
will be deduced from the type of item (i.e. a
@Configuration
class will be ConfigurationCondition.ConfigurationPhase.PARSE_CONFIGURATION
)metadata
- the meta datapublic boolean shouldSkip(AnnotatedTypeMetadata metadata, ConfigurationCondition.ConfigurationPhase phase)
@Conditional
annotations.metadata
- the meta dataphase
- the phase of the callprivate java.util.List<java.lang.String[]> getConditionClasses(AnnotatedTypeMetadata metadata)
private Condition getCondition(java.lang.String conditionClassName, java.lang.ClassLoader classloader)