Home / Type/ NameProcessor Type — spring-boot Architecture

NameProcessor Type — spring-boot Architecture

Architecture documentation for the NameProcessor type/interface in JsonWriter.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/main/java/org/springframework/boot/json/JsonWriter.java lines 941–963

	@FunctionalInterface
	interface NameProcessor {

		/**
		 * Return a new name for the JSON member or {@code null} if the member should be
		 * filtered entirely.
		 * @param path the path of the member
		 * @param existingName the existing and possibly already processed name.
		 * @return the new name
		 */
		@Nullable String processName(MemberPath path, String existingName);

		/**
		 * Factory method to create a new {@link NameProcessor} for the given operation.
		 * @param operation the operation to apply
		 * @return a new {@link NameProcessor} instance
		 */
		static NameProcessor of(UnaryOperator<String> operation) {
			Assert.notNull(operation, "'operation' must not be null");
			return (path, existingName) -> operation.apply(existingName);
		}

	}

Analyze Your Own Codebase

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

Try Supermodel Free