public abstract class AllNestedConditions extends AbstractNestedCondition
Condition
that will match when all nested class conditions match. Can be used
to create composite conditions, for example:
static class OnJndiAndProperty extends AllNestedConditions { OnJndiAndProperty() { 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.
AbstractNestedCondition.MemberMatchOutcomes
ConfigurationCondition.ConfigurationPhase
Constructor and Description |
---|
AllNestedConditions(ConfigurationCondition.ConfigurationPhase configurationPhase) |
Modifier and Type | Method and Description |
---|---|
protected ConditionOutcome |
getFinalMatchOutcome(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes) |
getConfigurationPhase, getMatchOutcome
anyMatches, logOutcome, matches, matches
public AllNestedConditions(ConfigurationCondition.ConfigurationPhase configurationPhase)
protected ConditionOutcome getFinalMatchOutcome(AbstractNestedCondition.MemberMatchOutcomes memberOutcomes)
getFinalMatchOutcome
in class AbstractNestedCondition
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.