Package io.micronaut.core.bind
Interface BoundExecutable<T,R>
-
- Type Parameters:
T-R-
- All Superinterfaces:
AnnotationMetadataProvider,AnnotationSource,Executable<T,R>
public interface BoundExecutable<T,R> extends Executable<T,R>
A boundExecutableis an executable who argument values have been pre-bound to values using aArgumentBinderRegistry. Unlike a normalExecutablezero arguments are expected and an exception will be thrown if the underlying targetExecutablecannot be invoked with the current state
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AnnotationMetadatagetAnnotationMetadata()Supplies the metadata.default Argument[]getArguments()The required argument types.java.lang.Object[]getBoundArguments()That arguments that will be used to invoke the method.default java.lang.Class<T>getDeclaringType()Executable<T,R>getTarget()default java.util.List<Argument<?>>getUnboundArguments()If the executable can only be partially bound then this method will return the arguments that have not been bound.Rinvoke(T instance)Invoke the boundExecutable.default Rinvoke(T instance, java.lang.Object... arguments)Invokes the method.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, 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 Detail
-
getTarget
Executable<T,R> getTarget()
- Returns:
- The target executable
-
invoke
R invoke(T instance)
Invoke the boundExecutable.- Parameters:
instance- The target instance- Returns:
- The result
-
getBoundArguments
java.lang.Object[] getBoundArguments()
That arguments that will be used to invoke the method.- Returns:
- The arguments
-
getDeclaringType
default java.lang.Class<T> getDeclaringType()
- Specified by:
getDeclaringTypein interfaceExecutable<T,R>- Returns:
- The declaring type
-
getUnboundArguments
default java.util.List<Argument<?>> 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
default R invoke(T instance, java.lang.Object... arguments)
Description copied from interface:ExecutableInvokes the method.- Specified by:
invokein interfaceExecutable<T,R>- Parameters:
instance- The instancearguments- The arguments- Returns:
- The result
-
getArguments
default Argument[] getArguments()
Description copied from interface:ExecutableThe required argument types.- Specified by:
getArgumentsin interfaceExecutable<T,R>- Returns:
- The arguments
-
getAnnotationMetadata
default AnnotationMetadata getAnnotationMetadata()
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain interfaceAnnotationMetadataProvider- Returns:
- The
AnnotationMetadata
-
-