public interface MethodDelegate<OUT>
Typically, an instance implementing MethodDelegate and another target
interface (for example MyService) is generated dynamically (see
GenerateMethodDelegate). When methods of MyService are called
on the generated instance, they are forwarded to the delegate object
set via the delegate(Object) method, provided that the delegate also
implements MyService.
The type parameter <OUT> specifies the type of the delegate object to
which methods will be forwarded.
| Modifier and Type | Method and Description |
|---|---|
void |
delegate(OUT delegate)
Sets the delegate to which method invocations will be forwarded.
|
void delegate(OUT delegate)
This mechanism allows the delegation of method calls to an alternate implementation,
enabling behaviours such as logging, mocking or additional processing. The provided
delegate should typically implement the same business interface(s) as the
proxy that implements this MethodDelegate interface so that calls can be
successfully forwarded.
delegate - The target object of type OUT that will receive the
forwarded method calls.Copyright © 2026 Chronicle Software Ltd. All rights reserved.