Class OneofInfo

java.lang.Object
com.google.protobuf.OneofInfo

@ExperimentalApi final class OneofInfo extends Object
Information for a oneof within a protobuf message.
  • Field Details

    • id

      private final int id
    • caseField

      private final Field caseField
    • valueField

      private final Field valueField
  • Constructor Details

    • OneofInfo

      public OneofInfo(int id, Field caseField, Field valueField)
  • Method Details

    • getId

      public int getId()
      Returns the unique identifier of the oneof within the message. This is really just an index starting at zero.
    • getCaseField

      public Field getCaseField()
      The int field containing the field number of the currently active member.
    • getValueField

      public Field getValueField()
      The Object field containing the value of the currently active member.