public class WireSerializedLambda extends Object implements ReadMarshallable, net.openhft.chronicle.core.util.ReadResolvable
This class provides functionalities to check if a class is a serializable lambda and
serialize it using the Wire format. It uses Java's SerializedLambda mechanism
to capture details about the lambda and then writes those details to a Wire format.
DISCARD| Constructor and Description |
|---|
WireSerializedLambda() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isSerializableLambda(@NotNull Class<?> clazz)
Determines if the provided class is a serializable lambda.
|
void |
readMarshallable(@NotNull WireIn wire)
Reads the object's state from the given wire input.
|
@NotNull Object |
readResolve() |
static <L> void |
write(L lambda,
@NotNull ValueOut valueOut)
Serializes the given lambda to a Wire format using the provided
ValueOut instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitunexpectedFieldpublic static boolean isSerializableLambda(@NotNull
@NotNull Class<?> clazz)
clazz - The class to be checked.true if the class is a serializable lambda, false otherwise.public static <L> void write(@NotNull
L lambda,
@NotNull
@NotNull ValueOut valueOut)
ValueOut instance.
This method fetches the details of the lambda using the SerializedLambda mechanism
and then writes these details to the provided Wire format.
L - The type of the lambda to be serialized.lambda - The lambda instance to be serialized.valueOut - The ValueOut instance to which the lambda should be serialized.public void readMarshallable(@NotNull
@NotNull WireIn wire)
throws IllegalStateException
ReadMarshallablereadMarshallable in interface ReadMarshallablewire - The wire input from which the object's state should be read.IllegalStateException@NotNull public @NotNull Object readResolve()
readResolve in interface net.openhft.chronicle.core.util.ReadResolvableCopyright © 2024. All rights reserved.