findAnnotation() — spring-boot Function Reference
Architecture documentation for the findAnnotation() function in ConfigurationPropertiesBean.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD b85523a6_c328_b2f4_7432_1dca6dc64723["findAnnotation()"] 6848a3de_ee84_baed_d31a_8820dc89fd28["findAnnotations()"] 6848a3de_ee84_baed_d31a_8820dc89fd28 -->|calls| b85523a6_c328_b2f4_7432_1dca6dc64723 c209a51d_7b81_5cd0_10bf_6997040b38cd["findMergedAnnotation()"] b85523a6_c328_b2f4_7432_1dca6dc64723 -->|calls| c209a51d_7b81_5cd0_10bf_6997040b38cd 5fe9e097_d243_2cad_d20c_db584a0f1a0a["get()"] b85523a6_c328_b2f4_7432_1dca6dc64723 -->|calls| 5fe9e097_d243_2cad_d20c_db584a0f1a0a style b85523a6_c328_b2f4_7432_1dca6dc64723 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/context/properties/ConfigurationPropertiesBean.java lines 267–281
private static <A extends Annotation> @Nullable A findAnnotation(@Nullable Object instance, Class<?> type,
@Nullable Method factory, Class<A> annotationType) {
MergedAnnotation<A> annotation = MergedAnnotation.missing();
if (factory != null) {
annotation = findMergedAnnotation(factory, annotationType);
}
if (!annotation.isPresent()) {
annotation = findMergedAnnotation(type, annotationType);
}
if (!annotation.isPresent() && AopUtils.isAopProxy(instance)) {
annotation = MergedAnnotations.from(AopUtils.getTargetClass(instance), SearchStrategy.TYPE_HIERARCHY)
.get(annotationType);
}
return annotation.isPresent() ? annotation.synthesize() : null;
}
Domain
Subdomains
Called By
- findAnnotations()
Source
Frequently Asked Questions
What does findAnnotation() do?
findAnnotation() is a function in the spring-boot codebase.
What does findAnnotation() call?
findAnnotation() calls 2 function(s): findMergedAnnotation, get.
What calls findAnnotation()?
findAnnotation() is called by 1 function(s): findAnnotations.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free