public class GenerateMethodWriter extends Object
MarshallableOut
destination using a chosen WireType.
Each target interface is inspected and an implementation is produced that
forwards calls to the matching ValueOut method on a Wire.
The resulting class is compiled and loaded at runtime. It is primarily used
by VanillaMethodWriterBuilder when code generation is enabled.
This implementation predates GenerateMethodWriter2 and exists for
specific use cases.
VanillaMethodWriterBuilder,
MethodWriter| Modifier and Type | Field and Description |
|---|---|
static String |
UPDATE_INTERCEPTOR |
| Modifier and Type | Method and Description |
|---|---|
static DocumentContext |
acquireDocumentContext(boolean metaData,
ThreadLocal<DocumentContextHolder> documentContextTL,
MarshallableOut out)
Acquires a
DocumentContext instance, either by reusing the existing one from the thread-local
context holder if it's not closed or by creating a new one using the provided output. |
static @Nullable Class<?> |
newClass(String fullClassName,
Set<Class<?>> interfaces,
ClassLoader classLoader,
WireType wireType,
String genericEvent,
boolean metaData,
boolean useMethodId,
boolean useUpdateInterceptor,
boolean verboseTypes)
Creates and compiles a new method writer class based on the provided interface class.
|
public static final String UPDATE_INTERCEPTOR
@Nullable public static @Nullable Class<?> newClass(String fullClassName, Set<Class<?>> interfaces, ClassLoader classLoader, WireType wireType, String genericEvent, boolean metaData, boolean useMethodId, boolean useUpdateInterceptor, boolean verboseTypes)
fullClassName - Fully qualified class name for the generated proxy class.interfaces - A set of interface classes that the generated proxy class will implement.classLoader - The class loader to use for generating the proxy class.wireType - The wire type for serialization.genericEvent - The generic event type.metaData - Indicates if metadata should be included.useMethodId - Indicates if MethodId should be used.useUpdateInterceptor - Indicates if the UpdateInterceptor should be used.verboseTypes - Indicates if verbose types should be used.null if it can't be created.public static DocumentContext acquireDocumentContext(boolean metaData, ThreadLocal<DocumentContextHolder> documentContextTL, MarshallableOut out)
DocumentContext instance, either by reusing the existing one from the thread-local
context holder if it's not closed or by creating a new one using the provided output.metaData - Indicates if metadata should be included in the DocumentContext.documentContextTL - The thread-local holder of the DocumentContext.out - The output where the document will be written.DocumentContext.Copyright © 2026 Chronicle Software Ltd. All rights reserved.