类 StandardAnnotationMetadata

    • 方法详细资料

      • hasAnnotation

        public boolean hasAnnotation​(String annotationName)
        从接口复制的说明: AnnotationMetadata
        Determine whether an annotation of the given type is present on the underlying class.
        指定者:
        hasAnnotation 在接口中 AnnotationMetadata
        参数:
        annotationName - the fully qualified class name of the annotation type to look for
        返回:
        true if a matching annotation is present
      • hasMetaAnnotation

        public boolean hasMetaAnnotation​(String annotationName)
        从接口复制的说明: AnnotationMetadata
        Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.
        指定者:
        hasMetaAnnotation 在接口中 AnnotationMetadata
        参数:
        annotationName - the fully qualified class name of the meta-annotation type to look for
        返回:
        true if a matching meta-annotation is present
      • getAnnotationAttributes

        public Map<String,​ObjectgetAnnotationAttributes​(String annotationName)
        从接口复制的说明: AnnotatedTypeMetadata
        Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation), also taking attribute overrides on composed annotations into account.
        指定者:
        getAnnotationAttributes 在接口中 AnnotatedTypeMetadata
        参数:
        annotationName - the fully qualified class name of the annotation type to look for
        返回:
        a Map of attributes, with the attribute name as key (e.g. "value") and the defined attribute value as Map value. This return value will be null if no matching annotation is defined.
      • getAnnotationAttributes

        public Map<String,​ObjectgetAnnotationAttributes​(String annotationName,
                                                                boolean classValuesAsString)
        从接口复制的说明: AnnotatedTypeMetadata
        Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation), also taking attribute overrides on composed annotations into account.
        指定者:
        getAnnotationAttributes 在接口中 AnnotatedTypeMetadata
        参数:
        annotationName - the fully qualified class name of the annotation type to look for
        classValuesAsString - whether to convert class references to String class names for exposure as values in the returned Map, instead of Class references which might potentially have to be loaded first
        返回:
        a Map of attributes, with the attribute name as key (e.g. "value") and the defined attribute value as Map value. This return value will be null if no matching annotation is defined.
      • getAllAnnotationAttributes

        public MultiValueMap<String,​ObjectgetAllAnnotationAttributes​(String annotationName,
                                                                             boolean classValuesAsString)
        从接口复制的说明: AnnotatedTypeMetadata
        Retrieve all attributes of all annotations of the given type, if any (i.e. if defined on the underlying element, as direct annotation or meta-annotation). Note that this variant does not take attribute overrides into account.
        指定者:
        getAllAnnotationAttributes 在接口中 AnnotatedTypeMetadata
        参数:
        annotationName - the fully qualified class name of the annotation type to look for
        classValuesAsString - whether to convert class references to String
        返回:
        a MultiMap of attributes, with the attribute name as key (e.g. "value") and a list of the defined attribute values as Map value. This return value will be null if no matching annotation is defined.
        另请参阅:
        AnnotatedTypeMetadata.getAllAnnotationAttributes(String)
      • hasAnnotatedMethods

        public boolean hasAnnotatedMethods​(String annotationName)
        从接口复制的说明: AnnotationMetadata
        Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.
        指定者:
        hasAnnotatedMethods 在接口中 AnnotationMetadata
        参数:
        annotationName - the fully qualified class name of the annotation type to look for