Class UUIDType

  • All Implemented Interfaces:
    java.lang.Comparable<DataType>

    public final class UUIDType
    extends DataType
    Provides binary serialization of a UUID instance. Transmits the UUID as two longs: most-significant bits and least-significant bits.
    Author:
    Charles W. Rapp
    • Field Detail

      • BYTES

        public static final int BYTES
        A UUID requires two long (8 byte) integers.
        See Also:
        Constant Field Values
    • Method Detail

      • createSerializer

        protected void createSerializer​(MessageType.MessageField field,
                                        java.lang.String fieldName,
                                        java.lang.String indent,
                                        java.util.Formatter output)
        Generates Java code used to serialize a UUID field to a ByteBuffer.
        Specified by:
        createSerializer in class DataType
        Parameters:
        field - message field.
        fieldName - message field name.
        indent - indent code by this amount.
        output - write code to this formatter.
      • createDeserializer

        protected void createDeserializer​(MessageType.MessageField field,
                                          java.lang.String fieldName,
                                          java.lang.String indent,
                                          java.util.Formatter output,
                                          boolean useBuilder)
        Generates code to de-serialize UUID instance from a ByteBuffer.
        Specified by:
        createDeserializer in class DataType
        Parameters:
        field - message field.
        fieldName - store de-serialized field in this name.
        indent - indent code by this amount.
        output - append code to this formatter.
        useBuilder - if true then fieldName is a builder method name; otherwise a local variable.