Class AbstractExecutableMethod<T,R>
java.lang.Object
io.micronaut.context.AbstractExecutableMethod<T,R>
- Type Parameters:
T- The declaring typeR- The result of the method call
- All Implemented Interfaces:
EnvironmentConfigurable, AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, Executable<T,R>, 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 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
- Author:
- Graeme Rocher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final 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.protected final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from interface AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractExecutableMethod(Class<T> declaringType, String methodName) Deprecated, for removal: This API element is subject to removal in a future version.protectedDeprecated, for removal: This API element is subject to removal in a future version.protectedAbstractExecutableMethod(Class<T> declaringType, String methodName, Argument<R> genericReturnType, Argument<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(Environment environment) Deprecated, for removal: This API element is subject to removal in a future version.Configure the component for the given environment.booleanDeprecated, 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.Supplies the metadata.Argument<?>[]Deprecated, for removal: This API element is subject to removal in a future version.The required argument types.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.Deprecated, for removal: This API element is subject to removal in a future version.final MethodDeprecated, for removal: This API element is subject to removal in a future version.Soft resolves the targetMethodavoiding reflection until as late as possible.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Does the metadata contain any property expressions like${foo.bar}.final @Nullable RDeprecated, for removal: This API element is subject to removal in a future version.Invokes the method.protected abstract @Nullable RinvokeInternal(T instance, @Nullable Object[] arguments) Deprecated, for removal: This API element is subject to removal in a future version.@Nullable RinvokeUnsafe(T instance, @Nullable Object... arguments) Deprecated, for removal: This API element is subject to removal in a future version.Invokes the method without the arguments' validation.protected AnnotationMetadataDeprecated, for removal: This API element is subject to removal in a future version.Resolves the annotation metadata for this method.protected MethodDeprecated, for removal: This API element is subject to removal in a future version.Resolves the target method.toString()Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, hasEvaluatedExpressions, hasStereotypeNonRepeating, isAnnotationPresent, isDeclaredAnnotationPresentMethods inherited from interface 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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface Executable
getArgumentsMethods inherited from interface ExecutableMethod
getDescription, getDescription, isAbstract, isSuspendMethods inherited from interface MethodReference
getArgumentNames, getArguments, getName, getTargetMethod
-
Field Details
-
declaringType
-
methodName
Deprecated, for removal: This API element is subject to removal in a future version. -
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, Argument<R> genericReturnType, Argument<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
declaringType- The declaring typemethodName- The method namegenericReturnType- The generic return typearguments- The arguments
-
AbstractExecutableMethod
protected AbstractExecutableMethod(Class<T> declaringType, String methodName, Argument<R> genericReturnType) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
declaringType- The declaring typemethodName- The method namegenericReturnType- The generic return type
-
AbstractExecutableMethod
-
-
Method Details
-
hasPropertyExpressions
public boolean hasPropertyExpressions()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AnnotationMetadataDoes the metadata contain any property expressions like${foo.bar}. Note this by default returnstrueas previous versions of Micronaut must assume metadata is present. The compilation time this is computed in order to decide whether to instrument annotation metadata with environment specific logic.- Specified by:
hasPropertyExpressionsin interfaceAnnotationMetadata- Specified by:
hasPropertyExpressionsin interfaceAnnotationMetadataDelegate- Specified by:
hasPropertyExpressionsin interfaceEnvironmentConfigurable- Returns:
- True if property expressions are present
-
getAnnotationMetadata
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
configure
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:EnvironmentConfigurableConfigure the component for the given environment.- Specified by:
configurein interfaceEnvironmentConfigurable- Parameters:
environment- The environment
-
equals
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
-
getReturnType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getReturnTypein interfaceMethodReference<T,R> - Returns:
- Return the return type
-
getArgumentTypes
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getArgumentTypesin interfaceMethodReference<T,R> - Returns:
- The argument types
-
getDeclaringType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getDeclaringTypein interfaceExecutable<T,R> - Specified by:
getDeclaringTypein interfaceMethodReference<T,R> - Returns:
- The declaring type
-
getMethodName
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getMethodNamein interfaceMethodReference<T,R> - Returns:
- The name of the method
-
invoke
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ExecutableInvokes the method.- Specified by:
invokein interfaceExecutable<T,R> - Parameters:
instance- The instance. Nullable only if it's a static method call.arguments- The arguments- Returns:
- The result
-
invokeUnsafe
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:UnsafeExecutableInvokes the method without the arguments' validation.- Specified by:
invokeUnsafein interfaceUnsafeExecutable<T,R> - Parameters:
instance- The instance. Nullable only if it's a static method call.arguments- The arguments- Returns:
- The result
-
invokeInternal
-
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
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ExecutableThe required argument types.- Specified by:
getArgumentsin interfaceExecutable<T,R> - Returns:
- The arguments
-
getTargetMethod
Deprecated, for removal: This API element is subject to removal in a future version.Soft resolves the targetMethodavoiding reflection until as late as possible.- Returns:
- The method
- Throws:
NoSuchMethodError- if the method doesn't exist
-
resolveTargetMethod
Deprecated, for removal: This API element is subject to removal in a future version.Resolves the target method.- Returns:
- The target method
-