• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 package com.google.protobuf;
9 
10 import com.google.protobuf.Descriptors.EnumDescriptor;
11 import com.google.protobuf.Descriptors.EnumValueDescriptor;
12 
13 /** Interface of useful methods added to all enums generated by the protocol compiler. */
14 public interface ProtocolMessageEnum extends Internal.EnumLite {
15 
16   /** Return the value's numeric value as defined in the .proto file. */
17   @Override
getNumber()18   int getNumber();
19 
20   /**
21    * Return the value's descriptor, which contains information such as value name, number, and type.
22    */
getValueDescriptor()23   EnumValueDescriptor getValueDescriptor();
24 
25   /**
26    * Return the enum type's descriptor, which contains information about each defined value, etc.
27    */
getDescriptorForType()28   EnumDescriptor getDescriptorForType();
29 }
30