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

whenHasLengthOnNonString() — spring-boot Function Reference

Architecture documentation for the whenHasLengthOnNonString() function in JsonWriterTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  88fa0ee6_46b4_a912_1163_c2094950e43f["whenHasLengthOnNonString()"]
  0d94726e_741b_9208_9d8c_ca4cd0f4cf12["of()"]
  88fa0ee6_46b4_a912_1163_c2094950e43f -->|calls| 0d94726e_741b_9208_9d8c_ca4cd0f4cf12
  fd52a434_11b9_fcb8_5647_91e6fcf53672["whenHasLength()"]
  88fa0ee6_46b4_a912_1163_c2094950e43f -->|calls| fd52a434_11b9_fcb8_5647_91e6fcf53672
  d61ef6a0_daf3_14b5_0e3c_0e18dc46fd10["quoted()"]
  88fa0ee6_46b4_a912_1163_c2094950e43f -->|calls| d61ef6a0_daf3_14b5_0e3c_0e18dc46fd10
  style 88fa0ee6_46b4_a912_1163_c2094950e43f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/json/JsonWriterTests.java lines 269–275

		@Test
		void whenHasLengthOnNonString() {
			JsonWriter<StringBuilder> writer = JsonWriter.of((members) -> members.add().whenHasLength());
			assertThat(writer.writeToString(new StringBuilder("test"))).isEqualTo(quoted("test"));
			assertThat(writer.writeToString(new StringBuilder())).isEmpty();
			assertThat(writer.writeToString(null)).isEmpty();
		}

Domain

Subdomains

Frequently Asked Questions

What does whenHasLengthOnNonString() do?
whenHasLengthOnNonString() is a function in the spring-boot codebase.
What does whenHasLengthOnNonString() call?
whenHasLengthOnNonString() calls 3 function(s): of, quoted, whenHasLength.

Analyze Your Own Codebase

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

Try Supermodel Free