Index: third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java |
diff --git a/third_party/protobuf/src/google/protobuf/unittest_no_generic_services.proto b/third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java |
similarity index 69% |
copy from third_party/protobuf/src/google/protobuf/unittest_no_generic_services.proto |
copy to third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java |
index cffb4122c5c4f9d2e63a09d70c3784614617d88d..112400f42b4c060be90807795ccc64c7e30bce5a 100644 |
--- a/third_party/protobuf/src/google/protobuf/unittest_no_generic_services.proto |
+++ b/third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java |
@@ -28,25 +28,31 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Author: kenton@google.com (Kenton Varda) |
+package com.google.protobuf; |
-package google.protobuf.no_generic_services_test; |
+import com.google.protobuf.Descriptors.EnumDescriptor; |
+import com.google.protobuf.Descriptors.EnumValueDescriptor; |
-// *_generic_services are false by default. |
+/** |
+ * Interface of useful methods added to all enums generated by the protocol |
+ * compiler. |
+ */ |
+public interface ProtocolMessageEnum extends Internal.EnumLite { |
-message TestMessage { |
- optional int32 a = 1; |
- extensions 1000 to max; |
-} |
- |
-enum TestEnum { |
- FOO = 1; |
-} |
+ /** |
+ * Return the value's numeric value as defined in the .proto file. |
+ */ |
+ int getNumber(); |
-extend TestMessage { |
- optional int32 test_extension = 1000; |
-} |
+ /** |
+ * Return the value's descriptor, which contains information such as |
+ * value name, number, and type. |
+ */ |
+ EnumValueDescriptor getValueDescriptor(); |
-service TestService { |
- rpc Foo(TestMessage) returns(TestMessage); |
+ /** |
+ * Return the enum type's descriptor, which contains information |
+ * about each defined value, etc. |
+ */ |
+ EnumDescriptor getDescriptorForType(); |
} |