Interface MethodInjectionPoint<B,​T>

  • Type Parameters:
    B - The bean type
    T - The injectable type
    All Superinterfaces:
    io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, CallableInjectionPoint<B>, io.micronaut.core.type.Executable<B,​T>, InjectionPoint<B>

    public interface MethodInjectionPoint<B,​T>
    extends CallableInjectionPoint<B>, io.micronaut.core.type.Executable<B,​T>
    Defines an injection point for a method.
    Since:
    1.0
    • Field Summary

      • Fields inherited from interface io.micronaut.core.annotation.AnnotationSource

        EMPTY
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default java.lang.Class<B> getDeclaringType()  
      java.lang.reflect.Method getMethod()
      Resolves the Method instance.
      java.lang.String getName()  
      T invoke​(B instance, java.lang.Object... args)
      Invokes the method.
      boolean isPostConstructMethod()  
      boolean isPreDestroyMethod()  
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider

        findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
      • Methods inherited from interface io.micronaut.core.annotation.AnnotationSource

        getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
      • Methods inherited from interface io.micronaut.core.type.Executable

        getArguments
    • Method Detail

      • getMethod

        java.lang.reflect.Method getMethod()
        Resolves the Method instance. Note that this method will cause reflection metadata to be initialized and should be avoided.
        Returns:
        The setter to invoke to set said property
      • getName

        java.lang.String getName()
        Returns:
        The method name
      • isPreDestroyMethod

        boolean isPreDestroyMethod()
        Returns:
        Is this method a pre-destroy method
      • isPostConstructMethod

        boolean isPostConstructMethod()
        Returns:
        Is this method a post construct method
      • invoke

        T invoke​(B instance,
                 java.lang.Object... args)
        Invokes the method.
        Specified by:
        invoke in interface io.micronaut.core.type.Executable<B,​T>
        Parameters:
        instance - The instance
        args - The arguments. Should match the types of getArguments()
        Returns:
        The new value
      • getDeclaringType

        default java.lang.Class<B> getDeclaringType()
        Specified by:
        getDeclaringType in interface io.micronaut.core.type.Executable<B,​T>