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

getMatchOutcome() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  395ffeeb_ea3f_f490_89bd_75c6a72c5571["getMatchOutcome()"]
  4be1ca61_d1ec_c1b4_bcb4_b39963998430["getMatchOutcome()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 4be1ca61_d1ec_c1b4_bcb4_b39963998430
  7ccc57a1_e9aa_f7a7_631b_b5cbe480d1bd["getEnabledProperty()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 7ccc57a1_e9aa_f7a7_631b_b5cbe480d1bd
  0603596b_b916_9d8c_1e66_83464ed39e67["forCondition()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 0603596b_b916_9d8c_1e66_83464ed39e67
  400896d2_90f4_d5de_f777_5e833f4199c0["found()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 400896d2_90f4_d5de_f777_5e833f4199c0
  cda33899_fd39_7aab_217d_1e0555883860["items()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| cda33899_fd39_7aab_217d_1e0555883860
  bc4686f6_5c18_5823_0aad_cec5e87474cb["noMatch()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| bc4686f6_5c18_5823_0aad_cec5e87474cb
  9f262352_bb60_ff6f_3b9a_90569ef55eff["didNotFind()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 9f262352_bb60_ff6f_3b9a_90569ef55eff
  5a1c2028_4a8a_cc42_55f6_96a2d5122a9c["because()"]
  395ffeeb_ea3f_f490_89bd_75c6a72c5571 -->|calls| 5a1c2028_4a8a_cc42_55f6_96a2d5122a9c
  style 395ffeeb_ea3f_f490_89bd_75c6a72c5571 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/OnEnabledResourceChainCondition.java lines 47–68

	@Override
	public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
		ConfigurableEnvironment environment = (ConfigurableEnvironment) context.getEnvironment();
		boolean fixed = getEnabledProperty(environment, "strategy.fixed.", false);
		boolean content = getEnabledProperty(environment, "strategy.content.", false);
		Boolean chain = getEnabledProperty(environment, "", null);
		Boolean match = Chain.getEnabled(fixed, content, chain);
		ConditionMessage.Builder message = ConditionMessage.forCondition(ConditionalOnEnabledResourceChain.class);
		if (match == null) {
			if (ClassUtils.isPresent(WEBJAR_VERSION_LOCATOR, getClass().getClassLoader())) {
				return ConditionOutcome.match(message.found("class").items(WEBJAR_VERSION_LOCATOR));
			}
			if (ClassUtils.isPresent(WEBJAR_ASSET_LOCATOR, getClass().getClassLoader())) {
				return ConditionOutcome.match(message.found("class").items(WEBJAR_ASSET_LOCATOR));
			}
			return ConditionOutcome.noMatch(message.didNotFind("class").items(WEBJAR_VERSION_LOCATOR));
		}
		if (match) {
			return ConditionOutcome.match(message.because("enabled"));
		}
		return ConditionOutcome.noMatch(message.because("disabled"));
	}

Domain

Subdomains

Frequently Asked Questions

What does getMatchOutcome() do?
getMatchOutcome() is a function in the spring-boot codebase.
What does getMatchOutcome() call?
getMatchOutcome() calls 8 function(s): because, didNotFind, forCondition, found, getEnabledProperty, getMatchOutcome, items, noMatch.

Analyze Your Own Codebase

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

Try Supermodel Free