Package com.google.protobuf
Class OneofInfo
- java.lang.Object
-
- com.google.protobuf.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()
Theint
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()
TheObject
field 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()
Theint
field containing the field number of the currently active member.
-
getValueField
public java.lang.reflect.Field getValueField()
TheObject
field containing the value of the currently active member.
-
-