Class NoneNestedConditions
java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
org.springframework.boot.autoconfigure.condition.NoneNestedConditions
- All Implemented Interfaces:
Condition
,ConfigurationCondition
Condition
that will match when none of the nested class conditions match. Can
be used to create composite conditions, for example:
static class OnNeitherJndiNorProperty extends NoneNestedConditions { OnNeitherJndiNorProperty() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @ConditionalOnJndi() static class OnJndi { } @ConditionalOnProperty("something") static class OnProperty { } }
The
ConfigurationPhase
should be specified according to the conditions that are defined.
In the example above, all conditions are static and can be evaluated early so
PARSE_CONFIGURATION
is a right fit.
- Since:
- 1.3.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
AbstractNestedCondition.MemberMatchOutcomes
Nested classes/interfaces inherited from interface org.springframework.context.annotation.ConfigurationCondition
ConfigurationCondition.ConfigurationPhase
-
Constructor Summary
ConstructorDescriptionNoneNestedConditions
(ConfigurationCondition.ConfigurationPhase configurationPhase) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConditionOutcome
getFinalMatchOutcome
(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes) Methods inherited from class org.springframework.boot.autoconfigure.condition.AbstractNestedCondition
getConfigurationPhase, getMatchOutcome
Methods inherited from class org.springframework.boot.autoconfigure.condition.SpringBootCondition
anyMatches, logOutcome, matches, matches
-
Constructor Details
-
NoneNestedConditions
-
-
Method Details
-
getFinalMatchOutcome
protected ConditionOutcome getFinalMatchOutcome(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes) - Specified by:
getFinalMatchOutcome
in classAbstractNestedCondition
-