Class EnumSetMarshaller<E extends Enum<E>>

java.lang.Object
org.wildfly.clustering.marshalling.protostream.util.EnumSetMarshaller<E>
Type Parameters:
E - enum type
All Implemented Interfaces:
org.infinispan.protostream.BaseMarshaller<EnumSet<E>>, org.infinispan.protostream.ProtobufTagMarshaller<EnumSet<E>>, Marshallable<EnumSet<E>>, ProtoStreamMarshaller<EnumSet<E>>, Readable<EnumSet<E>>, Writable<EnumSet<E>>

public class EnumSetMarshaller<E extends Enum<E>> extends Object implements ProtoStreamMarshaller<EnumSet<E>>
Author:
Paul Ferraro
  • Constructor Details

    • EnumSetMarshaller

      public EnumSetMarshaller()
  • Method Details

    • getJavaClass

      public Class<? extends EnumSet<E>> getJavaClass()
      Description copied from interface: Marshallable
      Returns the type of object handled by this marshallable instance.
      Specified by:
      getJavaClass in interface org.infinispan.protostream.BaseMarshaller<E extends Enum<E>>
      Specified by:
      getJavaClass in interface Marshallable<E extends Enum<E>>
      Returns:
      the type of object handled by this marshallable instance.
    • readFrom

      public EnumSet<E> readFrom(ProtoStreamReader reader) throws IOException
      Description copied from interface: Readable
      Reads an object from the specified reader.
      Specified by:
      readFrom in interface Readable<E extends Enum<E>>
      Parameters:
      reader - a ProtoStream reader
      Returns:
      the read object
      Throws:
      IOException - if the object could not be read
    • writeTo

      public void writeTo(ProtoStreamWriter writer, EnumSet<E> set) throws IOException
      Description copied from interface: Writable
      Writes the specified object to the specified writer.
      Specified by:
      writeTo in interface Writable<E extends Enum<E>>
      Parameters:
      writer - a ProtoStream writer
      set - the object to be written
      Throws:
      IOException - if the object could not be written