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

simplePropertiesSourceWithAdditionalMetadataHintIsMerged() — spring-boot Function Reference

Architecture documentation for the simplePropertiesSourceWithAdditionalMetadataHintIsMerged() function in ConfigurationMetadataAnnotationProcessorTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8["simplePropertiesSourceWithAdditionalMetadataHintIsMerged()"]
  4e7738f0_ea94_abd8_5384_e7be1344cace["compile()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 4e7738f0_ea94_abd8_5384_e7be1344cace
  6ba5298a_2b3e_c1e1_cfd1_cd60996092eb["withTestClasses()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 6ba5298a_2b3e_c1e1_cfd1_cd60996092eb
  d7874e43_39fb_ad99_1307_2590d858c405["withAdditionalMetadata()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| d7874e43_39fb_ad99_1307_2590d858c405
  6db1d912_8683_85db_65be_1a11eb09f91e["getMetadata()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 6db1d912_8683_85db_65be_1a11eb09f91e
  a1ee3ca0_f457_04de_111e_70671aafebc4["getSourceMetadataLocation()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| a1ee3ca0_f457_04de_111e_70671aafebc4
  a4041ee3_920f_3ffa_6d69_6e3bcd2c6cdc["withProperty()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| a4041ee3_920f_3ffa_6d69_6e3bcd2c6cdc
  70751124_3e92_ed3e_7f93_61d2e98490d3["ofType()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 70751124_3e92_ed3e_7f93_61d2e98490d3
  3a84f306_c04e_ed63_ecc7_7013edbb2681["withDefaultValue()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 3a84f306_c04e_ed63_ecc7_7013edbb2681
  facc73e3_5f28_4513_9b1f_79367931e644["withDescription()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| facc73e3_5f28_4513_9b1f_79367931e644
  3e16447d_1507_5130_db83_3555c87b4c39["withHint()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 3e16447d_1507_5130_db83_3555c87b4c39
  4b61c8e3_26fd_ba33_03bc_d518465e0979["withValue()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 4b61c8e3_26fd_ba33_03bc_d518465e0979
  c8c9e7f6_e856_4711_6fe7_b1c2aeb3d239["getItems()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| c8c9e7f6_e856_4711_6fe7_b1c2aeb3d239
  399daca2_1f8d_232a_1284_06a42c68c302["getHints()"]
  7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 -->|calls| 399daca2_1f8d_232a_1284_06a42c68c302
  style 7ee18f42_0c8f_5b61_fd38_a5743c7df2c8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java lines 820–853

		@Test
		void simplePropertiesSourceWithAdditionalMetadataHintIsMerged() {
			String additionalMetadata = """
					{
					 "hints": [
					   {
						 "name": "name",
						 "values": [
						   { "value": "boot", "description": "Spring Boot." },
						   { "value": "framework", "description": "Spring Framework." }
						 ]
					   }
					 ]
					}""";
			compile(withTestClasses(SimplePropertiesSource.class)
				.andThen(withAdditionalMetadata(SimplePropertiesSource.class, additionalMetadata)), (compiled) -> {
					ConfigurationMetadata metadata = CompiledMetadataReader.getMetadata(compiled,
							getSourceMetadataLocation(SimplePropertiesSource.class));
					assertThat(metadata).isNotNull()
						.has(Metadata.withProperty("name")
							.ofType(String.class)
							.withDefaultValue("boot")
							.withDescription("Description of this simple property."))
						.has(Metadata.withProperty("enabled")
							.ofType(Boolean.class)
							.withDefaultValue(false)
							.withDescription("Whether it is enabled."))
						.has(Metadata.withHint("name")
							.withValue(0, "boot", "Spring Boot.")
							.withValue(1, "framework", "Spring Framework."));
					assertThat(metadata.getItems()).hasSize(2);
					assertThat(metadata.getHints()).hasSize(1);
				});
		}

Domain

Subdomains

Frequently Asked Questions

What does simplePropertiesSourceWithAdditionalMetadataHintIsMerged() do?
simplePropertiesSourceWithAdditionalMetadataHintIsMerged() is a function in the spring-boot codebase.
What does simplePropertiesSourceWithAdditionalMetadataHintIsMerged() call?
simplePropertiesSourceWithAdditionalMetadataHintIsMerged() calls 13 function(s): compile, getHints, getItems, getMetadata, getSourceMetadataLocation, ofType, withAdditionalMetadata, withDefaultValue, and 5 more.

Analyze Your Own Codebase

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

Try Supermodel Free