Class SpringBootCondition
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.SpringBootCondition
- All Implemented Interfaces:
org.springframework.context.annotation.Condition
- Direct Known Subclasses:
AllNestedConditions,AnyNestedCondition,MessageSourceAutoConfiguration.ResourceBundleCondition,NoneNestedConditions,OAuth2ResourceServerConfiguration.ResourceServerCondition,OAuth2SsoDefaultConfiguration.NeedsWebSecurityCondition,ResourceCondition
public abstract class SpringBootCondition extends Object implements org.springframework.context.annotation.Condition
Base of allConditionimplementations used with Spring Boot. Provides sensible logging to help the user diagnose what classes are loaded.
Constructor Summary
Constructors Constructor Description SpringBootCondition()
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleananyMatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata, org.springframework.context.annotation.Condition... conditions)Return true if any of the specified conditions match.abstract ConditionOutcomegetMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)Determine the outcome of the match along with suitable log output.protected voidlogOutcome(String classOrMethodName, ConditionOutcome outcome)booleanmatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)protected booleanmatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata, org.springframework.context.annotation.Condition condition)Return true if any of the specified condition matches.
Constructor Detail
SpringBootCondition
public SpringBootCondition()
Method Detail
matches
public final boolean matches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
- Specified by:
matchesin interfaceorg.springframework.context.annotation.Condition
logOutcome
protected final void logOutcome(String classOrMethodName, ConditionOutcome outcome)
getMatchOutcome
public abstract ConditionOutcome getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
Determine the outcome of the match along with suitable log output.- Parameters:
context- the condition contextmetadata- the annotation metadata- Returns:
- the condition outcome
anyMatches
protected final boolean anyMatches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata, org.springframework.context.annotation.Condition... conditions)
Return true if any of the specified conditions match.- Parameters:
context- the contextmetadata- the annotation meta-dataconditions- conditions to test- Returns:
trueif any condition matches.
matches
protected final boolean matches(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata, org.springframework.context.annotation.Condition condition)
Return true if any of the specified condition matches.- Parameters:
context- the contextmetadata- the annotation meta-datacondition- condition to test- Returns:
trueif the condition matches.