public static class MethodRouter.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected MethodForwardingInterceptor |
afterForwarding |
protected MethodForwardingInterceptor |
beforeForwarding |
protected ArgumentConversion[] |
consumingFrom |
protected ArgumentConversion |
producingTo |
| Constructor and Description |
|---|
Builder(String methodFrom)
Construct a new MethodRouter Builder.
|
| Modifier and Type | Method and Description |
|---|---|
MethodRouter.Builder |
after(MethodForwardingInterceptor interceptor)
Action to be performed after the method invocation is forwarded.
|
MethodRouter.Builder |
before(MethodForwardingInterceptor interceptor)
Action to be performed before the method invocation is forwarded.
|
MethodRouter |
build(Class<?> classExposed,
Class<?> classAdapted) |
MethodRouter.Builder |
consuming(ArgumentConversion... conversions) |
MethodRouter.Builder |
producing(ArgumentConversion conversion) |
MethodRouter.Builder |
to(String methodTo)
Sets the name of the destination method.
|
protected ArgumentConversion[] consumingFrom
protected ArgumentConversion producingTo
protected MethodForwardingInterceptor beforeForwarding
protected MethodForwardingInterceptor afterForwarding
public Builder(String methodFrom)
methodFrom - The name of the exposed interface's method from which this is routing.public MethodRouter.Builder to(String methodTo)
methodTo - The name of the adapted instance's method to which this is routing.public MethodRouter.Builder before(MethodForwardingInterceptor interceptor)
interceptor - The action to be performed.public MethodRouter.Builder after(MethodForwardingInterceptor interceptor)
interceptor - The action to be performed.public MethodRouter.Builder consuming(ArgumentConversion... conversions)
public MethodRouter.Builder producing(ArgumentConversion conversion)
public MethodRouter build(Class<?> classExposed, Class<?> classAdapted) throws NoSuchMethodException, AdapterException
Copyright © 2020 shadow-invoke. All rights reserved.