Class ConditionEvaluationReport
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport
public final class ConditionEvaluationReport extends Object
Records condition evaluation details for reporting and logging.
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConditionEvaluationReport.ConditionAndOutcome
Provides access to a singleCondition
andConditionOutcome
.static class
ConditionEvaluationReport.ConditionAndOutcomes
Provides access to a number ofConditionEvaluationReport.ConditionAndOutcome
items.
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConditionEvaluationReport
find(org.springframework.beans.factory.BeanFactory beanFactory)
Attempt to find theConditionEvaluationReport
for the specified bean factory.static ConditionEvaluationReport
get(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Obtain aConditionEvaluationReport
for the specified bean factory.Map<String,ConditionEvaluationReport.ConditionAndOutcomes>
getConditionAndOutcomesBySource()
Returns condition outcomes from this report, grouped by the source.ConditionEvaluationReport
getDelta(ConditionEvaluationReport previousReport)
List<String>
getExclusions()
Returns the names of the classes that have been excluded from condition evaluation.ConditionEvaluationReport
getParent()
The parent report (from a parent BeanFactory if there is one).Set<String>
getUnconditionalClasses()
Returns the names of the classes that were evaluated but were not conditional.void
recordConditionEvaluation(String source, org.springframework.context.annotation.Condition condition, ConditionOutcome outcome)
Record the occurrence of condition evaluation.void
recordEvaluationCandidates(List<String> evaluationCandidates)
Records the names of the classes that are candidates for condition evaluation.void
recordExclusions(Collection<String> exclusions)
Records the names of the classes that have been excluded from condition evaluation.
Method Detail
recordConditionEvaluation
public void recordConditionEvaluation(String source, org.springframework.context.annotation.Condition condition, ConditionOutcome outcome)
Record the occurrence of condition evaluation.- Parameters:
source
- the source of the condition (class or method name)condition
- the condition evaluatedoutcome
- the condition outcome
recordExclusions
public void recordExclusions(Collection<String> exclusions)
Records the names of the classes that have been excluded from condition evaluation.- Parameters:
exclusions
- the names of the excluded classes
recordEvaluationCandidates
public void recordEvaluationCandidates(List<String> evaluationCandidates)
Records the names of the classes that are candidates for condition evaluation.- Parameters:
evaluationCandidates
- the names of the classes whose conditions will be evaluated
getConditionAndOutcomesBySource
public Map<String,ConditionEvaluationReport.ConditionAndOutcomes> getConditionAndOutcomesBySource()
Returns condition outcomes from this report, grouped by the source.- Returns:
- the condition outcomes
getExclusions
public List<String> getExclusions()
Returns the names of the classes that have been excluded from condition evaluation.- Returns:
- the names of the excluded classes
getUnconditionalClasses
public Set<String> getUnconditionalClasses()
Returns the names of the classes that were evaluated but were not conditional.- Returns:
- the names of the unconditional classes
getParent
public ConditionEvaluationReport getParent()
The parent report (from a parent BeanFactory if there is one).- Returns:
- the parent report (or null if there isn't one)
find
public static ConditionEvaluationReport find(org.springframework.beans.factory.BeanFactory beanFactory)
Attempt to find theConditionEvaluationReport
for the specified bean factory.- Parameters:
beanFactory
- the bean factory (may benull
)- Returns:
- the
ConditionEvaluationReport
ornull
get
public static ConditionEvaluationReport get(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Obtain aConditionEvaluationReport
for the specified bean factory.- Parameters:
beanFactory
- the bean factory- Returns:
- an existing or new
ConditionEvaluationReport
getDelta
public ConditionEvaluationReport getDelta(ConditionEvaluationReport previousReport)