Upgraded to Google Protobuf 2.3.0

This commit is contained in:
Trustin Lee 2010-02-19 00:14:25 +00:00
parent cee5f945dc
commit f4d7f573a1
2 changed files with 135 additions and 75 deletions

View File

@ -83,7 +83,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>

View File

@ -1,20 +1,5 @@
/*
* Copyright 2009 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: LocalTimeProtocol.proto
package org.jboss.netty.example.localtime;
@ -105,6 +90,8 @@ public final class LocalTimeProtocol {
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
// @@protoc_insertion_point(enum_scope:org.jboss.netty.example.localtime.Continent)
}
public enum DayOfWeek
@ -180,14 +167,19 @@ public final class LocalTimeProtocol {
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
// @@protoc_insertion_point(enum_scope:org.jboss.netty.example.localtime.DayOfWeek)
}
public static final class Location extends
com.google.protobuf.GeneratedMessage {
// Use Location.newBuilder() to construct.
private Location() {}
private Location() {
initFields();
}
private Location(boolean noInit) {}
private static final Location defaultInstance = new Location();
private static final Location defaultInstance;
public static Location getDefaultInstance() {
return defaultInstance;
}
@ -209,7 +201,7 @@ public final class LocalTimeProtocol {
// required .org.jboss.netty.example.localtime.Continent continent = 1;
public static final int CONTINENT_FIELD_NUMBER = 1;
private boolean hasContinent;
private org.jboss.netty.example.localtime.LocalTimeProtocol.Continent continent_ = org.jboss.netty.example.localtime.LocalTimeProtocol.Continent.AFRICA;
private org.jboss.netty.example.localtime.LocalTimeProtocol.Continent continent_;
public boolean hasContinent() { return hasContinent; }
public org.jboss.netty.example.localtime.LocalTimeProtocol.Continent getContinent() { return continent_; }
@ -220,6 +212,9 @@ public final class LocalTimeProtocol {
public boolean hasCity() { return hasCity; }
public java.lang.String getCity() { return city_; }
private void initFields() {
continent_ = org.jboss.netty.example.localtime.LocalTimeProtocol.Continent.AFRICA;
}
public final boolean isInitialized() {
if (!hasContinent) {
return false;
@ -232,6 +227,7 @@ public final class LocalTimeProtocol {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (hasContinent()) {
output.writeEnum(1, getContinent().getNumber());
}
@ -298,14 +294,23 @@ public final class LocalTimeProtocol {
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Location parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input).buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Location parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
.buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Location parseFrom(
com.google.protobuf.CodedInputStream input)
@ -499,23 +504,28 @@ public final class LocalTimeProtocol {
result.city_ = getDefaultInstance().getCity();
return this;
}
// @@protoc_insertion_point(builder_scope:org.jboss.netty.example.localtime.Location)
}
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
static {
defaultInstance = new Location(true);
org.jboss.netty.example.localtime.LocalTimeProtocol.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jboss.netty.example.localtime.Location)
}
public static final class Locations extends
com.google.protobuf.GeneratedMessage {
// Use Locations.newBuilder() to construct.
private Locations() {}
private Locations() {
initFields();
}
private Locations(boolean noInit) {}
private static final Locations defaultInstance = new Locations();
private static final Locations defaultInstance;
public static Locations getDefaultInstance() {
return defaultInstance;
}
@ -546,6 +556,8 @@ public final class LocalTimeProtocol {
return location_.get(index);
}
private void initFields() {
}
public final boolean isInitialized() {
for (org.jboss.netty.example.localtime.LocalTimeProtocol.Location element : getLocationList()) {
if (!element.isInitialized()) {
@ -557,6 +569,7 @@ public final class LocalTimeProtocol {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (org.jboss.netty.example.localtime.LocalTimeProtocol.Location element : getLocationList()) {
output.writeMessage(1, element);
}
@ -616,14 +629,23 @@ public final class LocalTimeProtocol {
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Locations parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input).buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Locations parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
.buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.Locations parseFrom(
com.google.protobuf.CodedInputStream input)
@ -822,23 +844,28 @@ public final class LocalTimeProtocol {
result.location_ = java.util.Collections.emptyList();
return this;
}
// @@protoc_insertion_point(builder_scope:org.jboss.netty.example.localtime.Locations)
}
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
static {
defaultInstance = new Locations(true);
org.jboss.netty.example.localtime.LocalTimeProtocol.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jboss.netty.example.localtime.Locations)
}
public static final class LocalTime extends
com.google.protobuf.GeneratedMessage {
// Use LocalTime.newBuilder() to construct.
private LocalTime() {}
private LocalTime() {
initFields();
}
private LocalTime(boolean noInit) {}
private static final LocalTime defaultInstance = new LocalTime();
private static final LocalTime defaultInstance;
public static LocalTime getDefaultInstance() {
return defaultInstance;
}
@ -881,7 +908,7 @@ public final class LocalTimeProtocol {
// required .org.jboss.netty.example.localtime.DayOfWeek dayOfWeek = 5;
public static final int DAYOFWEEK_FIELD_NUMBER = 5;
private boolean hasDayOfWeek;
private org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek dayOfWeek_ = org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek.SUNDAY;
private org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek dayOfWeek_;
public boolean hasDayOfWeek() { return hasDayOfWeek; }
public org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek getDayOfWeek() { return dayOfWeek_; }
@ -906,6 +933,9 @@ public final class LocalTimeProtocol {
public boolean hasSecond() { return hasSecond; }
public int getSecond() { return second_; }
private void initFields() {
dayOfWeek_ = org.jboss.netty.example.localtime.LocalTimeProtocol.DayOfWeek.SUNDAY;
}
public final boolean isInitialized() {
if (!hasYear) {
return false;
@ -933,6 +963,7 @@ public final class LocalTimeProtocol {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (hasYear()) {
output.writeUInt32(1, getYear());
}
@ -1034,14 +1065,23 @@ public final class LocalTimeProtocol {
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input).buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
.buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime parseFrom(
com.google.protobuf.CodedInputStream input)
@ -1357,23 +1397,28 @@ public final class LocalTimeProtocol {
result.second_ = 0;
return this;
}
// @@protoc_insertion_point(builder_scope:org.jboss.netty.example.localtime.LocalTime)
}
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
static {
defaultInstance = new LocalTime(true);
org.jboss.netty.example.localtime.LocalTimeProtocol.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jboss.netty.example.localtime.LocalTime)
}
public static final class LocalTimes extends
com.google.protobuf.GeneratedMessage {
// Use LocalTimes.newBuilder() to construct.
private LocalTimes() {}
private LocalTimes() {
initFields();
}
private LocalTimes(boolean noInit) {}
private static final LocalTimes defaultInstance = new LocalTimes();
private static final LocalTimes defaultInstance;
public static LocalTimes getDefaultInstance() {
return defaultInstance;
}
@ -1404,6 +1449,8 @@ public final class LocalTimeProtocol {
return localTime_.get(index);
}
private void initFields() {
}
public final boolean isInitialized() {
for (org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime element : getLocalTimeList()) {
if (!element.isInitialized()) {
@ -1415,6 +1462,7 @@ public final class LocalTimeProtocol {
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTime element : getLocalTimeList()) {
output.writeMessage(1, element);
}
@ -1474,14 +1522,23 @@ public final class LocalTimeProtocol {
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input).buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
.buildParsed();
Builder builder = newBuilder();
if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
return builder.buildParsed();
} else {
return null;
}
}
public static org.jboss.netty.example.localtime.LocalTimeProtocol.LocalTimes parseFrom(
com.google.protobuf.CodedInputStream input)
@ -1680,15 +1737,17 @@ public final class LocalTimeProtocol {
result.localTime_ = java.util.Collections.emptyList();
return this;
}
// @@protoc_insertion_point(builder_scope:org.jboss.netty.example.localtime.LocalTimes)
}
static {
org.jboss.netty.example.localtime.LocalTimeProtocol.getDescriptor();
}
static {
defaultInstance = new LocalTimes(true);
org.jboss.netty.example.localtime.LocalTimeProtocol.internalForceInit();
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jboss.netty.example.localtime.LocalTimes)
}
private static com.google.protobuf.Descriptors.Descriptor
@ -1720,26 +1779,25 @@ public final class LocalTimeProtocol {
descriptor;
static {
java.lang.String[] descriptorData = {
"\nGsrc/main/java/org/jboss/netty/example/" +
"localtime/LocalTimeProtocol.proto\022!org.j" +
"boss.netty.example.localtime\"Y\n\010Location" +
"\022?\n\tcontinent\030\001 \002(\0162,.org.jboss.netty.ex" +
"ample.localtime.Continent\022\014\n\004city\030\002 \002(\t\"" +
"J\n\tLocations\022=\n\010location\030\001 \003(\0132+.org.jbo" +
"ss.netty.example.localtime.Location\"\253\001\n\t" +
"LocalTime\022\014\n\004year\030\001 \002(\r\022\r\n\005month\030\002 \002(\r\022\022" +
"\n\ndayOfMonth\030\004 \002(\r\022?\n\tdayOfWeek\030\005 \002(\0162,." +
"org.jboss.netty.example.localtime.DayOfW",
"eek\022\014\n\004hour\030\006 \002(\r\022\016\n\006minute\030\007 \002(\r\022\016\n\006sec" +
"ond\030\010 \002(\r\"M\n\nLocalTimes\022?\n\tlocalTime\030\001 \003" +
"(\0132,.org.jboss.netty.example.localtime.L" +
"ocalTime*\231\001\n\tContinent\022\n\n\006AFRICA\020\000\022\013\n\007AM" +
"ERICA\020\001\022\016\n\nANTARCTICA\020\002\022\n\n\006ARCTIC\020\003\022\010\n\004A" +
"SIA\020\004\022\014\n\010ATLANTIC\020\005\022\r\n\tAUSTRALIA\020\006\022\n\n\006EU" +
"ROPE\020\007\022\n\n\006INDIAN\020\010\022\013\n\007MIDEAST\020\t\022\013\n\007PACIF" +
"IC\020\n*g\n\tDayOfWeek\022\n\n\006SUNDAY\020\001\022\n\n\006MONDAY\020" +
"\002\022\013\n\007TUESDAY\020\003\022\r\n\tWEDNESDAY\020\004\022\014\n\010THURSDA" +
"Y\020\005\022\n\n\006FRIDAY\020\006\022\014\n\010SATURDAY\020\007B\002H\001"
"\n\027LocalTimeProtocol.proto\022!org.jboss.net" +
"ty.example.localtime\"Y\n\010Location\022?\n\tcont" +
"inent\030\001 \002(\0162,.org.jboss.netty.example.lo" +
"caltime.Continent\022\014\n\004city\030\002 \002(\t\"J\n\tLocat" +
"ions\022=\n\010location\030\001 \003(\0132+.org.jboss.netty" +
".example.localtime.Location\"\253\001\n\tLocalTim" +
"e\022\014\n\004year\030\001 \002(\r\022\r\n\005month\030\002 \002(\r\022\022\n\ndayOfM" +
"onth\030\004 \002(\r\022?\n\tdayOfWeek\030\005 \002(\0162,.org.jbos" +
"s.netty.example.localtime.DayOfWeek\022\014\n\004h" +
"our\030\006 \002(\r\022\016\n\006minute\030\007 \002(\r\022\016\n\006second\030\010 \002(",
"\r\"M\n\nLocalTimes\022?\n\tlocalTime\030\001 \003(\0132,.org" +
".jboss.netty.example.localtime.LocalTime" +
"*\231\001\n\tContinent\022\n\n\006AFRICA\020\000\022\013\n\007AMERICA\020\001\022" +
"\016\n\nANTARCTICA\020\002\022\n\n\006ARCTIC\020\003\022\010\n\004ASIA\020\004\022\014\n" +
"\010ATLANTIC\020\005\022\r\n\tAUSTRALIA\020\006\022\n\n\006EUROPE\020\007\022\n" +
"\n\006INDIAN\020\010\022\013\n\007MIDEAST\020\t\022\013\n\007PACIFIC\020\n*g\n\t" +
"DayOfWeek\022\n\n\006SUNDAY\020\001\022\n\n\006MONDAY\020\002\022\013\n\007TUE" +
"SDAY\020\003\022\r\n\tWEDNESDAY\020\004\022\014\n\010THURSDAY\020\005\022\n\n\006F" +
"RIDAY\020\006\022\014\n\010SATURDAY\020\007B\002H\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@ -1788,4 +1846,6 @@ public final class LocalTimeProtocol {
}
public static void internalForceInit() {}
// @@protoc_insertion_point(outer_class_scope)
}