Class AbstractExecutableMethod<T,R>

java.lang.Object
io.micronaut.context.AbstractExecutableMethod<T,R>
Type Parameters:
T - The declaring type
R - The result of the method call
All Implemented Interfaces:
EnvironmentConfigurable, io.micronaut.core.annotation.AnnotatedElement, io.micronaut.core.annotation.AnnotationMetadata, io.micronaut.core.annotation.AnnotationMetadataDelegate, io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.type.Executable<T,R>, io.micronaut.core.type.UnsafeExecutable<T,R>, ExecutableMethod<T,R>, MethodReference<T,R>

@Deprecated(since="5.0", forRemoval=true) @Internal public abstract class AbstractExecutableMethod<T,R> extends Object implements io.micronaut.core.type.UnsafeExecutable<T,R>, ExecutableMethod<T,R>, EnvironmentConfigurable
Deprecated, for removal: This API element is subject to removal in a future version.
No longer needed

Abstract base class for generated ExecutableMethod classes to implement. The generated classes should implement the Executable.invoke(Object, Object...) method at compile time providing direct dispatch of the target method

Since:
1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<?>[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final Class<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final String
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER

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

    EMPTY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractExecutableMethod(Class<T> declaringType, String methodName)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected
    AbstractExecutableMethod(Class<T> declaringType, String methodName, io.micronaut.core.type.Argument<R> genericReturnType)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected
    AbstractExecutableMethod(Class<T> declaringType, String methodName, io.micronaut.core.type.Argument<R> genericReturnType, io.micronaut.core.type.Argument<?>... arguments)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(Environment environment)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Configure the component for the given environment.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.micronaut.core.annotation.AnnotationMetadata
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.micronaut.core.type.Argument<?>[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Class<?>[]
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    io.micronaut.core.type.ReturnType<R>
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final Method
    Deprecated, for removal: This API element is subject to removal in a future version.
    Soft resolves the target Method avoiding reflection until as late as possible.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final @Nullable R
    invoke(T instance, @Nullable Object... arguments)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected abstract @Nullable R
    invokeInternal(T instance, @Nullable Object[] arguments)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @Nullable R
    invokeUnsafe(T instance, @Nullable Object... arguments)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected io.micronaut.core.annotation.AnnotationMetadata
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resolves the annotation metadata for this method.
    protected Method
    Deprecated, for removal: This API element is subject to removal in a future version.
    Resolves the target method.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.micronaut.core.annotation.AnnotatedElement

    isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata

    enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresent

    Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate

    booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, copyAnnotationMetadata, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByName, getAnnotationValuesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByName, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getTargetAnnotationMetadata, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType

    Methods inherited from interface io.micronaut.core.type.Executable

    getArguments

    Methods inherited from interface ExecutableMethod

    getDescription, getDescription, isAbstract, isSuspend
  • Field Details

    • declaringType

      protected final Class<T> declaringType
      Deprecated, for removal: This API element is subject to removal in a future version.
    • methodName

      protected final String methodName
      Deprecated, for removal: This API element is subject to removal in a future version.
    • argTypes

      protected final Class<?>[] argTypes
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • AbstractExecutableMethod

      protected AbstractExecutableMethod(Class<T> declaringType, String methodName, io.micronaut.core.type.Argument<R> genericReturnType, io.micronaut.core.type.Argument<?>... arguments)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      declaringType - The declaring type
      methodName - The method name
      genericReturnType - The generic return type
      arguments - The arguments
    • AbstractExecutableMethod

      protected AbstractExecutableMethod(Class<T> declaringType, String methodName, io.micronaut.core.type.Argument<R> genericReturnType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      declaringType - The declaring type
      methodName - The method name
      genericReturnType - The generic return type
    • AbstractExecutableMethod

      protected AbstractExecutableMethod(Class<T> declaringType, String methodName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      declaringType - The declaring type
      methodName - The method name
  • Method Details

    • hasPropertyExpressions

      public boolean hasPropertyExpressions()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      hasPropertyExpressions in interface io.micronaut.core.annotation.AnnotationMetadata
      Specified by:
      hasPropertyExpressions in interface io.micronaut.core.annotation.AnnotationMetadataDelegate
      Specified by:
      hasPropertyExpressions in interface EnvironmentConfigurable
      Returns:
      Whether any environment specific property expressions exist in the object.
    • getAnnotationMetadata

      public io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProvider
    • configure

      public void configure(Environment environment)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: EnvironmentConfigurable
      Configure the component for the given environment.
      Specified by:
      configure in interface EnvironmentConfigurable
      Parameters:
      environment - The environment
    • equals

      public boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object
    • getReturnType

      public io.micronaut.core.type.ReturnType<R> getReturnType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getReturnType in interface MethodReference<T,R>
      Returns:
      Return the return type
    • getArgumentTypes

      public Class<?>[] getArgumentTypes()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getArgumentTypes in interface MethodReference<T,R>
      Returns:
      The argument types
    • getDeclaringType

      public Class<T> getDeclaringType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getDeclaringType in interface io.micronaut.core.type.Executable<T,R>
      Specified by:
      getDeclaringType in interface MethodReference<T,R>
      Returns:
      The bean that declares this injection point
    • getMethodName

      public String getMethodName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getMethodName in interface MethodReference<T,R>
      Returns:
      The name of the method
    • invoke

      public final @Nullable R invoke(T instance, @Nullable Object... arguments)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      invoke in interface io.micronaut.core.type.Executable<T,R>
    • invokeUnsafe

      public @Nullable R invokeUnsafe(T instance, @Nullable Object... arguments)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      invokeUnsafe in interface io.micronaut.core.type.UnsafeExecutable<T,R>
    • invokeInternal

      protected abstract @Nullable R invokeInternal(T instance, @Nullable Object[] arguments)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      instance - The instance
      arguments - The arguments
      Returns:
      The result
    • resolveAnnotationMetadata

      protected io.micronaut.core.annotation.AnnotationMetadata resolveAnnotationMetadata()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolves the annotation metadata for this method. Subclasses
      Returns:
      The AnnotationMetadata
    • getArguments

      public io.micronaut.core.type.Argument<?>[] getArguments()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getArguments in interface io.micronaut.core.type.Executable<T,R>
    • getTargetMethod

      public final Method getTargetMethod()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Soft resolves the target Method avoiding reflection until as late as possible.
      Returns:
      The method
      Throws:
      NoSuchMethodError - if the method doesn't exist
    • resolveTargetMethod

      protected Method resolveTargetMethod()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Resolves the target method.
      Returns:
      The target method