类 ConditionEvaluationReport
- java.lang.Object
- org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport
public final class ConditionEvaluationReport extends Object
Records condition evaluation details for reporting and logging.
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classConditionEvaluationReport.ConditionAndOutcomeProvides access to a singleConditionandConditionOutcome.static classConditionEvaluationReport.ConditionAndOutcomesProvides access to a number ofConditionEvaluationReport.ConditionAndOutcomeitems.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static ConditionEvaluationReportget(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)Obtain aConditionEvaluationReportfor the specified bean factory.Map<String,ConditionEvaluationReport.ConditionAndOutcomes>getConditionAndOutcomesBySource()Returns condition outcomes from this report, grouped by the source.List<String>getExclusions()Returns the names of the classes that have been excluded from condition evaluation.ConditionEvaluationReportgetParent()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.voidrecordConditionEvaluation(String source, org.springframework.context.annotation.Condition condition, ConditionOutcome outcome)Record the occurrence of condition evaluation.voidrecordEvaluationCandidates(List<String> evaluationCandidates)Records the names of the classes that are candidates for condition evaluation.voidrecordExclusions(Collection<String> exclusions)Records the names of the classes that have been excluded from condition evaluation.
方法详细资料
recordConditionEvaluation
public void recordConditionEvaluation(String source, org.springframework.context.annotation.Condition condition, ConditionOutcome outcome)
Record the occurrence of condition evaluation.- 参数:
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.- 参数:
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.- 参数:
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.- 返回:
- the condition outcomes
getExclusions
public List<String> getExclusions()
Returns the names of the classes that have been excluded from condition evaluation.- 返回:
- the names of the excluded classes
getUnconditionalClasses
public Set<String> getUnconditionalClasses()
Returns the names of the classes that were evaluated but were not conditional.- 返回:
- the names of the unconditional classes
getParent
public ConditionEvaluationReport getParent()
The parent report (from a parent BeanFactory if there is one).- 返回:
- the parent report (or null if there isn't one)
get
public static ConditionEvaluationReport get(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
Obtain aConditionEvaluationReportfor the specified bean factory.- 参数:
beanFactory- the bean factory- 返回:
- an existing or new
ConditionEvaluationReport