Interface ProtocolMessageEnum (3.19.4)

public interface ProtocolMessageEnum extends Internal.EnumLite

Interface of useful methods added to all enums generated by the protocol compiler.

Implements

Internal.EnumLite

Methods

getDescriptorForType()

public abstract Descriptors.EnumDescriptor getDescriptorForType()

Return the enum type's descriptor, which contains information about each defined value, etc.

Returns
TypeDescription
Descriptors.EnumDescriptor

getNumber()

public abstract int getNumber()

Return the value's numeric value as defined in the .proto file.

Returns
TypeDescription
int

getValueDescriptor()

public abstract Descriptors.EnumValueDescriptor getValueDescriptor()

Return the value's descriptor, which contains information such as value name, number, and type.

Returns
TypeDescription
Descriptors.EnumValueDescriptor