public enum MethodEncoderLookup extends Enum<MethodEncoderLookup> implements Function<Method,MethodEncoder>
MethodEncoder
for a given method.
It applies the MethodId
annotation found on the method to create the encoder.
If the method does not have the MethodId
annotation, it will return null.
The returned encoder can then be used to encode method calls into BytesOut
and decode method calls from BytesIn
,
which can be used for serialization or for sending method calls over a network for example.
The encoder supports objects that are instances of BytesMarshallable
.
This enum is primarily used for encoding and decoding methods annotated with MethodId
for efficient method representation.
Enum Constant and Description |
---|
BY_ANNOTATION |
Modifier and Type | Method and Description |
---|---|
MethodEncoder |
apply(Method method) |
static MethodEncoderLookup |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MethodEncoderLookup[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MethodEncoderLookup BY_ANNOTATION
public static MethodEncoderLookup[] values()
for (MethodEncoderLookup c : MethodEncoderLookup.values()) System.out.println(c);
public static MethodEncoderLookup valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic MethodEncoder apply(Method method)
apply
in interface Function<Method,MethodEncoder>
Copyright © 2024. All rights reserved.