Interface BeanMethod<B,T>

Type Parameters:
B - The bean type
T - The return type
All Superinterfaces:
AnnotationMetadataProvider, AnnotationSource, Executable<B,T>, Named
All Known Implementing Classes:
AbstractBeanMethod, AbstractExecutableBeanMethod

public interface BeanMethod<B,T> extends Executable<B,T>, Named
Represents a method on a BeanIntrospection.

A BeanMethod is created when an accessible method on a class is annotated with io.micronaut.context.annotation.Executable or an annotation stereotype annotated with that annotation

Since:
2.3.0
  • Method Details

    • getDeclaringBean

      BeanIntrospection<B> getDeclaringBean()
      Returns:
      The declaring bean introspection.
    • getReturnType

      ReturnType<T> getReturnType()
      Returns:
      The return type.
    • getDeclaredMethodAnnotationMetadata

      default AnnotationMetadata getDeclaredMethodAnnotationMetadata()
      The annotations this method declares itself: without the ones of the bean type, which AnnotationMetadataProvider.getAnnotationMetadata() combines with the ones of the method, and without the ones inherited from the methods it overrides, which
      invalid reference
      #getDeclaredMetadata()
      keeps. The runtime counterpart of MethodElement.getDeclaredMethodAnnotationMetadata() of the annotation processors.
      Returns:
      The annotation metadata of this method declaration only
      Since:
      5.2.0
    • getDeclaringType

      default Class<B> getDeclaringType()
      Specified by:
      getDeclaringType in interface Executable<B,T>
      Returns:
      The declaring type