Annotation Interface ProtoSerializableField


@Retention(RUNTIME) @Target(FIELD) public @interface ProtoSerializableField
Annotation which denotes that a field should be part of the protobuf serialized representation.

Behaviour is undefined when used on a class which doesn't implement ProtoSerializable.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the field in the protobuf in Java.
    int
    The protobuf version when this field was added.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default field name, used to signify it should use the field name rather than a supplied value.
  • Field Details

    • DEFAULT_FIELD_NAME

      static final String DEFAULT_FIELD_NAME
      The default field name, used to signify it should use the field name rather than a supplied value.
      See Also:
  • Element Details

    • sinceVersion

      int sinceVersion
      The protobuf version when this field was added.
      Returns:
      The version.
      Default:
      0
    • name

      String name
      The name of the field in the protobuf in Java.
      Returns:
      The field name.
      Default:
      "[DEFAULT_FIELD_NAME]"