public interface MethodExtension
ServiceImplInstance.fromInstance(Object, java.util.List) that lets a
framework recognize its own operation-handler annotation alongside OperationImpl.
Extensions are invoked for each method without OperationImpl that maps by method name
to an operation on the service. If the method belongs to the extension's annotation, the
extension returns its handler; otherwise it returns null so the next extension can be
consulted.
Extensions are responsible for their own validation of method shape (parameter types, return
type, modifiers) and for translating the method into an OperationHandler.
| Modifier and Type | Method and Description |
|---|---|
@Nullable OperationHandler<?,?> |
extract(java.lang.Object instance,
java.lang.reflect.Method method,
OperationDefinition operationDefinition)
Inspect
method on instance. |
@Nullable OperationHandler<?,?> extract(java.lang.Object instance, java.lang.reflect.Method method, OperationDefinition operationDefinition)
method on instance. Return an operation handler if the method is
recognized, or null to defer to the next extension.instance - the service implementation instancemethod - the method being scannedoperationDefinition - the operation matched to the method by method namenull if the method is not recognized