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

hasName() — spring-boot Function Reference

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

Function java GradlePlugin AotProcessing calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  83701cff_bed8_05a4_5bd0_16a08c63c2bf["hasName()"]
  588432ea_1cad_4f96_5f64_ea6658e568c2["isMatch()"]
  588432ea_1cad_4f96_5f64_ea6658e568c2 -->|calls| 83701cff_bed8_05a4_5bd0_16a08c63c2bf
  41cc5476_ef6c_3893_5cc9_4496aad72e52["get()"]
  83701cff_bed8_05a4_5bd0_16a08c63c2bf -->|calls| 41cc5476_ef6c_3893_5cc9_4496aad72e52
  8b48713f_bc64_db2d_a65d_bacbfd7ada67["getMethodName()"]
  83701cff_bed8_05a4_5bd0_16a08c63c2bf -->|calls| 8b48713f_bc64_db2d_a65d_bacbfd7ada67
  style 83701cff_bed8_05a4_5bd0_16a08c63c2bf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/diagnostics/analyzer/NoSuchBeanDefinitionFailureAnalyzer.java lines 259–271

		private boolean hasName(MethodMetadata methodMetadata, String name) {
			Map<String, @Nullable Object> attributes = methodMetadata.getAnnotationAttributes(Bean.class.getName());
			String[] candidates = (attributes != null) ? (String[]) attributes.get("name") : null;
			if (candidates != null) {
				for (String candidate : candidates) {
					if (candidate.equals(name)) {
						return true;
					}
				}
				return false;
			}
			return methodMetadata.getMethodName().equals(name);
		}

Domain

Subdomains

Called By

Frequently Asked Questions

What does hasName() do?
hasName() is a function in the spring-boot codebase.
What does hasName() call?
hasName() calls 2 function(s): get, getMethodName.
What calls hasName()?
hasName() is called by 1 function(s): isMatch.

Analyze Your Own Codebase

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

Try Supermodel Free