Package io.micronaut.core.beans
Class AbstractBeanMethod<B,T>
java.lang.Object
io.micronaut.core.beans.AbstractBeanMethod<B,T>
- Type Parameters:
B
- The bean typeT
- The return type
- All Implemented Interfaces:
AnnotationMetadataProvider
,AnnotationSource
,BeanMethod<B,
,T> Named
,Executable<B,
T>
- Direct Known Subclasses:
AbstractExecutableBeanMethod
Abstract implementation of the
BeanMethod
interface.- Since:
- 2.3.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractBeanMethod
(@NonNull BeanIntrospection<B> introspection, @NonNull Argument<T> returnType, @NonNull String name, @Nullable AnnotationMetadata annotationMetadata, @Nullable Argument<?>... arguments) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal @NonNull AnnotationMetadata
Supplies the metadata.final Argument<?>[]
The required argument types.getName()
final @NonNull ReturnType<T>
Invokes the method.protected abstract T
invokeInternal
(B instance, Object... arguments) Abstract implementation implemented by generated byte code.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, 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.beans.BeanMethod
getDeclaringType
-
Constructor Details
-
AbstractBeanMethod
protected AbstractBeanMethod(@NonNull @NonNull BeanIntrospection<B> introspection, @NonNull @NonNull Argument<T> returnType, @NonNull @NonNull String name, @Nullable @Nullable AnnotationMetadata annotationMetadata, @Nullable @Nullable Argument<?>... arguments) Default constructor.- Parameters:
introspection
- The associated introspectionreturnType
- The return typename
- The name of the methodannotationMetadata
- The annotation metadataarguments
- The argument types
-
-
Method Details
-
getDeclaringBean
- Specified by:
getDeclaringBean
in interfaceBeanMethod<B,
T> - Returns:
- The declaring bean introspection.
-
getReturnType
- Specified by:
getReturnType
in interfaceBeanMethod<B,
T> - Returns:
- The return type.
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
getName
-
getArguments
Description copied from interface:Executable
The required argument types.- Specified by:
getArguments
in interfaceExecutable<B,
T> - Returns:
- The arguments
-
invoke
Description copied from interface:Executable
Invokes the method.- Specified by:
invoke
in interfaceExecutable<B,
T> - Parameters:
instance
- The instance. Nullable only if it's a static method call.arguments
- The arguments- Returns:
- The result
-
invokeInternal
Abstract implementation implemented by generated byte code.- Parameters:
instance
- The instancearguments
- The arguments- Returns:
- The result
-