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

from() — spring-boot Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  3abf4861_b908_cc34_66db_49cc840c9fc1["from()"]
  49f4c43f_3dbd_58cc_d67d_ffaac0c7b46f["hasBrackets()"]
  3abf4861_b908_cc34_66db_49cc840c9fc1 -->|calls| 49f4c43f_3dbd_58cc_d67d_ffaac0c7b46f
  6540d4d7_fd57_5738_c001_b08d46a4cad4["findBetweenBrackets()"]
  3abf4861_b908_cc34_66db_49cc840c9fc1 -->|calls| 6540d4d7_fd57_5738_c001_b08d46a4cad4
  ca69a021_9670_c885_c367_f1679fb6f5a2["FileHint()"]
  3abf4861_b908_cc34_66db_49cc840c9fc1 -->|calls| ca69a021_9670_c885_c367_f1679fb6f5a2
  style 3abf4861_b908_cc34_66db_49cc840c9fc1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/main/java/org/springframework/boot/context/config/FileHint.java lines 105–125

	static FileHint from(String value) {
		if (!hasBrackets(value)) {
			return NONE;
		}
		List<String> betweenBrackets = findBetweenBrackets(value);
		Map<String, String> attributes = new HashMap<>();
		for (String entry : betweenBrackets) {
			String cleaned = entry.trim();
			if (cleaned.isEmpty()) {
				continue;
			}
			int equals = cleaned.indexOf('=');
			if (equals == -1) {
				attributes.put("extension", cleaned);
			}
			else {
				attributes.put(cleaned.substring(0, equals).trim(), cleaned.substring(equals + 1).trim());
			}
		}
		return new FileHint(Collections.unmodifiableMap(attributes));
	}

Domain

Subdomains

Calls

  • FileHint()
  • findBetweenBrackets()
  • hasBrackets()

Frequently Asked Questions

What does from() do?
from() is a function in the spring-boot codebase.
What does from() call?
from() calls 3 function(s): FileHint, findBetweenBrackets, hasBrackets.

Analyze Your Own Codebase

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

Try Supermodel Free