Home / Function/ getMatchOutcome() — spring-boot Function Reference

getMatchOutcome() — spring-boot Function Reference

Architecture documentation for the getMatchOutcome() function in OnBeanCondition.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  43c9ea98_9071_6b63_b2a4_18a4917b5b73["getMatchOutcome()"]
  c5dd14dd_a95b_16d9_0aa1_85b3c1afc3cf["getAnnotations()"]
  43c9ea98_9071_6b63_b2a4_18a4917b5b73 -->|calls| c5dd14dd_a95b_16d9_0aa1_85b3c1afc3cf
  88a0bf69_b168_32a6_18fa_f66414a06bbd["evaluateConditionalOnBean()"]
  43c9ea98_9071_6b63_b2a4_18a4917b5b73 -->|calls| 88a0bf69_b168_32a6_18fa_f66414a06bbd
  e706c525_c692_a837_6df3_12565238243f["SingleCandidateSpec()"]
  43c9ea98_9071_6b63_b2a4_18a4917b5b73 -->|calls| e706c525_c692_a837_6df3_12565238243f
  fd603d49_4269_fbde_174b_b296c20d4b2d["evaluateConditionalOnSingleCandidate()"]
  43c9ea98_9071_6b63_b2a4_18a4917b5b73 -->|calls| fd603d49_4269_fbde_174b_b296c20d4b2d
  0728734f_676c_32d6_80e4_1a420d5d6239["evaluateConditionalOnMissingBean()"]
  43c9ea98_9071_6b63_b2a4_18a4917b5b73 -->|calls| 0728734f_676c_32d6_80e4_1a420d5d6239
  style 43c9ea98_9071_6b63_b2a4_18a4917b5b73 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnBeanCondition.java lines 127–155

	@Override
	public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
		ConditionOutcome matchOutcome = ConditionOutcome.match();
		MergedAnnotations annotations = metadata.getAnnotations();
		if (annotations.isPresent(ConditionalOnBean.class)) {
			Spec<ConditionalOnBean> spec = new Spec<>(context, metadata, annotations, ConditionalOnBean.class);
			matchOutcome = evaluateConditionalOnBean(spec, matchOutcome.getConditionMessage());
			if (!matchOutcome.isMatch()) {
				return matchOutcome;
			}
		}
		if (metadata.isAnnotated(ConditionalOnSingleCandidate.class.getName())) {
			Spec<ConditionalOnSingleCandidate> spec = new SingleCandidateSpec(context, metadata,
					metadata.getAnnotations());
			matchOutcome = evaluateConditionalOnSingleCandidate(spec, matchOutcome.getConditionMessage());
			if (!matchOutcome.isMatch()) {
				return matchOutcome;
			}
		}
		if (metadata.isAnnotated(ConditionalOnMissingBean.class.getName())) {
			Spec<ConditionalOnMissingBean> spec = new Spec<>(context, metadata, annotations,
					ConditionalOnMissingBean.class);
			matchOutcome = evaluateConditionalOnMissingBean(spec, matchOutcome.getConditionMessage());
			if (!matchOutcome.isMatch()) {
				return matchOutcome;
			}
		}
		return matchOutcome;
	}

Domain

Subdomains

Frequently Asked Questions

What does getMatchOutcome() do?
getMatchOutcome() is a function in the spring-boot codebase.
What does getMatchOutcome() call?
getMatchOutcome() calls 5 function(s): SingleCandidateSpec, evaluateConditionalOnBean, evaluateConditionalOnMissingBean, evaluateConditionalOnSingleCandidate, getAnnotations.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free