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:
- anistor@redhat.com
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tdecode(int expectedTag, int enumValue, UnknownFieldSet unknownFieldSet)voidencode(int fieldNumber, T value, TagWriter out)EnumMarshaller<T>getMarshaller()Gets the wrapped marshaller.voidmarshall(ProtobufTagMarshaller.WriteContext ctx, FieldDescriptor fd, T value)Marshalls an object.Tunmarshall(ProtobufTagMarshaller.ReadContext ctx, FieldDescriptor fd)Unmarshalls an object.
-
-
-
Method Detail
-
getMarshaller
public EnumMarshaller<T> getMarshaller()
Description copied from class:BaseMarshallerDelegateGets the wrapped marshaller.- Specified by:
getMarshallerin 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:BaseMarshallerDelegateMarshalls an object.- Specified by:
marshallin classBaseMarshallerDelegate<T extends Enum<T>>- Parameters:
ctx- operation contextfd- theFieldDescriptorof the field being marshalled ornullif 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:BaseMarshallerDelegateUnmarshalls an object.- Specified by:
unmarshallin classBaseMarshallerDelegate<T extends Enum<T>>- Parameters:
ctx- operation contextfd- theFieldDescriptorof the field being unmarshalled ornullif this is a top-level object- Throws:
IOException- if unmarshalling fails for some reason
-
decode
public T decode(int expectedTag, int enumValue, UnknownFieldSet unknownFieldSet)
-
-