public class

StandardMethodMetadata

extends Object
implements MethodMetadata
java.lang.Object
   ↳ org.springframework.core.type.StandardMethodMetadata

Class Overview

MethodMetadata implementation that uses standard reflection to introspect a given Method.

Summary

Public Constructors
StandardMethodMetadata(Method introspectedMethod)
Create a new StandardMethodMetadata wrapper for the given Method.
Public Methods
Map<StringObject> getAnnotationAttributes(String annotationType)
Retrieve the attributes of the annotation of the given type, if any (i.e.
String getDeclaringClassName()
Return the fully-qualified name of the class that declares this method.
final Method getIntrospectedMethod()
Return the underlying Method.
String getMethodName()
Return the name of the method.
String getMethodReturnType()
Return the fully-qualified name of the return type of the method.
boolean isAnnotated(String annotationType)
Determine whether the underlying method has an annotation or meta-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'.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.core.type.MethodMetadata

Public Constructors

public StandardMethodMetadata (Method introspectedMethod)

Also: SpringCore

Create a new StandardMethodMetadata wrapper for the given Method.

Parameters
introspectedMethod the Method to introspect

Public Methods

public Map<StringObject> getAnnotationAttributes (String annotationType)

Also: SpringCore

Retrieve the attributes of the annotation of the given type, if any (i.e. if defined on the underlying method, as direct annotation or as meta-annotation).

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.

public String getDeclaringClassName ()

Also: SpringCore

Return the fully-qualified name of the class that declares this method.

public final Method getIntrospectedMethod ()

Also: SpringCore

Return the underlying Method.

public String getMethodName ()

Also: SpringCore

Return the name of the method.

public String getMethodReturnType ()

Also: SpringCore

Return the fully-qualified name of the return type of the method.

public boolean isAnnotated (String annotationType)

Also: SpringCore

Determine whether the underlying method has an annotation or meta-annotation of the given type defined.

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

public boolean isFinal ()

Also: SpringCore

Return whether the underlying method is marked as 'final'.

public boolean isOverridable ()

Also: SpringCore

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

public boolean isStatic ()

Also: SpringCore

Return whether the underlying method is declared as 'static'.