Class StandardAnnotationMetadata

    • Method Detail

      • getMetaAnnotationTypes

        public Set<StringgetMetaAnnotationTypes​(String annotationName)
        Description copied from interface: AnnotationMetadata
        Get the fully qualified class names of all meta-annotation types that are present on the given annotation type on the underlying class.
        Specified by:
        getMetaAnnotationTypes in interface AnnotationMetadata
        Parameters:
        annotationName - the fully qualified class name of the meta-annotation type to look for
        Returns:
        the meta-annotation type names
      • hasAnnotation

        public boolean hasAnnotation​(String annotationName)
        Description copied from interface: AnnotationMetadata
        Determine whether an annotation of the given type is present on the underlying class.
        Specified by:
        hasAnnotation in interface AnnotationMetadata
        Parameters:
        annotationName - the fully qualified class name of the annotation type to look for
        Returns:
        true if a matching annotation is present
      • hasMetaAnnotation

        public boolean hasMetaAnnotation​(String annotationName)
        Description copied from interface: AnnotationMetadata
        Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.
        Specified by:
        hasMetaAnnotation in interface AnnotationMetadata
        Parameters:
        annotationName - the fully qualified class name of the meta-annotation type to look for
        Returns:
        true if a matching meta-annotation is present
      • getAnnotationAttributes

        public Map<String,​ObjectgetAnnotationAttributes​(String annotationName)
        Description copied from interface: 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.
        Specified by:
        getAnnotationAttributes in interface AnnotatedTypeMetadata
        Parameters:
        annotationName - the fully qualified class name of the annotation type to look for
        Returns:
        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)
        Description copied from interface: 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.
        Specified by:
        getAnnotationAttributes in interface AnnotatedTypeMetadata
        Parameters:
        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
        Returns:
        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)
        Description copied from interface: 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.
        Specified by:
        getAllAnnotationAttributes in interface AnnotatedTypeMetadata
        Parameters:
        annotationName - the fully qualified class name of the annotation type to look for
        classValuesAsString - whether to convert class references to String
        Returns:
        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.
        See Also:
        AnnotatedTypeMetadata.getAllAnnotationAttributes(String)
      • hasAnnotatedMethods

        public boolean hasAnnotatedMethods​(String annotationName)
        Description copied from interface: AnnotationMetadata
        Determine whether the underlying class has any methods that are annotated (or meta-annotated) with the given annotation type.
        Specified by:
        hasAnnotatedMethods in interface AnnotationMetadata
        Parameters:
        annotationName - the fully qualified class name of the annotation type to look for