Package org.infinispan.protostream.impl
Class EnumMarshallerDelegate<T extends Enum<T>>
- java.lang.Object
-
- org.infinispan.protostream.impl.BaseMarshallerDelegate<T>
-
- org.infinispan.protostream.impl.EnumMarshallerDelegate<T>
-
public final class EnumMarshallerDelegate<T extends Enum<T>> extends BaseMarshallerDelegate<T>
- Since:
- 1.0
- Author:
- [email protected]
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
decode(int expectedTag, int enumValue, UnknownFieldSet unknownFieldSet)
void
encode(int fieldNumber, T value, TagWriter out)
EnumMarshaller<T>
getMarshaller()
Gets the wrapped marshaller.void
marshall(ProtobufTagMarshaller.WriteContext ctx, FieldDescriptor fd, T value)
Marshalls an object.T
unmarshall(ProtobufTagMarshaller.ReadContext ctx, FieldDescriptor fd)
Unmarshalls an object.
-
-
-
Method Detail
-
getMarshaller
public EnumMarshaller<T> getMarshaller()
Description copied from class:BaseMarshallerDelegate
Gets the wrapped marshaller.- Specified by:
getMarshaller
in classBaseMarshallerDelegate<T extends Enum<T>>
- Returns:
- the wrapped marshaller instance
-
marshall
public void marshall(ProtobufTagMarshaller.WriteContext ctx, FieldDescriptor fd, T value) throws IOException
Description copied from class:BaseMarshallerDelegate
Marshalls an object.- Specified by:
marshall
in classBaseMarshallerDelegate<T extends Enum<T>>
- Parameters:
ctx
- operation contextfd
- theFieldDescriptor
of the field being marshalled ornull
if this is a top-level objectvalue
- the value being marshalled (cannot benull
)- Throws:
IOException
- if marshalling fails for some reason
-
encode
public void encode(int fieldNumber, T value, TagWriter out) throws IOException
- Throws:
IOException
-
unmarshall
public T unmarshall(ProtobufTagMarshaller.ReadContext ctx, FieldDescriptor fd) throws IOException
Description copied from class:BaseMarshallerDelegate
Unmarshalls an object.- Specified by:
unmarshall
in classBaseMarshallerDelegate<T extends Enum<T>>
- Parameters:
ctx
- operation contextfd
- theFieldDescriptor
of the field being unmarshalled ornull
if this is a top-level object- Throws:
IOException
- if unmarshalling fails for some reason
-
decode
public T decode(int expectedTag, int enumValue, UnknownFieldSet unknownFieldSet)
-
-