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
ConstructorsModifierConstructorDescriptionprotectedAbstractBeanMethod(@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 AnnotationMetadataSupplies the metadata.final Argument<?>[]The required argument types.getName()final @NonNull ReturnType<T>Invokes the method.protected abstract TinvokeInternal(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, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods 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:
getDeclaringBeanin interfaceBeanMethod<B,T> - Returns:
- The declaring bean introspection.
-
getReturnType
- Specified by:
getReturnTypein interfaceBeanMethod<B,T> - Returns:
- The return type.
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
getName
-
getArguments
Description copied from interface:ExecutableThe required argument types.- Specified by:
getArgumentsin interfaceExecutable<B,T> - Returns:
- The arguments
-
invoke
Description copied from interface:ExecutableInvokes the method.- Specified by:
invokein 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
-