Class IntrospectedExecutableMethod<T,R>
java.lang.Object
io.micronaut.reflection.IntrospectedExecutableMethod<T,R>
- Type Parameters:
T- The declaring typeR- The return type
- All Implemented Interfaces:
AnnotatedElement, AnnotationMetadata, AnnotationMetadataDelegate, AnnotationMetadataProvider, AnnotationSource, Described, Named, Executable<T,R>, UnsafeExecutable<T, R>, ExecutableMethod<T, R>, MethodReference<T, R>
An
ExecutableMethod over the BeanMethod of a bean introspection, for a
specification API that names a method by its Method: the arguments and the metadata are the ones
the introspection carries, generated or reflective, and the method itself is the one the caller gave.- Since:
- 5.2.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBERFields inherited from interface AnnotationSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionIntrospectedExecutableMethod(Class<T> declaringType, BeanMethod<T, R> beanMethod, Method method) Creates an executable method over the bean method of an introspection. -
Method Summary
Modifier and TypeMethodDescriptionbooleanSupplies the metadata.Argument<?>[]The required argument types.Class<?>[]BeanMethod<T, R> The bean method this executable method dispatches to.inthashCode()final RInvokes the method.@Nullable RinvokeUnsafe(T instance, @Nullable Object... arguments) Invokes the method without the arguments' validation.toString()Methods inherited from interface AnnotatedElement
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullableMethods inherited from interface AnnotationMetadata
enumValuesSet, enumValuesSet, getValues, hasDeclaredStereotype, 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, hasEvaluatedExpressions, hasPropertyExpressions, 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 ExecutableMethod
getDescription, getDescription, isAbstract, isSuspendMethods inherited from interface MethodReference
getArgumentNames, getName
-
Constructor Details
-
IntrospectedExecutableMethod
public IntrospectedExecutableMethod(Class<T> declaringType, BeanMethod<T, R> beanMethod, Method method) Creates an executable method over the bean method of an introspection.- Parameters:
declaringType- The type declaring the methodbeanMethod- The method of the introspection of that typemethod- The method the caller named
-
-
Method Details
-
getBeanMethod
The bean method this executable method dispatches to.- Returns:
- The bean method
-
getTargetMethod
- Returns:
- The target method
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Returns:
- The
AnnotationMetadata
-
invokeUnsafe
Description copied from interface:UnsafeExecutableInvokes the method without the arguments' validation.- Parameters:
instance- The instance. Nullable only if it's a static method call.arguments- The arguments- Returns:
- The result
-
equals
-
hashCode
public int hashCode() -
getDeclaringType
- Specified by:
getDeclaringTypein interfaceExecutable<T,R> - Specified by:
getDeclaringTypein interfaceMethodReference<T,R> - Returns:
- The declaring type
-
getMethodName
- Specified by:
getMethodNamein interfaceMethodReference<T,R> - Returns:
- The name of the method
-
getArguments
Description copied from interface:ExecutableThe required argument types.- Specified by:
getArgumentsin interfaceExecutable<T,R> - Specified by:
getArgumentsin interfaceMethodReference<T,R> - Returns:
- The arguments
-
getArgumentTypes
- Specified by:
getArgumentTypesin interfaceMethodReference<T,R> - Returns:
- The argument types
-
getReturnType
- Specified by:
getReturnTypein interfaceMethodReference<T,R> - Returns:
- Return the return type
-
invoke
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
-
toString
-