Class MessageType.Field

  • Enclosing class:
    MessageType

    public static final class MessageType.Field
    extends java.lang.Object
    • Field Detail

      • type

        private final java.lang.String type
      • name

        private final java.lang.String name
      • tag

        private final int tag
      • options

        private final java.util.List<Option> options
      • documentation

        private final java.lang.String documentation
    • Constructor Detail

      • Field

        public Field​(MessageType.Label label,
                     java.lang.String type,
                     java.lang.String name,
                     int tag,
                     java.lang.String documentation,
                     java.util.List<Option> options)
    • Method Detail

      • getType

        public java.lang.String getType()
        Returns the type of this field. May be a message type name, an enum type name, or a scalar value type like int64 or bytes.
      • getName

        public java.lang.String getName()
      • getTag

        public int getTag()
      • getOptions

        public java.util.List<Option> getOptions()
      • getDocumentation

        public java.lang.String getDocumentation()
      • isDeprecated

        public boolean isDeprecated()
        Returns true when the deprecated option is present and set to true.
      • isPacked

        public boolean isPacked()
        Returns true when the packed option is present and set to true.
      • getDefault

        public java.lang.String getDefault()
        Returns the default option value or null.
      • 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
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object