Class SpringBootCondition
java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
- All Implemented Interfaces:
Condition
- Direct Known Subclasses:
AbstractNestedCondition
,ClientsConfiguredCondition
,IssuerUriCondition
,KeyValueCondition
,MessageSourceAutoConfiguration.ResourceBundleCondition
,OnDatabaseInitializationCondition
,OnEnabledDevToolsCondition
,OnEndpointElementCondition
,OnPropertyListCondition
,ResourceCondition
Base of all
Condition
implementations used with Spring Boot. Provides sensible
logging to help the user diagnose what classes are loaded.- Since:
- 1.0.0
- Author:
- Phillip Webb, Greg Turnquist
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final boolean
anyMatches
(ConditionContext context, AnnotatedTypeMetadata metadata, Condition... conditions) Return true if any of the specified conditions match.abstract ConditionOutcome
getMatchOutcome
(ConditionContext context, AnnotatedTypeMetadata metadata) Determine the outcome of the match along with suitable log output.protected final void
logOutcome
(String classOrMethodName, ConditionOutcome outcome) final boolean
matches
(ConditionContext context, AnnotatedTypeMetadata metadata) protected final boolean
matches
(ConditionContext context, AnnotatedTypeMetadata metadata, Condition condition) Return true if any of the specified condition matches.
-
Constructor Details
-
SpringBootCondition
public SpringBootCondition()
-
-
Method Details
-
matches
-
logOutcome
-
getMatchOutcome
public abstract ConditionOutcome getMatchOutcome(ConditionContext context, 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(ConditionContext context, AnnotatedTypeMetadata metadata, Condition... conditions) Return true if any of the specified conditions match.- Parameters:
context
- the contextmetadata
- the annotation meta-dataconditions
- conditions to test- Returns:
true
if any condition matches.
-
matches
protected final boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata, Condition condition) Return true if any of the specified condition matches.- Parameters:
context
- the contextmetadata
- the annotation meta-datacondition
- condition to test- Returns:
true
if the condition matches.
-