Currently, it is not possible to obtain the AnnotationMetadata of the importing class, while both ImportSelector and ImportBeanDefinitionRegistrar have access to annotation metadata. As a result, there is no way to access custom annotations and register custom beans based on annotation attributes.

Comment From: nosan

I totally forgot that it's possible to obtain AnnotationMetadata by implementing ImportAware. 🤦