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

when() — spring-boot Function Reference

Architecture documentation for the when() function in JsonWriter.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  799878d3_171a_6420_35ef_9b1176e2d5e6["when()"]
  09510782_bfd4_cf98_4905_11e27292b669["whenNotNull()"]
  09510782_bfd4_cf98_4905_11e27292b669 -->|calls| 799878d3_171a_6420_35ef_9b1176e2d5e6
  f48a50d1_ddbc_22d1_6b49_38fc95f9d284["whenHasLength()"]
  f48a50d1_ddbc_22d1_6b49_38fc95f9d284 -->|calls| 799878d3_171a_6420_35ef_9b1176e2d5e6
  ece6bd2e_82b0_6491_04f6_e1228ca26600["whenNot()"]
  ece6bd2e_82b0_6491_04f6_e1228ca26600 -->|calls| 799878d3_171a_6420_35ef_9b1176e2d5e6
  style 799878d3_171a_6420_35ef_9b1176e2d5e6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/json/JsonWriter.java lines 440–444

		public Member<T> when(Predicate<? super @Nullable T> predicate) {
			Assert.notNull(predicate, "'predicate' must not be null");
			this.valueExtractor = this.valueExtractor.when(predicate);
			return this;
		}

Domain

Subdomains

Frequently Asked Questions

What does when() do?
when() is a function in the spring-boot codebase.
What calls when()?
when() is called by 3 function(s): whenHasLength, whenNot, whenNotNull.

Analyze Your Own Codebase

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

Try Supermodel Free