Class Option

  • All Implemented Interfaces:
    java.io.Serializable

    public class Option
    extends java.lang.Object
    implements java.io.Serializable
    A protocol buffer option, which can be attached to a message, field, enumeration, etc
    See Also:
    Serialized Form
    • Field Detail

      • TYPE_NAME

        public static final Name TYPE_NAME
      • FIELD_NAME_NAME

        public static final Name FIELD_NAME_NAME
      • FIELD_NAME_VALUE

        public static final Name FIELD_NAME_VALUE
      • name

        public final java.lang.String name
        The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `"map_entry"`. For custom options, it should be the fully-qualified name. For example, `"google.api.http"`.
      • value

        public final Value value
        The option's value
    • Constructor Detail

      • Option

        public Option​(java.lang.String name,
                      Value value)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • withName

        public Option withName​(java.lang.String name)