E - the enum type of this marshallerpublic class EnumMarshaller<E extends Enum<E>> extends Object implements org.infinispan.protostream.EnumMarshaller<E>, ProtoStreamMarshaller<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()
Returns the type of object handled by this marshallable instance.
|
E |
readFrom(ProtoStreamReader reader)
Reads an object from the specified reader.
|
void |
writeTo(ProtoStreamWriter writer,
E value)
Writes the specified object to the specified writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeName, read, writepublic Class<? extends E> getJavaClass()
MarshallablegetJavaClass in interface org.infinispan.protostream.BaseMarshaller<E extends Enum<E>>getJavaClass in interface Marshallable<E extends Enum<E>>public E decode(int ordinal)
public int encode(E value)
public E readFrom(ProtoStreamReader reader) throws IOException
MarshallablereadFrom in interface Marshallable<E extends Enum<E>>reader - a ProtoStream readerIOException - if the object could not be readpublic void writeTo(ProtoStreamWriter writer, E value) throws IOException
MarshallablewriteTo in interface Marshallable<E extends Enum<E>>writer - a ProtoStream writervalue - the object to be writtenIOException - if the object could not be writtenCopyright © 2021 JBoss by Red Hat. All rights reserved.