org.springframework.core.type
Interface MethodMetadata

All Known Implementing Classes:
StandardMethodMetadata

public interface MethodMetadata

Interface that defines abstract access to the annotations of a specific class, in a form that does not require that class to be loaded yet.

Since:
3.0
Author:
Mark Pollack, Juergen Hoeller
See Also:
StandardMethodMetadata, AnnotationMetadata.getAnnotatedMethods()

Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getAnnotationAttributes(java.lang.String annotationType)
          Retrieve the attributes of the annotation of the given type, if any (i.e.
 java.util.Set<java.lang.String> getAnnotationTypes()
          Return the names of all annotation types defined on the underlying method.
 java.lang.String getMethodName()
          Return the name of the method.
 boolean hasAnnotation(java.lang.String annotationType)
          Determine whether the underlying method has an annotation of the given type defined.
 boolean isFinal()
          Return whether the underlying method is marked as 'final'.
 boolean isOverridable()
          Return whether the underlying method is overridable, i.e.
 boolean isStatic()
          Return whether the underlying method is declared as 'static'.
 

Method Detail

getMethodName

java.lang.String getMethodName()
Return the name of the method.


isStatic

boolean isStatic()
Return whether the underlying method is declared as 'static'.


isFinal

boolean isFinal()
Return whether the underlying method is marked as 'final'.


isOverridable

boolean isOverridable()
Return whether the underlying method is overridable, i.e. not marked as static, final or private.


getAnnotationTypes

java.util.Set<java.lang.String> getAnnotationTypes()
Return the names of all annotation types defined on the underlying method.

Returns:
the annotation type names, or an empty Set if none found

hasAnnotation

boolean hasAnnotation(java.lang.String annotationType)
Determine whether the underlying method has an annotation of the given type defined.

Parameters:
annotationType - the annotation type to look for
Returns:
whether a matching annotation is defined

getAnnotationAttributes

java.util.Map<java.lang.String,java.lang.Object> getAnnotationAttributes(java.lang.String annotationType)
Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying method).

Parameters:
annotationType - 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.