Package com.google.protobuf
Class OneofInfo
- java.lang.Object
-
- com.google.protobuf.OneofInfo
-
@ExperimentalApi @CheckReturnValue 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.FieldcaseFieldprivate intidprivate java.lang.reflect.FieldvalueField
-
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.FieldgetCaseField()Theintfield containing the field number of the currently active member.intgetId()Returns the unique identifier of the oneof within the message.java.lang.reflect.FieldgetValueField()TheObjectfield containing the value of the currently active member.
-
-
-
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()
Theintfield containing the field number of the currently active member.
-
getValueField
public java.lang.reflect.Field getValueField()
TheObjectfield containing the value of the currently active member.
-
-