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

containsDescendantOf() — spring-boot Function Reference

Architecture documentation for the containsDescendantOf() function in SpringIterableConfigurationPropertySource.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  7171db11_5f61_e663_4b18_123958611a86["containsDescendantOf()"]
  b8923f53_f057_a666_68a1_d0acc9a47029["getCache()"]
  7171db11_5f61_e663_4b18_123958611a86 -->|calls| b8923f53_f057_a666_68a1_d0acc9a47029
  36b81484_4680_4bb1_f137_3089b0e26b9d["getDescendants()"]
  7171db11_5f61_e663_4b18_123958611a86 -->|calls| 36b81484_4680_4bb1_f137_3089b0e26b9d
  c08472d1_0523_dcc9_5df2_017ca9268c5a["get()"]
  7171db11_5f61_e663_4b18_123958611a86 -->|calls| c08472d1_0523_dcc9_5df2_017ca9268c5a
  674c6da0_2391_7a56_3328_55d5c952976a["ancestorOfCheck()"]
  7171db11_5f61_e663_4b18_123958611a86 -->|calls| 674c6da0_2391_7a56_3328_55d5c952976a
  style 7171db11_5f61_e663_4b18_123958611a86 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/properties/source/SpringIterableConfigurationPropertySource.java lines 139–163

	@Override
	public ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name) {
		ConfigurationPropertyState result = super.containsDescendantOf(name);
		if (result != ConfigurationPropertyState.UNKNOWN) {
			return result;
		}
		if (this.ancestorOfCheck == PropertyMapper.DEFAULT_ANCESTOR_OF_CHECK) {
			Set<ConfigurationPropertyName> descendants = getCache().getDescendants();
			if (descendants != null) {
				if (name.isEmpty() && !descendants.isEmpty()) {
					return ConfigurationPropertyState.PRESENT;
				}
				return !descendants.contains(name) ? ConfigurationPropertyState.ABSENT
						: ConfigurationPropertyState.PRESENT;
			}
		}
		result = (this.containsDescendantOfCache != null) ? this.containsDescendantOfCache.get(name) : null;
		if (result == null) {
			result = (!ancestorOfCheck(name)) ? ConfigurationPropertyState.ABSENT : ConfigurationPropertyState.PRESENT;
			if (this.containsDescendantOfCache != null) {
				this.containsDescendantOfCache.put(name, result);
			}
		}
		return result;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does containsDescendantOf() do?
containsDescendantOf() is a function in the spring-boot codebase.
What does containsDescendantOf() call?
containsDescendantOf() calls 4 function(s): ancestorOfCheck, get, getCache, getDescendants.

Analyze Your Own Codebase

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

Try Supermodel Free