Class Field

java.lang.Object
com.google.protobuf.AbstractMessageLite
All Implemented Interfaces:
FieldOrBuilder, Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, MessageOrBuilder, Serializable

public final class Field extends GeneratedMessage implements FieldOrBuilder
Protobuf type google.protobuf.Field
See Also:
  • Field Details Link icon

  • Method Details Link icon

    • getDescriptor Link icon

      public static final Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable Link icon

      protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Description copied from class: GeneratedMessage
      Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.
      Specified by:
      internalGetFieldAccessorTable in class GeneratedMessage
    • getKindValue Link icon

      public int getKindValue()
      .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
      Specified by:
      getKindValue in interface FieldOrBuilder
      Returns:
      The enum numeric value on the wire for kind.
    • getKind Link icon

      public Field.Kind getKind()
      .google.protobuf.Field.Kind kind = 1 [json_name = "kind"];
      Specified by:
      getKind in interface FieldOrBuilder
      Returns:
      The kind.
    • getCardinalityValue Link icon

      public int getCardinalityValue()
      .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
      Specified by:
      getCardinalityValue in interface FieldOrBuilder
      Returns:
      The enum numeric value on the wire for cardinality.
    • getCardinality Link icon

      public Field.Cardinality getCardinality()
      .google.protobuf.Field.Cardinality cardinality = 2 [json_name = "cardinality"];
      Specified by:
      getCardinality in interface FieldOrBuilder
      Returns:
      The cardinality.
    • getNumber Link icon

      public int getNumber()
      int32 number = 3 [json_name = "number"];
      Specified by:
      getNumber in interface FieldOrBuilder
      Returns:
      The number.
    • getName Link icon

      public String getName()
      string name = 4 [json_name = "name"];
      Specified by:
      getName in interface FieldOrBuilder
      Returns:
      The name.
    • getNameBytes Link icon

      public com.google.protobuf.ByteString getNameBytes()
      string name = 4 [json_name = "name"];
      Specified by:
      getNameBytes in interface FieldOrBuilder
      Returns:
      The bytes for name.
    • getTypeUrl Link icon

      public String getTypeUrl()
      string type_url = 6 [json_name = "typeUrl"];
      Specified by:
      getTypeUrl in interface FieldOrBuilder
      Returns:
      The typeUrl.
    • getTypeUrlBytes Link icon

      public com.google.protobuf.ByteString getTypeUrlBytes()
      string type_url = 6 [json_name = "typeUrl"];
      Specified by:
      getTypeUrlBytes in interface FieldOrBuilder
      Returns:
      The bytes for typeUrl.
    • getOneofIndex Link icon

      public int getOneofIndex()
      int32 oneof_index = 7 [json_name = "oneofIndex"];
      Specified by:
      getOneofIndex in interface FieldOrBuilder
      Returns:
      The oneofIndex.
    • getPacked Link icon

      public boolean getPacked()
      bool packed = 8 [json_name = "packed"];
      Specified by:
      getPacked in interface FieldOrBuilder
      Returns:
      The packed.
    • getOptionsList Link icon

      public List<Option> getOptionsList()
      repeated .google.protobuf.Option options = 9 [json_name = "options"];
      Specified by:
      getOptionsList in interface FieldOrBuilder
    • getOptionsOrBuilderList Link icon

      public List<? extends OptionOrBuilder> getOptionsOrBuilderList()
      repeated .google.protobuf.Option options = 9 [json_name = "options"];
      Specified by:
      getOptionsOrBuilderList in interface FieldOrBuilder
    • getOptionsCount Link icon

      public int getOptionsCount()
      repeated .google.protobuf.Option options = 9 [json_name = "options"];
      Specified by:
      getOptionsCount in interface FieldOrBuilder
    • getOptions Link icon

      public Option getOptions(int index)
      repeated .google.protobuf.Option options = 9 [json_name = "options"];
      Specified by:
      getOptions in interface FieldOrBuilder
    • getOptionsOrBuilder Link icon

      public OptionOrBuilder getOptionsOrBuilder(int index)
      repeated .google.protobuf.Option options = 9 [json_name = "options"];
      Specified by:
      getOptionsOrBuilder in interface FieldOrBuilder
    • getJsonName Link icon

      public String getJsonName()
      string json_name = 10 [json_name = "jsonName"];
      Specified by:
      getJsonName in interface FieldOrBuilder
      Returns:
      The jsonName.
    • getJsonNameBytes Link icon

      public com.google.protobuf.ByteString getJsonNameBytes()
      string json_name = 10 [json_name = "jsonName"];
      Specified by:
      getJsonNameBytes in interface FieldOrBuilder
      Returns:
      The bytes for jsonName.
    • getDefaultValue Link icon

      public String getDefaultValue()
      string default_value = 11 [json_name = "defaultValue"];
      Specified by:
      getDefaultValue in interface FieldOrBuilder
      Returns:
      The defaultValue.
    • getDefaultValueBytes Link icon

      public com.google.protobuf.ByteString getDefaultValueBytes()
      string default_value = 11 [json_name = "defaultValue"];
      Specified by:
      getDefaultValueBytes in interface FieldOrBuilder
      Returns:
      The bytes for defaultValue.
    • isInitialized Link icon

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class GeneratedMessage
    • writeTo Link icon

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class GeneratedMessage
      Throws:
      IOException
    • getSerializedSize Link icon

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class GeneratedMessage
    • equals Link icon

      public boolean equals(Object obj)
      Description copied from interface: Message
      Compares the specified object with this message for equality. Returns true if the given object is a message of the same type (as defined by getDescriptorForType()) and has identical values for all of its fields. Subclasses must implement this; inheriting Object.equals() is incorrect.
      Specified by:
      equals in interface Message
      Overrides:
      equals in class AbstractMessage
      Parameters:
      obj - object to be compared for equality with this message
      Returns:
      true if the specified object is equal to this message
    • hashCode Link icon

      public int hashCode()
      Description copied from interface: Message
      Returns the hash code value for this message. The hash code of a message should mix the message's type (object identity of the descriptor) with its contents (known and unknown field values). Subclasses must implement this; inheriting Object.hashCode() is incorrect.
      Specified by:
      hashCode in interface Message
      Overrides:
      hashCode in class AbstractMessage
      Returns:
      the hash code value for this message
      See Also:
    • parseFrom Link icon

      public static Field parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom Link icon

      public static Field parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom Link icon

      public static Field parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom Link icon

      public static Field parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom Link icon

      public static Field parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom Link icon

      public static Field parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom Link icon

      public static Field parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType Link icon

      public Field.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder Link icon

      public static Field.Builder newBuilder()
    • newBuilder Link icon

      public static Field.Builder newBuilder(Field prototype)
    • toBuilder Link icon

      public Field.Builder toBuilder()
      Specified by:
      toBuilder in interface Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType Link icon

      protected Field.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
      Description copied from class: AbstractMessage
      Create a nested builder.
      Overrides:
      newBuilderForType in class AbstractMessage
    • getDefaultInstance Link icon

      public static Field getDefaultInstance()
    • parser Link icon

      public static com.google.protobuf.Parser<Field> parser()
    • getParserForType Link icon

      public com.google.protobuf.Parser<Field> getParserForType()
      Description copied from class: GeneratedMessage
      TODO: Remove this unnecessary intermediate implementation of this method.
      Specified by:
      getParserForType in interface Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class GeneratedMessage
    • getDefaultInstanceForType Link icon

      public Field getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface MessageOrBuilder