Class OneofInfo


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

      Fields 
      Modifier and Type Field Description
      private java.lang.reflect.Field caseField  
      private int id  
      private java.lang.reflect.Field valueField  
    • Constructor Summary

      Constructors 
      Constructor Description
      OneofInfo​(int id, java.lang.reflect.Field caseField, java.lang.reflect.Field valueField)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Field getCaseField()
      The int field containing the field number of the currently active member.
      int getId()
      Returns the unique identifier of the oneof within the message.
      java.lang.reflect.Field getValueField()
      The Object field containing the value of the currently active member.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • id

        private final int id
      • caseField

        private final java.lang.reflect.Field caseField
      • valueField

        private final java.lang.reflect.Field valueField
    • Constructor Detail

      • OneofInfo

        public OneofInfo​(int id,
                         java.lang.reflect.Field caseField,
                         java.lang.reflect.Field valueField)
    • Method Detail

      • 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 java.lang.reflect.Field getCaseField()
        The int field containing the field number of the currently active member.
      • getValueField

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