Package io.micronaut.core.bind
Interface BoundExecutable<T,R>
- Type Parameters:
T
-R
-
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,Executable<T,
R>
A bound
Executable
is an executable who argument values have been pre-bound to
values using a ArgumentBinderRegistry
.
Unlike a normal Executable
zero arguments are expected and an exception will
be thrown if the underlying target Executable
cannot be invoked with the current state-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault AnnotationMetadata
Supplies the metadata.default Argument[]
The required argument types.Object[]
That arguments that will be used to invoke the method.Executable<T,
R> If the executable can only be partially bound then this method will return the arguments that have not been bound.Invoke the boundExecutable
.default R
Invokes the method.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
-
Method Details
-
getTarget
Executable<T,R> getTarget()- Returns:
- The target executable
-
invoke
Invoke the boundExecutable
.- Parameters:
instance
- The target instance- Returns:
- The result
-
getBoundArguments
Object[] getBoundArguments()That arguments that will be used to invoke the method.- Returns:
- The arguments
-
getDeclaringType
- Specified by:
getDeclaringType
in interfaceExecutable<T,
R> - Returns:
- The declaring type
-
getUnboundArguments
If the executable can only be partially bound then this method will return the arguments that have not been bound.- Returns:
- The unbound arguments
-
invoke
Description copied from interface:Executable
Invokes the method.- Specified by:
invoke
in interfaceExecutable<T,
R> - Parameters:
instance
- The instance. Nullable only if it's a static method call.arguments
- The arguments- Returns:
- The result
-
getArguments
Description copied from interface:Executable
The required argument types.- Specified by:
getArguments
in interfaceExecutable<T,
R> - Returns:
- The arguments
-
getAnnotationMetadata
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-