Interface MethodMetadata
- All Superinterfaces:
AnnotatedTypeMetadata
- All Known Implementing Classes:
StandardMethodMetadata
Interface that defines abstract access to the annotations of a specific
method, in a form that does not require that method's class to be loaded yet.
- Since:
- 3.0
- Author:
- Juergen Hoeller, Mark Pollack, Chris Beams, Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet the fully-qualified name of the class that declares the underlying method.Get the name of the underlying method.Get the fully-qualified name of the underlying method's declared return type.static MethodMetadataintrospect(Method method) Factory method to create a newMethodMetadatainstance for the given method using standard reflection.booleanDetermine whether the underlying method is effectively abstract: i.e.booleanisFinal()Determine whether the underlying method is marked as 'final'.booleanDetermine whether the underlying method is overridable, i.e.booleanisStatic()Determine whether the underlying method is declared as 'static'.Methods inherited from interface AnnotatedTypeMetadata
getAllAnnotationAttributes, getAllAnnotationAttributes, getAnnotationAttributes, getAnnotationAttributes, getAnnotations, getMergedRepeatableAnnotationAttributes, getMergedRepeatableAnnotationAttributes, getMergedRepeatableAnnotationAttributes, isAnnotated
-
Method Details
-
getMethodName
String getMethodName()Get the name of the underlying method. -
getDeclaringClassName
String getDeclaringClassName()Get the fully-qualified name of the class that declares the underlying method. -
getReturnTypeName
String getReturnTypeName()Get the fully-qualified name of the underlying method's declared return type.- Since:
- 4.2
-
isAbstract
boolean isAbstract()Determine whether the underlying method is effectively abstract: i.e. marked as abstract in a class or declared as a regular, non-default method in an interface.- Since:
- 4.2
-
isStatic
boolean isStatic()Determine whether the underlying method is declared as 'static'. -
isFinal
boolean isFinal()Determine whether the underlying method is marked as 'final'. -
isOverridable
boolean isOverridable()Determine whether the underlying method is overridable, i.e. not marked as static, final, or private. -
introspect
Factory method to create a newMethodMetadatainstance for the given method using standard reflection.- Parameters:
method- the method to introspect- Returns:
- a new
MethodMetadatainstance - Since:
- 7.0
-