类 AnnotationBeanNameGenerator

    • 方法详细资料

      • isStereotypeWithNameValue

        protected boolean isStereotypeWithNameValue​(String annotationType,
                                                    Set<String> metaAnnotationTypes,
                                                    Map<String,​Object> attributes)
        Check whether the given annotation is a stereotype that is allowed to suggest a component name through its annotation value().
        参数:
        annotationType - the name of the annotation class to check
        metaAnnotationTypes - the names of meta-annotations on the given annotation
        attributes - the map of attributes for the given annotation
        返回:
        whether the annotation qualifies as a stereotype with component name
      • buildDefaultBeanName

        protected String buildDefaultBeanName​(BeanDefinition definition)
        Derive a default bean name from the given bean definition.

        The default implementation simply builds a decapitalized version of the short class name: e.g. "mypackage.MyJdbcDao" -> "myJdbcDao".

        Note that inner classes will thus have names of the form "outerClassName.InnerClassName", which because of the period in the name may be an issue if you are autowiring by name.

        参数:
        definition - the bean definition to build a bean name for
        返回:
        the default bean name (never null)