Class EnumMarshallerDelegate<T extends Enum<T>>

    • Method Detail

      • marshall

        public void marshall​(FieldDescriptor fd,
                             T value,
                             org.infinispan.protostream.impl.ProtoStreamWriterImpl writer,
                             RawProtoStreamWriter out)
                      throws IOException
        Description copied from interface: BaseMarshallerDelegate
        Marshalls an object.
        Specified by:
        marshall in interface BaseMarshallerDelegate<T extends Enum<T>>
        Parameters:
        fd - the FieldDescriptor of the field being marshalled or null if this is a top-level object
        value - the value being marshalled (cannot be null)
        writer - the ProtoStreamWriterImpl instance to use/re-use, if the specific marshaller type needs one; can be null in which case the delegate has to create a ProtoStreamWriterImpl instance itself based on the out parameter
        out - the Protobuf tag output stream (cannot be null)
        Throws:
        IOException - if marshalling fails for some reason
      • unmarshall

        public T unmarshall​(FieldDescriptor fd,
                            org.infinispan.protostream.impl.ProtoStreamReaderImpl reader,
                            RawProtoStreamReader in)
                     throws IOException
        Description copied from interface: BaseMarshallerDelegate
        Unmarshalls an object.
        Specified by:
        unmarshall in interface BaseMarshallerDelegate<T extends Enum<T>>
        Parameters:
        fd - the FieldDescriptor of the field being unmarshalled or null if this is a top-level object
        reader - the ProtoStreamReaderImpl instance to use/re-use, if the specific marshaller type needs one; can be null in which case the delegate has to create a ProtoStreamReaderImpl instance itself based on the in parameter
        in - the Protobuf tag input stream (cannot be null)
        Throws:
        IOException - if unmarshalling fails for some reason
      • readEnum

        public T readEnum​(int expectedTag,
                          int enumValue,
                          UnknownFieldSet unknownFieldSet)