@@ -587,23 +587,24 @@ The values of this enum type have the following special methods:
587
587
The compiler will generate the following accessor methods in both the message
588
588
class and its builder:
589
589
590
- - ` boolean hasFooInt() ` : Returns ` true ` if the oneof case is ` FOO ` .
590
+ - ` boolean hasFooInt() ` : Returns ` true ` if the oneof case is ` FOO_INT ` .
591
591
- ` int getFooInt() ` : Returns the current value of ` foo ` if the oneof case is
592
- ` FOO ` . Otherwise, returns the default value of this field.
592
+ ` FOO_INT ` . Otherwise, returns the default value of this field.
593
593
- ` ChoiceCase getChoiceCase() ` : Returns the enum indicating which field is
594
594
set. Returns ` CHOICE_NOT_SET ` if none of them is set.
595
595
596
596
The compiler will generate the following methods only in the message's builder:
597
597
598
598
- ` Builder setFooInt(int value) ` : Sets ` Foo ` to this value and sets the oneof
599
- case to ` FOO ` . After calling this, ` hasFooInt() ` will return ` true ` ,
600
- ` getFooInt() ` will return ` value ` and ` getChoiceCase() ` will return ` FOO ` .
599
+ case to ` FOO_INT ` . After calling this, ` hasFooInt() ` will return ` true ` ,
600
+ ` getFooInt() ` will return ` value ` and ` getChoiceCase() ` will return
601
+ ` FOO_INT ` .
601
602
- ` Builder clearFooInt() ` :
602
- - Nothing will be changed if the oneof case is not ` FOO ` .
603
- - If the oneof case is ` FOO ` , sets ` Foo ` to null and the oneof case to
604
- ` FOO_NOT_SET ` . After calling this, ` hasFooInt() ` will return ` false ` ,
603
+ - Nothing will be changed if the oneof case is not ` FOO_INT ` .
604
+ - If the oneof case is ` FOO_INT ` , sets ` Foo ` to null and the oneof case to
605
+ ` CHOICE_NOT_SET ` . After calling this, ` hasFooInt() ` will return ` false ` ,
605
606
` getFooInt() ` will return the default value and ` getChoiceCase() ` will
606
- return ` FOO_NOT_SET ` .
607
+ return ` CHOICE_NOT_SET ` .
607
608
- ` Builder.clearChoice() ` : Resets the value for ` choice ` , returning the
608
609
builder.
609
610
0 commit comments