Class StandardMethodMetadata

    • Constructor Detail

      • StandardMethodMetadata

        public StandardMethodMetadata​(Method introspectedMethod)
        Create a new StandardMethodMetadata wrapper for the given Method.
        Parameters:
        introspectedMethod - the Method to introspect
      • StandardMethodMetadata

        public StandardMethodMetadata​(Method introspectedMethod,
                                      boolean nestedAnnotationsAsMap)
        Create a new StandardMethodMetadata wrapper for the given Method, providing the option to return any nested annotations or annotation arrays in the form of AnnotationAttributes instead of actual Annotation instances.
        Parameters:
        introspectedMethod - the Method to introspect
        nestedAnnotationsAsMap - return nested annotations and annotation arrays as AnnotationAttributes for compatibility with ASM-based AnnotationMetadata implementations
        Since:
        3.1.1
    • Method Detail

      • isAbstract

        public boolean isAbstract()
        Description copied from interface: MethodMetadata
        Return whether the underlying method is effectively abstract: i.e. marked as abstract on a class or declared as a regular, non-default method in an interface.
        Specified by:
        isAbstract in interface MethodMetadata
      • 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)