whenNotNullExtracted() — spring-boot Function Reference
Architecture documentation for the whenNotNullExtracted() function in JsonWriterTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD c663741f_9cda_5703_6c7b_c351372eeef5["whenNotNullExtracted()"] 0d94726e_741b_9208_9d8c_ca4cd0f4cf12["of()"] c663741f_9cda_5703_6c7b_c351372eeef5 -->|calls| 0d94726e_741b_9208_9d8c_ca4cd0f4cf12 6fa7b03c_cdf4_1fed_b928_c9af7a88df4d["whenNotNull()"] c663741f_9cda_5703_6c7b_c351372eeef5 -->|calls| 6fa7b03c_cdf4_1fed_b928_c9af7a88df4d d61ef6a0_daf3_14b5_0e3c_0e18dc46fd10["quoted()"] c663741f_9cda_5703_6c7b_c351372eeef5 -->|calls| d61ef6a0_daf3_14b5_0e3c_0e18dc46fd10 style c663741f_9cda_5703_6c7b_c351372eeef5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/test/java/org/springframework/boot/json/JsonWriterTests.java lines 251–259
@Test
void whenNotNullExtracted() {
Person personWithNull = new Person("Spring", null, 10);
Function<@Nullable Person, @Nullable Object> lastName = (person) -> (person != null) ? person.lastName()
: null;
JsonWriter<Person> writer = JsonWriter.of((members) -> members.add().whenNotNull(lastName));
assertThat(writer.writeToString(PERSON)).isEqualTo(quoted("Spring Boot (10)"));
assertThat(writer.writeToString(personWithNull)).isEmpty();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does whenNotNullExtracted() do?
whenNotNullExtracted() is a function in the spring-boot codebase.
What does whenNotNullExtracted() call?
whenNotNullExtracted() calls 3 function(s): of, quoted, whenNotNull.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free