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

addIfAbsentIgnoresExistingProperty() — spring-boot Function Reference

Architecture documentation for the addIfAbsentIgnoresExistingProperty() function in MetadataCollectorTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  f2414eaf_c405_e3bc_0fb3_d5780d9383e8["addIfAbsentIgnoresExistingProperty()"]
  c04718c1_4f96_61c9_8fb3_d6e3b5819110["createSimpleCollector()"]
  f2414eaf_c405_e3bc_0fb3_d5780d9383e8 -->|calls| c04718c1_4f96_61c9_8fb3_d6e3b5819110
  c8c9e7f6_e856_4711_6fe7_b1c2aeb3d239["getItems()"]
  f2414eaf_c405_e3bc_0fb3_d5780d9383e8 -->|calls| c8c9e7f6_e856_4711_6fe7_b1c2aeb3d239
  a4041ee3_920f_3ffa_6d69_6e3bcd2c6cdc["withProperty()"]
  f2414eaf_c405_e3bc_0fb3_d5780d9383e8 -->|calls| a4041ee3_920f_3ffa_6d69_6e3bcd2c6cdc
  style f2414eaf_c405_e3bc_0fb3_d5780d9383e8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/MetadataCollectorTests.java lines 73–82

	@Test
	void addIfAbsentIgnoresExistingProperty() {
		MetadataCollector collector = createSimpleCollector();
		collector.addIfAbsent(SINGLE_ITEM_METADATA.getItems().get(0));
		collector.addIfAbsent(SINGLE_ITEM_METADATA.getItems().get(0));
		collector.addIfAbsent(SINGLE_ITEM_METADATA.getItems().get(0));
		ConfigurationMetadata metadata = collector.getMetadata();
		assertThat(metadata).has(Metadata.withProperty("name", String.class));
		assertThat(metadata.getItems()).hasSize(1);
	}

Domain

Subdomains

Frequently Asked Questions

What does addIfAbsentIgnoresExistingProperty() do?
addIfAbsentIgnoresExistingProperty() is a function in the spring-boot codebase.
What does addIfAbsentIgnoresExistingProperty() call?
addIfAbsentIgnoresExistingProperty() calls 3 function(s): createSimpleCollector, getItems, withProperty.

Analyze Your Own Codebase

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

Try Supermodel Free