public class GenerateMethodReader extends Object
MethodReaders.
The class dynamically generates Java source code based on the provided configurations and compiles them at runtime.
It offers the flexibility to create custom MethodReaders tailored to specific needs without manual coding.| Constructor and Description |
|---|
GenerateMethodReader(WireType wireType,
net.openhft.chronicle.bytes.MethodReaderInterceptorReturns interceptor,
Object[] metaDataHandler,
Object... instances)
Constructs a new instance of GenerateMethodReader.
|
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
createClass()
Generates and compiles the source code of a custom
MethodReader at runtime. |
String |
generatedClassName()
Gets the simple name of the generated class.
|
String |
packageName()
Retrieves the package name for the generated class.
|
public GenerateMethodReader(WireType wireType, net.openhft.chronicle.bytes.MethodReaderInterceptorReturns interceptor, Object[] metaDataHandler, Object... instances)
wireType - Configuration for serialization/deserializationinterceptor - An instance of MethodReaderInterceptorReturnsmetaDataHandler - Array of meta-data handlersinstances - Instances that dictate the structure of the generated MethodReaderpublic Class<?> createClass()
MethodReader at runtime.
It uses the configurations and instances provided during initialization.
If there are issues during compilation, it provides detailed error messages for easier debugging.public String packageName()
public String generatedClassName()
Copyright © 2024. All rights reserved.