Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java

Issue 11347026: Check in protobuf java code and generate lite jar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved target to android conditional Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}

Powered by Google App Engine
This is Rietveld 408576698