public class TextMethodWriterInvocationHandler extends AbstractMethodWriterInvocationHandler
MethodWriterInvocationHandler that serialises method calls to a
text-based MarshallableOut such as YAML or JSON. Each invocation
is wrapped in a WriteDocumentContext and numeric arguments annotated
with LongConversion are rendered via the associated
LongConverter.genericEvent, recordHistory| Constructor and Description |
|---|
TextMethodWriterInvocationHandler(Class<?> tClass,
@NotNull Supplier<MarshallableOut> marshallableOutSupplier)
Creates a handler that obtains its output destination lazily.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvoke(Object proxy,
Method method,
Object[] args)
Handles a direct
writingDocument() call on the proxy before
deferring to the superclass for normal method processing. |
protected void |
handleInvoke(Method method,
Object[] args)
Converts arguments if needed and writes the method call to the underlying
text wire within a
WriteDocumentContext. |
genericEvent, handleInvoke, recordHistory, useMethodIdsinvoke, onCloseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinvokepublic TextMethodWriterInvocationHandler(Class<?> tClass, @NotNull @NotNull Supplier<MarshallableOut> marshallableOutSupplier)
tClass - primary interface for the method writermarshallableOutSupplier - supplier of the text-based outputprotected Object doInvoke(Object proxy, Method method, Object[] args)
writingDocument() call on the proxy before
deferring to the superclass for normal method processing.doInvoke in class AbstractMethodWriterInvocationHandlerprotected void handleInvoke(Method method, Object[] args)
WriteDocumentContext.handleInvoke in class AbstractMethodWriterInvocationHandlermethod - The method being invoked.args - Arguments provided for the method invocation.Copyright © 2026 Chronicle Software Ltd. All rights reserved.