Package com.google.protobuf
Class Descriptors.EnumValueDescriptor
java.lang.Object
com.google.protobuf.Descriptors.GenericDescriptor
com.google.protobuf.Descriptors.EnumValueDescriptor
- All Implemented Interfaces:
Internal.EnumLite
- Enclosing class:
- Descriptors
public static final class Descriptors.EnumValueDescriptor
extends Descriptors.GenericDescriptor
implements Internal.EnumLite
Describes one value within an enum type. Note that multiple defined values may have the same
number. In generated Java code, all values with the same number after the first become aliases
of the first. However, they still have independent EnumValueDescriptors.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Comparator<Descriptors.EnumValueDescriptor>private final Stringprivate final int(package private) static final Descriptors.NumberGetter<Descriptors.EnumValueDescriptor>private final Descriptors.EnumDescriptor -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEnumValueDescriptor(DescriptorProtos.EnumValueDescriptorProto proto, Descriptors.FileDescriptor file, Descriptors.EnumDescriptor parent, int index) privateEnumValueDescriptor(Descriptors.EnumDescriptor parent, Integer number) -
Method Summary
Modifier and TypeMethodDescriptiongetFile()Get theDescriptors.FileDescriptorcontaining this descriptor.Get the value's fully-qualified name.intgetIndex()Get the index of this descriptor within its parent.getName()Get the value's unqualified name.intGet the value's number.Get theEnumValueOptions, defined indescriptor.proto.getType()Get the value's enum type.private voidtoProto()Convert the descriptor to its protocol message representation.toString()
-
Field Details
-
BY_NUMBER
-
NUMBER_GETTER
-
index
private final int index -
proto
-
fullName
-
type
-
-
Constructor Details
-
EnumValueDescriptor
private EnumValueDescriptor(DescriptorProtos.EnumValueDescriptorProto proto, Descriptors.FileDescriptor file, Descriptors.EnumDescriptor parent, int index) throws Descriptors.DescriptorValidationException -
EnumValueDescriptor
-
-
Method Details
-
getIndex
public int getIndex()Get the index of this descriptor within its parent.- See Also:
-
toProto
Convert the descriptor to its protocol message representation.- Specified by:
toProtoin classDescriptors.GenericDescriptor
-
getName
Get the value's unqualified name.- Specified by:
getNamein classDescriptors.GenericDescriptor
-
getNumber
public int getNumber()Get the value's number.- Specified by:
getNumberin interfaceInternal.EnumLite
-
toString
-
getFullName
Get the value's fully-qualified name.- Specified by:
getFullNamein classDescriptors.GenericDescriptor- See Also:
-
getFile
Get theDescriptors.FileDescriptorcontaining this descriptor.- Specified by:
getFilein classDescriptors.GenericDescriptor
-
getType
Get the value's enum type. -
getOptions
Get theEnumValueOptions, defined indescriptor.proto. -
setProto
-