public class EnumMarshaller<E extends Enum<E>> extends Object implements org.infinispan.protostream.EnumMarshaller<E>, Predictable<E>
| Constructor and Description |
|---|
EnumMarshaller(Class<E> enumClass) |
| Modifier and Type | Method and Description |
|---|---|
E |
decode(int ordinal) |
int |
encode(E value) |
Class<? extends E> |
getJavaClass() |
String |
getTypeName() |
OptionalInt |
size(org.infinispan.protostream.ImmutableSerializationContext context,
E value)
Returns the size of the buffer to use for marshalling the specified object, if known.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbyteArraySize, signedIntSize, signedLongSize, stringSize, unsignedIntSize, unsignedLongSizepublic String getTypeName()
public E decode(int ordinal)
public int encode(E value) throws IllegalArgumentException
encode in interface org.infinispan.protostream.EnumMarshaller<E extends Enum<E>>IllegalArgumentExceptionpublic OptionalInt size(org.infinispan.protostream.ImmutableSerializationContext context, E value)
Predictablesize in interface Predictable<E extends Enum<E>>context - the serialization contextvalue - the value to be marshalled.Copyright © 2020 JBoss by Red Hat. All rights reserved.