Interface FieldSetMarshaller<T,V>

Type Parameters:
T - the writer type
V - the reader type
All Superinterfaces:
FieldReadable<V>, Writable<T>
All Known Subinterfaces:
ClassLoaderMarshaller, FieldSetMarshaller.Simple<T>, FieldSetMarshaller.Supplied<T,V>
All Known Implementing Classes:
ComparatorMarshaller, DurationMarshaller, EnumSetFieldSetMarshaller, InetAddressMarshaller, LocalDateMarshaller, LocalTimeMarshaller, UUIDMarshaller, YearMarshaller, ZoneOffsetMarshaller

public interface FieldSetMarshaller<T,V> extends FieldReadable<V>, Writable<T>
Marshaller for a set of fields, to be shared between multiple marshallers.
Author:
Paul Ferraro
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A simple field set marshaller whose reader and writer types are the same
    static interface 
    A field set marshaller whose reader type supplies the writer type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a marshaller that reads and writes only the fields of this field set.
    asMarshaller(Class<T> targetClass)
    Creates a marshaller that reads and writes only the fields of this field set.
    build(V value)
    Builds the target object from the read value.
    Returns a builder for use with
    invalid reference
    #readField(ProtoStreamReader, Object)
    .

    Methods inherited from interface org.wildfly.clustering.marshalling.protostream.FieldReadable

    getFields, nextIndex, readFrom

    Methods inherited from interface org.wildfly.clustering.marshalling.protostream.Writable

    writeTo
  • Method Details

    • createInitialValue

      V createInitialValue()
      Returns a builder for use with
      invalid reference
      #readField(ProtoStreamReader, Object)
      . May return a shared instance, if the builder type is immutable, or a new instance, if the builder is mutable.
      Returns:
      a builder.
    • build

      T build(V value)
      Builds the target object from the read value.
      Parameters:
      value - a read value
      Returns:
      the target object
    • asMarshaller

      default ProtoStreamMarshaller<T> asMarshaller()
      Creates a marshaller that reads and writes only the fields of this field set.
      Returns:
      a new marshaller
    • asMarshaller

      default ProtoStreamMarshaller<T> asMarshaller(Class<T> targetClass)
      Creates a marshaller that reads and writes only the fields of this field set.
      Parameters:
      targetClass - the marshaller type
      Returns:
      a new marshaller