diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c7334bd --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2014-2018 BAData LLC, https://badata.net + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 143f261..6872a71 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![Build Status](https://api.travis-ci.org/BAData/protobuf-converter.svg)](https://travis-ci.org/BAData/protobuf-converter) [![GitHub release](https://img.shields.io/github/release/BAData/protobuf-converter.svg)](https://github.com/BAData/protobuf-converter/releases) -[![Slack Status](http://badata-support.herokuapp.com/badge.svg)](https://badata-support.herokuapp.com) [![JitPack repository](https://jitpack.io/v/BAData/protobuf-converter.svg)](https://jitpack.io/#BAData/protobuf-converter) # Protobuf converter **protobuf-converter** is library for transforming your Domain Model Objects into Google Protobuf Messages and vice versa. @@ -137,4 +136,4 @@ java -jar example.jar # License -GNU General Public License v3.0 +MIT License diff --git a/build.gradle b/build.gradle index 3577b06..90e6ade 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { } } dependencies { - classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.7.6" + classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.5" } } @@ -27,13 +27,13 @@ targetCompatibility='1.7' protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.0.0-beta-1' + artifact = 'com.google.protobuf:protoc:3.5.1' } generatedFilesBaseDir = "$projectDir/src" } dependencies { - compile 'com.google.protobuf:protobuf-java:3.0.0-beta-1' + compile 'com.google.protobuf:protobuf-java:3.5.1' testCompile 'junit:junit:4.12' } @@ -50,19 +50,4 @@ task javadocJar(type: Jar, dependsOn: javadoc) { artifacts { archives sourcesJar archives javadocJar -} - -// To specify a license in the pom: -install { - repositories.mavenInstaller { - pom.project { - licenses { - license { - name 'GNU General Public License v3.0' - url 'http://www.gnu.org/licenses/gpl-3.0.txt' - distribution 'repo' - } - } - } - } } \ No newline at end of file diff --git a/example/build.gradle b/example/build.gradle index c6e5220..402587f 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -5,7 +5,7 @@ buildscript { } } dependencies { - classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.7.6" + classpath "gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.5" } } @@ -40,11 +40,11 @@ jar { protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.0.0-beta-1' + artifact = 'com.google.protobuf:protoc:3.5.1' } plugins { grpc { - artifact = 'io.grpc:protoc-gen-grpc-java:0.9.0' + artifact = 'io.grpc:protoc-gen-grpc-java:1.12.0' } } generateProtoTasks { @@ -58,6 +58,6 @@ protobuf { dependencies { compile files("libs/protobuf-converter.jar") - compile 'com.google.protobuf:protobuf-java:3.0.0-beta-1' - compile 'io.grpc:grpc-all:0.9.0' + compile 'com.google.protobuf:protobuf-java:3.5.1' + compile 'io.grpc:grpc-all:1.12.0' } diff --git a/example/libs/protobuf-converter.jar b/example/libs/protobuf-converter.jar index 73aa2ce..e7d3b1a 100644 Binary files a/example/libs/protobuf-converter.jar and b/example/libs/protobuf-converter.jar differ diff --git a/example/src/main/java/net/badata/protobuf/example/Main.java b/example/src/main/java/net/badata/protobuf/example/Main.java index 686e820..37252ed 100644 --- a/example/src/main/java/net/badata/protobuf/example/Main.java +++ b/example/src/main/java/net/badata/protobuf/example/Main.java @@ -4,9 +4,8 @@ import net.badata.protobuf.example.server.ProtobufServer; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class Main { diff --git a/example/src/main/java/net/badata/protobuf/example/client/ClientException.java b/example/src/main/java/net/badata/protobuf/example/client/ClientException.java index 8cbae49..3c42977 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/ClientException.java +++ b/example/src/main/java/net/badata/protobuf/example/client/ClientException.java @@ -1,9 +1,8 @@ package net.badata.protobuf.example.client; /** - * Created by jsjem on 05.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class ClientException extends Exception { diff --git a/example/src/main/java/net/badata/protobuf/example/client/ProtobufClient.java b/example/src/main/java/net/badata/protobuf/example/client/ProtobufClient.java index 9561781..2e46ef4 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/ProtobufClient.java +++ b/example/src/main/java/net/badata/protobuf/example/client/ProtobufClient.java @@ -20,9 +20,8 @@ import java.util.concurrent.TimeUnit; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class ProtobufClient { diff --git a/example/src/main/java/net/badata/protobuf/example/client/domain/BookMapper.java b/example/src/main/java/net/badata/protobuf/example/client/domain/BookMapper.java index de8b144..b09a801 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/domain/BookMapper.java +++ b/example/src/main/java/net/badata/protobuf/example/client/domain/BookMapper.java @@ -8,9 +8,8 @@ import net.badata.protobuf.example.proto.Book; /** - * Created by jsjem on 05.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class BookMapper extends DefaultMapperImpl { diff --git a/example/src/main/java/net/badata/protobuf/example/client/domain/BooleanEnumConverter.java b/example/src/main/java/net/badata/protobuf/example/client/domain/BooleanEnumConverter.java index deeba34..ac2580b 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/domain/BooleanEnumConverter.java +++ b/example/src/main/java/net/badata/protobuf/example/client/domain/BooleanEnumConverter.java @@ -4,9 +4,8 @@ import net.badata.protobuf.example.proto.BookState; /** - * Created by jsjem on 05.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class BooleanEnumConverter implements TypeConverter { diff --git a/example/src/main/java/net/badata/protobuf/example/client/domain/Reader.java b/example/src/main/java/net/badata/protobuf/example/client/domain/Reader.java index 5c25f19..52523fb 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/domain/Reader.java +++ b/example/src/main/java/net/badata/protobuf/example/client/domain/Reader.java @@ -5,9 +5,8 @@ import net.badata.protobuf.example.proto.User; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ @ProtoClass(User.class) public class Reader { diff --git a/example/src/main/java/net/badata/protobuf/example/client/domain/ReadingBook.java b/example/src/main/java/net/badata/protobuf/example/client/domain/ReadingBook.java index f220d2f..8342619 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/domain/ReadingBook.java +++ b/example/src/main/java/net/badata/protobuf/example/client/domain/ReadingBook.java @@ -5,9 +5,8 @@ import net.badata.protobuf.example.proto.Book; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ @ProtoClass(value = Book.class, mapper = BookMapper.class) public class ReadingBook { diff --git a/example/src/main/java/net/badata/protobuf/example/client/view/AddBookView.java b/example/src/main/java/net/badata/protobuf/example/client/view/AddBookView.java index 768a961..65e6aaa 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/view/AddBookView.java +++ b/example/src/main/java/net/badata/protobuf/example/client/view/AddBookView.java @@ -7,9 +7,8 @@ import java.text.NumberFormat; /** - * Created by jsjem on 06.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class AddBookView implements ActionListener { diff --git a/example/src/main/java/net/badata/protobuf/example/client/view/ClientWindow.java b/example/src/main/java/net/badata/protobuf/example/client/view/ClientWindow.java index 06fca40..67d5348 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/view/ClientWindow.java +++ b/example/src/main/java/net/badata/protobuf/example/client/view/ClientWindow.java @@ -12,9 +12,8 @@ import java.util.List; /** - * Created by jsjem on 05.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class ClientWindow implements LoginView.OnLoginActionListener, AddBookView.OnAddBookActionListener, LibraryView.OnLibraryActionListener { diff --git a/example/src/main/java/net/badata/protobuf/example/client/view/LibraryView.java b/example/src/main/java/net/badata/protobuf/example/client/view/LibraryView.java index c6d9630..a34a439 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/view/LibraryView.java +++ b/example/src/main/java/net/badata/protobuf/example/client/view/LibraryView.java @@ -12,9 +12,8 @@ import java.util.List; /** - * Created by jsjem on 06.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class LibraryView implements ActionListener, ListSelectionListener { diff --git a/example/src/main/java/net/badata/protobuf/example/client/view/LoginView.java b/example/src/main/java/net/badata/protobuf/example/client/view/LoginView.java index 8aad22f..0d3526a 100644 --- a/example/src/main/java/net/badata/protobuf/example/client/view/LoginView.java +++ b/example/src/main/java/net/badata/protobuf/example/client/view/LoginView.java @@ -5,9 +5,8 @@ import java.awt.event.ActionListener; /** - * Created by jsjem on 06.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class LoginView implements ActionListener { diff --git a/example/src/main/java/net/badata/protobuf/example/server/LibraryService.java b/example/src/main/java/net/badata/protobuf/example/server/LibraryService.java index 14951e9..32612dc 100644 --- a/example/src/main/java/net/badata/protobuf/example/server/LibraryService.java +++ b/example/src/main/java/net/badata/protobuf/example/server/LibraryService.java @@ -20,11 +20,10 @@ import java.util.List; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ -public class LibraryService implements LibraryServiceGrpc.LibraryService { +public class LibraryService extends LibraryServiceGrpc.LibraryServiceImplBase { private final MemoryDatabase database; diff --git a/example/src/main/java/net/badata/protobuf/example/server/MemoryDatabase.java b/example/src/main/java/net/badata/protobuf/example/server/MemoryDatabase.java index 82bdebd..4f24fdc 100644 --- a/example/src/main/java/net/badata/protobuf/example/server/MemoryDatabase.java +++ b/example/src/main/java/net/badata/protobuf/example/server/MemoryDatabase.java @@ -11,9 +11,8 @@ import java.util.Set; /** - * Created by jsjem on 05.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class MemoryDatabase { diff --git a/example/src/main/java/net/badata/protobuf/example/server/ProtobufServer.java b/example/src/main/java/net/badata/protobuf/example/server/ProtobufServer.java index ec0e3bf..276878f 100644 --- a/example/src/main/java/net/badata/protobuf/example/server/ProtobufServer.java +++ b/example/src/main/java/net/badata/protobuf/example/server/ProtobufServer.java @@ -7,9 +7,8 @@ import java.io.IOException; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ public class ProtobufServer { @@ -20,7 +19,7 @@ public class ProtobufServer { public void start() throws IOException, InterruptedException { server = ServerBuilder.forPort(PORT) - .addService(LibraryServiceGrpc.bindService(new LibraryService(database))) + .addService(new LibraryService(database)) .build() .start(); Runtime.getRuntime().addShutdownHook(new Thread() { diff --git a/example/src/main/java/net/badata/protobuf/example/server/domain/LibraryBook.java b/example/src/main/java/net/badata/protobuf/example/server/domain/LibraryBook.java index f792382..f33f3a5 100644 --- a/example/src/main/java/net/badata/protobuf/example/server/domain/LibraryBook.java +++ b/example/src/main/java/net/badata/protobuf/example/server/domain/LibraryBook.java @@ -8,9 +8,8 @@ import java.util.Objects; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ @ProtoClass(Book.class) public class LibraryBook { diff --git a/example/src/main/java/net/badata/protobuf/example/server/domain/Reader.java b/example/src/main/java/net/badata/protobuf/example/server/domain/Reader.java index 32f9825..ece55d9 100644 --- a/example/src/main/java/net/badata/protobuf/example/server/domain/Reader.java +++ b/example/src/main/java/net/badata/protobuf/example/server/domain/Reader.java @@ -5,9 +5,8 @@ import net.badata.protobuf.example.proto.User; /** - * Created by jsjem on 04.05.2016. - * * @author jsjem + * @author Roman Gushel */ @ProtoClass(value = User.class) public class Reader { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c5446d1..9eb9b6b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri May 06 16:25:28 EEST 2016 +#Mon May 14 12:06:50 EEST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-all.zip diff --git a/src/main/java/net/badata/protobuf/converter/Configuration.java b/src/main/java/net/badata/protobuf/converter/Configuration.java index 96de086..3355af5 100644 --- a/src/main/java/net/badata/protobuf/converter/Configuration.java +++ b/src/main/java/net/badata/protobuf/converter/Configuration.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter; /** @@ -22,6 +5,7 @@ * Converter} during performing of object conversion. * * @author jsjem + * @author Roman Gushel */ public final class Configuration { diff --git a/src/main/java/net/badata/protobuf/converter/Converter.java b/src/main/java/net/badata/protobuf/converter/Converter.java index 6665d61..82f70ae 100644 --- a/src/main/java/net/badata/protobuf/converter/Converter.java +++ b/src/main/java/net/badata/protobuf/converter/Converter.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter; import com.google.protobuf.Message; @@ -41,6 +24,7 @@ * Converts data from Protobuf messages to domain model objects and vice versa. * * @author jsjem + * @author Roman Gushel */ public final class Converter { @@ -73,6 +57,7 @@ public static Converter create(final FieldsIgnore fieldsIgnore) { * Create configured converter. * * @param configuration Parameters for conversion. + * @return Converter instance. */ public static Converter create(final Configuration configuration) { return new Converter(configuration); @@ -321,6 +306,7 @@ private void fillProtobufField(final FieldResolver fieldResolver, final MappingR } } + @SuppressWarnings("unchecked") private Collection createProtobufValueList(final Class type, final Class domainCollectionClass, final Collection domainCollection) { return createNestedConverter() diff --git a/src/main/java/net/badata/protobuf/converter/FieldsIgnore.java b/src/main/java/net/badata/protobuf/converter/FieldsIgnore.java index 029067f..132f8a9 100644 --- a/src/main/java/net/badata/protobuf/converter/FieldsIgnore.java +++ b/src/main/java/net/badata/protobuf/converter/FieldsIgnore.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter; import net.badata.protobuf.converter.annotation.ProtoField; @@ -33,6 +16,7 @@ * Stores fields and classes that have to be ignored during conversion. * * @author jsjem + * @author Roman Gushel */ public class FieldsIgnore { @@ -73,7 +57,7 @@ public FieldsIgnore add(final Class ignoredClass, final String... fields) { * Add all fields from another {@link net.badata.protobuf.converter.FieldsIgnore FieldsIgnore} instance. * * @param ignoredFields Instance of {@link net.badata.protobuf.converter.FieldsIgnore FieldsIgnore}. - * @return + * @return Instance of {@link net.badata.protobuf.converter.FieldsIgnore FieldsIgnore}. */ public FieldsIgnore addAll(final FieldsIgnore ignoredFields) { ignoreMapping.putAll(ignoredFields.ignoreMapping); diff --git a/src/main/java/net/badata/protobuf/converter/annotation/ProtoClass.java b/src/main/java/net/badata/protobuf/converter/annotation/ProtoClass.java index 64a3cff..8bf5016 100644 --- a/src/main/java/net/badata/protobuf/converter/annotation/ProtoClass.java +++ b/src/main/java/net/badata/protobuf/converter/annotation/ProtoClass.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ package net.badata.protobuf.converter.annotation; import com.google.protobuf.Message; @@ -31,6 +15,7 @@ * Annotation that marks domain class that may be converted to Protobuf messages. * * @author jsjem + * @author Roman Gushel */ @Target(value = ElementType.TYPE) @Retention(value = RetentionPolicy.RUNTIME) diff --git a/src/main/java/net/badata/protobuf/converter/annotation/ProtoClasses.java b/src/main/java/net/badata/protobuf/converter/annotation/ProtoClasses.java index 37c385f..882fc50 100644 --- a/src/main/java/net/badata/protobuf/converter/annotation/ProtoClasses.java +++ b/src/main/java/net/badata/protobuf/converter/annotation/ProtoClasses.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.annotation; import java.lang.annotation.ElementType; @@ -27,6 +10,7 @@ * {@link net.badata.protobuf.converter.annotation.ProtoClass ProtoClass} annotations. * * @author jsjem + * @author Roman Gushel */ @Target(value = ElementType.TYPE) @Retention(value = RetentionPolicy.RUNTIME) diff --git a/src/main/java/net/badata/protobuf/converter/annotation/ProtoField.java b/src/main/java/net/badata/protobuf/converter/annotation/ProtoField.java index 44c558c..33177df 100644 --- a/src/main/java/net/badata/protobuf/converter/annotation/ProtoField.java +++ b/src/main/java/net/badata/protobuf/converter/annotation/ProtoField.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.annotation; import net.badata.protobuf.converter.inspection.DefaultValue; @@ -33,6 +16,7 @@ * Annotation that marks domain class fields that may be converted to Protobuf messages fields. * * @author jsjem + * @author Roman Gushel */ @Target(value = ElementType.FIELD) @Retention(value = RetentionPolicy.RUNTIME) diff --git a/src/main/java/net/badata/protobuf/converter/exception/ConverterException.java b/src/main/java/net/badata/protobuf/converter/exception/ConverterException.java index 6812661..5dfa515 100644 --- a/src/main/java/net/badata/protobuf/converter/exception/ConverterException.java +++ b/src/main/java/net/badata/protobuf/converter/exception/ConverterException.java @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.exception; /** * Exception that notifies about conversion errors. * * @author jsjem + * @author Roman Gushel */ public class ConverterException extends RuntimeException { diff --git a/src/main/java/net/badata/protobuf/converter/exception/MappingException.java b/src/main/java/net/badata/protobuf/converter/exception/MappingException.java index 99f4b93..6551a3b 100644 --- a/src/main/java/net/badata/protobuf/converter/exception/MappingException.java +++ b/src/main/java/net/badata/protobuf/converter/exception/MappingException.java @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.exception; /** * Exception that notifies about field mapping errors during conversion. * * @author jsjem + * @author Roman Gushel */ public class MappingException extends Exception { diff --git a/src/main/java/net/badata/protobuf/converter/exception/TypeRelationException.java b/src/main/java/net/badata/protobuf/converter/exception/TypeRelationException.java index e7c52a4..b2d6151 100644 --- a/src/main/java/net/badata/protobuf/converter/exception/TypeRelationException.java +++ b/src/main/java/net/badata/protobuf/converter/exception/TypeRelationException.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.exception; import com.google.protobuf.Message; @@ -24,6 +7,7 @@ * ProtoClass} is different form the required protobuf class. * * @author jsjem + * @author Roman Gushel */ public class TypeRelationException extends Exception { diff --git a/src/main/java/net/badata/protobuf/converter/exception/WriteException.java b/src/main/java/net/badata/protobuf/converter/exception/WriteException.java index 92de774..af0ce9f 100644 --- a/src/main/java/net/badata/protobuf/converter/exception/WriteException.java +++ b/src/main/java/net/badata/protobuf/converter/exception/WriteException.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.exception; /** @@ -22,6 +5,7 @@ * vice versa. * * @author jsjem + * @author Roman Gushel */ public class WriteException extends Exception { diff --git a/src/main/java/net/badata/protobuf/converter/inspection/DefaultNullValueInspectorImpl.java b/src/main/java/net/badata/protobuf/converter/inspection/DefaultNullValueInspectorImpl.java index 2e46aea..ba5a8d9 100644 --- a/src/main/java/net/badata/protobuf/converter/inspection/DefaultNullValueInspectorImpl.java +++ b/src/main/java/net/badata/protobuf/converter/inspection/DefaultNullValueInspectorImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.inspection; /** @@ -22,6 +5,7 @@ * applied by default. * * @author jsjem + * @author Roman Gushel */ public final class DefaultNullValueInspectorImpl implements NullValueInspector { diff --git a/src/main/java/net/badata/protobuf/converter/inspection/DefaultValue.java b/src/main/java/net/badata/protobuf/converter/inspection/DefaultValue.java index 5f530b9..6720eb0 100644 --- a/src/main/java/net/badata/protobuf/converter/inspection/DefaultValue.java +++ b/src/main/java/net/badata/protobuf/converter/inspection/DefaultValue.java @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.inspection; /** * Interface for creating default values for domain fields. * * @author jsjem + * @author Roman Gushel */ public interface DefaultValue { diff --git a/src/main/java/net/badata/protobuf/converter/inspection/NullValueInspector.java b/src/main/java/net/badata/protobuf/converter/inspection/NullValueInspector.java index cf5bb73..3298cf9 100644 --- a/src/main/java/net/badata/protobuf/converter/inspection/NullValueInspector.java +++ b/src/main/java/net/badata/protobuf/converter/inspection/NullValueInspector.java @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.inspection; /** * Interface for examine protobuf fields for null(default) values. * * @author jsjem + * @author Roman Gushel */ public interface NullValueInspector { diff --git a/src/main/java/net/badata/protobuf/converter/inspection/SimpleDefaultValueImpl.java b/src/main/java/net/badata/protobuf/converter/inspection/SimpleDefaultValueImpl.java index cb0ff0e..c189cce 100644 --- a/src/main/java/net/badata/protobuf/converter/inspection/SimpleDefaultValueImpl.java +++ b/src/main/java/net/badata/protobuf/converter/inspection/SimpleDefaultValueImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.inspection; /** @@ -22,6 +5,7 @@ * applied by default. * * @author jsjem + * @author Roman Gushel */ public class SimpleDefaultValueImpl implements DefaultValue { diff --git a/src/main/java/net/badata/protobuf/converter/mapping/DefaultMapperImpl.java b/src/main/java/net/badata/protobuf/converter/mapping/DefaultMapperImpl.java index 32808a1..0e6310f 100644 --- a/src/main/java/net/badata/protobuf/converter/mapping/DefaultMapperImpl.java +++ b/src/main/java/net/badata/protobuf/converter/mapping/DefaultMapperImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.mapping; import com.google.protobuf.Message; @@ -30,6 +13,7 @@ * This implementation maps fields values directly from domain instance to related protobuf instance and vice versa. * * @author jsjem + * @author Roman Gushel */ public class DefaultMapperImpl implements Mapper { diff --git a/src/main/java/net/badata/protobuf/converter/mapping/Mapper.java b/src/main/java/net/badata/protobuf/converter/mapping/Mapper.java index 225429f..b42df22 100644 --- a/src/main/java/net/badata/protobuf/converter/mapping/Mapper.java +++ b/src/main/java/net/badata/protobuf/converter/mapping/Mapper.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.mapping; import com.google.protobuf.Message; @@ -25,6 +8,7 @@ * Interface for mapping field values between domain and protobuf objects. * * @author jsjem + * @author Roman Gushel */ public interface Mapper { diff --git a/src/main/java/net/badata/protobuf/converter/mapping/MappingResult.java b/src/main/java/net/badata/protobuf/converter/mapping/MappingResult.java index e87d6c6..ea0c40f 100644 --- a/src/main/java/net/badata/protobuf/converter/mapping/MappingResult.java +++ b/src/main/java/net/badata/protobuf/converter/mapping/MappingResult.java @@ -1,26 +1,10 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.mapping; /** * Represents results of field mapping performed by {@link net.badata.protobuf.converter.mapping.Mapper} implementation. * * @author jsjem + * @author Roman Gushel */ public class MappingResult { diff --git a/src/main/java/net/badata/protobuf/converter/resolver/AnnotatedFieldResolverFactoryImpl.java b/src/main/java/net/badata/protobuf/converter/resolver/AnnotatedFieldResolverFactoryImpl.java index 7fa7d8c..381a0aa 100644 --- a/src/main/java/net/badata/protobuf/converter/resolver/AnnotatedFieldResolverFactoryImpl.java +++ b/src/main/java/net/badata/protobuf/converter/resolver/AnnotatedFieldResolverFactoryImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.resolver; import net.badata.protobuf.converter.annotation.ProtoField; @@ -31,6 +14,7 @@ * ProtoField} annotation. * * @author jsjem + * @author Roman Gushel */ public class AnnotatedFieldResolverFactoryImpl implements FieldResolverFactory { diff --git a/src/main/java/net/badata/protobuf/converter/resolver/DefaultFieldResolverImpl.java b/src/main/java/net/badata/protobuf/converter/resolver/DefaultFieldResolverImpl.java index 604a17d..e4ba8ca 100644 --- a/src/main/java/net/badata/protobuf/converter/resolver/DefaultFieldResolverImpl.java +++ b/src/main/java/net/badata/protobuf/converter/resolver/DefaultFieldResolverImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.resolver; import net.badata.protobuf.converter.inspection.DefaultNullValueInspectorImpl; @@ -30,6 +13,7 @@ * Default implementation of {@link net.badata.protobuf.converter.resolver.FieldResolver FieldResolver}. * * @author jsjem + * @author Roman Gushel */ public class DefaultFieldResolverImpl implements FieldResolver { diff --git a/src/main/java/net/badata/protobuf/converter/resolver/FieldResolver.java b/src/main/java/net/badata/protobuf/converter/resolver/FieldResolver.java index 692d0b7..2f2c0c0 100644 --- a/src/main/java/net/badata/protobuf/converter/resolver/FieldResolver.java +++ b/src/main/java/net/badata/protobuf/converter/resolver/FieldResolver.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.resolver; import net.badata.protobuf.converter.inspection.DefaultValue; @@ -27,6 +10,7 @@ * Resolver for domain field data that necessary for performing conversion. * * @author jsjem + * @author Roman Gushel */ public interface FieldResolver { diff --git a/src/main/java/net/badata/protobuf/converter/resolver/FieldResolverFactory.java b/src/main/java/net/badata/protobuf/converter/resolver/FieldResolverFactory.java index be69936..a7553c1 100644 --- a/src/main/java/net/badata/protobuf/converter/resolver/FieldResolverFactory.java +++ b/src/main/java/net/badata/protobuf/converter/resolver/FieldResolverFactory.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.resolver; import java.lang.reflect.Field; @@ -23,6 +6,7 @@ * Factory interface for creating field resolvers. * * @author jsjem + * @author Roman Gushel */ public interface FieldResolverFactory { diff --git a/src/main/java/net/badata/protobuf/converter/type/DateLongConverterImpl.java b/src/main/java/net/badata/protobuf/converter/type/DateLongConverterImpl.java index 0b1ebd8..bf57dbb 100644 --- a/src/main/java/net/badata/protobuf/converter/type/DateLongConverterImpl.java +++ b/src/main/java/net/badata/protobuf/converter/type/DateLongConverterImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.type; @@ -24,6 +7,7 @@ * Converts domain {@link java.util.Date Date} field value to protobuf {@link java.lang.Long Long} field value. * * @author jsjem + * @author Roman Gushel */ public class DateLongConverterImpl implements TypeConverter { diff --git a/src/main/java/net/badata/protobuf/converter/type/DefaultConverterImpl.java b/src/main/java/net/badata/protobuf/converter/type/DefaultConverterImpl.java index ad817ed..420475b 100644 --- a/src/main/java/net/badata/protobuf/converter/type/DefaultConverterImpl.java +++ b/src/main/java/net/badata/protobuf/converter/type/DefaultConverterImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.type; @@ -25,6 +8,7 @@ * This implementation does not perform field data conversion. * * @author jsjem + * @author Roman Gushel */ public class DefaultConverterImpl implements TypeConverter { diff --git a/src/main/java/net/badata/protobuf/converter/type/EnumStringConverter.java b/src/main/java/net/badata/protobuf/converter/type/EnumStringConverter.java index 413710b..f789b4a 100644 --- a/src/main/java/net/badata/protobuf/converter/type/EnumStringConverter.java +++ b/src/main/java/net/badata/protobuf/converter/type/EnumStringConverter.java @@ -1,29 +1,12 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.type; - import java.lang.reflect.ParameterizedType; /** - * Converts domain {@link java.lang.Enum Enum} field value to protobuf {@link java.lang.String String} field value. + * Converts domain {@link java.lang.Enum Enum} field value to protobuf {@link java.lang.String String} field value. * - * @author future + * @author jsjem + * @author Roman Gushel */ public class EnumStringConverter> implements TypeConverter { diff --git a/src/main/java/net/badata/protobuf/converter/type/SetListConverterImpl.java b/src/main/java/net/badata/protobuf/converter/type/SetListConverterImpl.java index 10ac260..3a6ee17 100644 --- a/src/main/java/net/badata/protobuf/converter/type/SetListConverterImpl.java +++ b/src/main/java/net/badata/protobuf/converter/type/SetListConverterImpl.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.type; import java.util.ArrayList; @@ -26,6 +9,7 @@ * Converts domain {@link java.util.Set Set} field value to protobuf {@link java.util.List List} field value. * * @author jsjem + * @author Roman Gushel */ public class SetListConverterImpl implements TypeConverter, List> { diff --git a/src/main/java/net/badata/protobuf/converter/type/TypeConverter.java b/src/main/java/net/badata/protobuf/converter/type/TypeConverter.java index 2a92c89..8576e1b 100644 --- a/src/main/java/net/badata/protobuf/converter/type/TypeConverter.java +++ b/src/main/java/net/badata/protobuf/converter/type/TypeConverter.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.type; /** @@ -23,6 +6,7 @@ * @param Field type in the domain object. * @param Field type in the protobuf object. * @author jsjem + * @author Roman Gushel */ public interface TypeConverter { diff --git a/src/main/java/net/badata/protobuf/converter/utils/AnnotationUtils.java b/src/main/java/net/badata/protobuf/converter/utils/AnnotationUtils.java index 2cf50a6..4d23ce2 100644 --- a/src/main/java/net/badata/protobuf/converter/utils/AnnotationUtils.java +++ b/src/main/java/net/badata/protobuf/converter/utils/AnnotationUtils.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.utils; import com.google.protobuf.Message; @@ -33,6 +16,7 @@ * Utilities for extract data stored in the annotations. * * @author jsjem + * @author Roman Gushel */ public class AnnotationUtils { diff --git a/src/main/java/net/badata/protobuf/converter/utils/FieldUtils.java b/src/main/java/net/badata/protobuf/converter/utils/FieldUtils.java index 4efa542..b41c50a 100644 --- a/src/main/java/net/badata/protobuf/converter/utils/FieldUtils.java +++ b/src/main/java/net/badata/protobuf/converter/utils/FieldUtils.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.utils; import net.badata.protobuf.converter.annotation.ProtoClass; @@ -28,7 +11,8 @@ import java.util.Collection; /** - * Created by jsjem on 25.04.2016. + * @author jsjem + * @author Roman Gushel */ public final class FieldUtils { diff --git a/src/main/java/net/badata/protobuf/converter/utils/MessageUtils.java b/src/main/java/net/badata/protobuf/converter/utils/MessageUtils.java index a714f0c..450f117 100644 --- a/src/main/java/net/badata/protobuf/converter/utils/MessageUtils.java +++ b/src/main/java/net/badata/protobuf/converter/utils/MessageUtils.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.utils; import com.google.protobuf.Message; @@ -25,6 +8,7 @@ * Utilities for extract Protobuf messages . * * @author jsjem + * @author Roman Gushel */ public class MessageUtils { diff --git a/src/main/java/net/badata/protobuf/converter/utils/StringUtils.java b/src/main/java/net/badata/protobuf/converter/utils/StringUtils.java index cc4feab..af4f9d7 100644 --- a/src/main/java/net/badata/protobuf/converter/utils/StringUtils.java +++ b/src/main/java/net/badata/protobuf/converter/utils/StringUtils.java @@ -1,24 +1,8 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.utils; /** - * Created by jsjem on 25.04.2016. + * @author jsjem + * @author Roman Gushel */ public final class StringUtils { diff --git a/src/main/java/net/badata/protobuf/converter/writer/AbstractWriter.java b/src/main/java/net/badata/protobuf/converter/writer/AbstractWriter.java index 664ea8c..c1314fc 100644 --- a/src/main/java/net/badata/protobuf/converter/writer/AbstractWriter.java +++ b/src/main/java/net/badata/protobuf/converter/writer/AbstractWriter.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.writer; import net.badata.protobuf.converter.exception.WriteException; @@ -24,6 +7,7 @@ * Abstract class for performing data writing to the objects. * * @author jsjem + * @author Roman Gushel */ public abstract class AbstractWriter { diff --git a/src/main/java/net/badata/protobuf/converter/writer/DomainWriter.java b/src/main/java/net/badata/protobuf/converter/writer/DomainWriter.java index 49e4c2b..c957530 100644 --- a/src/main/java/net/badata/protobuf/converter/writer/DomainWriter.java +++ b/src/main/java/net/badata/protobuf/converter/writer/DomainWriter.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.writer; import net.badata.protobuf.converter.exception.WriteException; @@ -30,6 +13,7 @@ * Writes data to the domain instance. * * @author jsjem + * @author Roman Gushel */ public class DomainWriter extends AbstractWriter { diff --git a/src/main/java/net/badata/protobuf/converter/writer/ProtobufWriter.java b/src/main/java/net/badata/protobuf/converter/writer/ProtobufWriter.java index 22e4054..533a4f5 100644 --- a/src/main/java/net/badata/protobuf/converter/writer/ProtobufWriter.java +++ b/src/main/java/net/badata/protobuf/converter/writer/ProtobufWriter.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.writer; import com.google.protobuf.Message; @@ -31,6 +14,7 @@ * Writes data to the protobuf dto. * * @author jsjem + * @author Roman Gushel */ public class ProtobufWriter extends AbstractWriter { diff --git a/src/test/java/net/badata/protobuf/converter/ConverterTest.java b/src/test/java/net/badata/protobuf/converter/ConverterTest.java index 1ecb43e..d032706 100644 --- a/src/test/java/net/badata/protobuf/converter/ConverterTest.java +++ b/src/test/java/net/badata/protobuf/converter/ConverterTest.java @@ -15,7 +15,8 @@ import static net.badata.protobuf.converter.domain.ConverterDomain.TestEnumConverter.TestEnum; /** - * Created by jsjem on 21.04.2016. + * @author jsjem + * @author Roman Gushel */ public class ConverterTest { diff --git a/src/test/java/net/badata/protobuf/converter/DefaultMapperTest.java b/src/test/java/net/badata/protobuf/converter/DefaultMapperTest.java index 13ff288..53617c0 100644 --- a/src/test/java/net/badata/protobuf/converter/DefaultMapperTest.java +++ b/src/test/java/net/badata/protobuf/converter/DefaultMapperTest.java @@ -20,7 +20,8 @@ import static net.badata.protobuf.converter.mapping.MappingResult.Result; /** - * Created by jsjem on 26.04.2016. + * @author jsjem + * @author Roman Gushel */ public class DefaultMapperTest { diff --git a/src/test/java/net/badata/protobuf/converter/DomainInheritanceTest.java b/src/test/java/net/badata/protobuf/converter/DomainInheritanceTest.java index 7851fd6..a9e96fd 100644 --- a/src/test/java/net/badata/protobuf/converter/DomainInheritanceTest.java +++ b/src/test/java/net/badata/protobuf/converter/DomainInheritanceTest.java @@ -1,6 +1,5 @@ package net.badata.protobuf.converter; - import net.badata.protobuf.converter.domain.DomainInheritanceDomain; import net.badata.protobuf.converter.proto.DomainInheritanceProto; import org.junit.Before; @@ -8,7 +7,10 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; - +/** + * @author jsjem + * @author Roman Gushel + */ public class DomainInheritanceTest { private DomainInheritanceDomain.Test testDomain; diff --git a/src/test/java/net/badata/protobuf/converter/FieldsIgnoreTest.java b/src/test/java/net/badata/protobuf/converter/FieldsIgnoreTest.java index a0e1353..8564521 100644 --- a/src/test/java/net/badata/protobuf/converter/FieldsIgnoreTest.java +++ b/src/test/java/net/badata/protobuf/converter/FieldsIgnoreTest.java @@ -13,7 +13,8 @@ import static net.badata.protobuf.converter.domain.IgnoreDomain.NoIgnoreDataTest; /** - * Created by jsjem on 22.04.2016. + * @author jsjem + * @author Roman Gushel */ public class FieldsIgnoreTest { diff --git a/src/test/java/net/badata/protobuf/converter/MultiMappingTest.java b/src/test/java/net/badata/protobuf/converter/MultiMappingTest.java index 1417086..80cbcfb 100644 --- a/src/test/java/net/badata/protobuf/converter/MultiMappingTest.java +++ b/src/test/java/net/badata/protobuf/converter/MultiMappingTest.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter; import net.badata.protobuf.converter.domain.MultiMappingDomain; @@ -26,9 +9,8 @@ import java.util.Collections; /** - * Created by jsjem on 19.08.2016. - * * @author jsjem + * @author Roman Gushel */ public class MultiMappingTest { diff --git a/src/test/java/net/badata/protobuf/converter/ResolverTest.java b/src/test/java/net/badata/protobuf/converter/ResolverTest.java index 5a0d592..a54ef2f 100644 --- a/src/test/java/net/badata/protobuf/converter/ResolverTest.java +++ b/src/test/java/net/badata/protobuf/converter/ResolverTest.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2017 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter; import net.badata.protobuf.converter.domain.ResolverDomain; @@ -27,9 +10,8 @@ import java.util.List; /** - * Created by jsjem on 10.03.2017. - * * @author jsjem + * @author Roman Gushel */ public class ResolverTest { private static final String DELIMITED_STRING = "one,two,three"; diff --git a/src/test/java/net/badata/protobuf/converter/domain/ConverterDomain.java b/src/test/java/net/badata/protobuf/converter/domain/ConverterDomain.java index 65e385d..905a71e 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/ConverterDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/ConverterDomain.java @@ -23,7 +23,8 @@ import java.util.Set; /** - * Created by jsjem on 26.04.2016. + * @author jsjem + * @author Roman Gushel */ public class ConverterDomain { diff --git a/src/test/java/net/badata/protobuf/converter/domain/DomainInheritanceDomain.java b/src/test/java/net/badata/protobuf/converter/domain/DomainInheritanceDomain.java index d0fcfda..05d5a83 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/DomainInheritanceDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/DomainInheritanceDomain.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.domain; import net.badata.protobuf.converter.annotation.ProtoClass; @@ -22,9 +5,8 @@ import net.badata.protobuf.converter.proto.DomainInheritanceProto; /** - * Created by jsjem on 01.08.2016. - * * @author jsjem + * @author Roman Gushel */ public class DomainInheritanceDomain { @ProtoClass(DomainInheritanceProto.Test.class) diff --git a/src/test/java/net/badata/protobuf/converter/domain/IgnoreDomain.java b/src/test/java/net/badata/protobuf/converter/domain/IgnoreDomain.java index 37e06b1..14497b5 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/IgnoreDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/IgnoreDomain.java @@ -5,7 +5,8 @@ import java.util.List; /** - * Created by jsjem on 28.04.2016. + * @author jsjem + * @author Roman Gushel */ public class IgnoreDomain { diff --git a/src/test/java/net/badata/protobuf/converter/domain/MappingDomain.java b/src/test/java/net/badata/protobuf/converter/domain/MappingDomain.java index eda1354..e4810b5 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/MappingDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/MappingDomain.java @@ -7,7 +7,8 @@ import java.util.List; /** - * Created by jsjem on 26.04.2016. + * @author jsjem + * @author Roman Gushel */ public class MappingDomain { diff --git a/src/test/java/net/badata/protobuf/converter/domain/MultiMappingDomain.java b/src/test/java/net/badata/protobuf/converter/domain/MultiMappingDomain.java index 720212c..f57dc04 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/MultiMappingDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/MultiMappingDomain.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2016 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.domain; import com.google.protobuf.Message; @@ -33,9 +16,8 @@ import java.util.List; /** - * Created by jsjem on 19.08.2016. - * * @author jsjem + * @author Roman Gushel */ public class MultiMappingDomain { diff --git a/src/test/java/net/badata/protobuf/converter/domain/ResolverDomain.java b/src/test/java/net/badata/protobuf/converter/domain/ResolverDomain.java index 64c8719..1aa4e27 100644 --- a/src/test/java/net/badata/protobuf/converter/domain/ResolverDomain.java +++ b/src/test/java/net/badata/protobuf/converter/domain/ResolverDomain.java @@ -1,20 +1,3 @@ -/* - * Copyright (C) 2017 BAData Creative Studio - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - package net.badata.protobuf.converter.domain; import net.badata.protobuf.converter.annotation.ProtoClass; @@ -26,9 +9,8 @@ import java.util.List; /** - * Created by jsjem on 10.03.2017. - * * @author jsjem + * @author Roman Gushel */ public class ResolverDomain { diff --git a/src/test/java/net/badata/protobuf/converter/proto/ConverterProto.java b/src/test/java/net/badata/protobuf/converter/proto/ConverterProto.java index 0b82018..746fce7 100644 --- a/src/test/java/net/badata/protobuf/converter/proto/ConverterProto.java +++ b/src/test/java/net/badata/protobuf/converter/proto/ConverterProto.java @@ -5,35 +5,41 @@ public final class ConverterProto { private ConverterProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } public interface PrimitiveTestOrBuilder extends // @@protoc_insertion_point(interface_extends:net.badata.protobuf.converter.proto.PrimitiveTest) com.google.protobuf.MessageOrBuilder { /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ int getIntValue(); /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ long getLongValue(); /** - * optional float floatValue = 3; + * float floatValue = 3; */ float getFloatValue(); /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ double getDoubleValue(); /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ boolean getBooleanValue(); } @@ -41,11 +47,12 @@ public interface PrimitiveTestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.PrimitiveTest} */ public static final class PrimitiveTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.PrimitiveTest) PrimitiveTestOrBuilder { + private static final long serialVersionUID = 0L; // Use PrimitiveTest.newBuilder() to construct. - private PrimitiveTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private PrimitiveTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PrimitiveTest() { @@ -59,13 +66,19 @@ private PrimitiveTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private PrimitiveTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -75,7 +88,8 @@ private PrimitiveTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,12 +122,12 @@ private PrimitiveTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -122,7 +136,7 @@ private PrimitiveTest( return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -132,7 +146,7 @@ private PrimitiveTest( public static final int INTVALUE_FIELD_NUMBER = 1; private int intValue_; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; @@ -141,7 +155,7 @@ public int getIntValue() { public static final int LONGVALUE_FIELD_NUMBER = 2; private long longValue_; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; @@ -150,7 +164,7 @@ public long getLongValue() { public static final int FLOATVALUE_FIELD_NUMBER = 3; private float floatValue_; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; @@ -159,7 +173,7 @@ public float getFloatValue() { public static final int DOUBLEVALUE_FIELD_NUMBER = 4; private double doubleValue_; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; @@ -168,7 +182,7 @@ public double getDoubleValue() { public static final int BOOLEANVALUE_FIELD_NUMBER = 5; private boolean booleanValue_; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; @@ -201,6 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (booleanValue_ != false) { output.writeBool(5, booleanValue_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -228,11 +243,77 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, booleanValue_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest other = (net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest) obj; + + boolean result = true; + result = result && (getIntValue() + == other.getIntValue()); + result = result && (getLongValue() + == other.getLongValue()); + result = result && ( + java.lang.Float.floatToIntBits(getFloatValue()) + == java.lang.Float.floatToIntBits( + other.getFloatValue())); + result = result && ( + java.lang.Double.doubleToLongBits(getDoubleValue()) + == java.lang.Double.doubleToLongBits( + other.getDoubleValue())); + result = result && (getBooleanValue() + == other.getBooleanValue()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntValue(); + hash = (37 * hash) + LONGVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongValue()); + hash = (37 * hash) + FLOATVALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getFloatValue()); + hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + hash = (37 * hash) + BOOLEANVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBooleanValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -256,34 +337,40 @@ public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest p } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -300,7 +387,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -308,7 +395,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.PrimitiveTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.PrimitiveTest) net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -316,7 +403,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -329,12 +416,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -380,6 +468,32 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest buildPar return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest) { return mergeFrom((net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest)other); @@ -406,6 +520,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Prim if (other.getBooleanValue() != false) { setBooleanValue(other.getBooleanValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -423,7 +538,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -434,13 +549,13 @@ public Builder mergeFrom( private int intValue_ ; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder setIntValue(int value) { @@ -449,7 +564,7 @@ public Builder setIntValue(int value) { return this; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder clearIntValue() { @@ -460,13 +575,13 @@ public Builder clearIntValue() { private long longValue_ ; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder setLongValue(long value) { @@ -475,7 +590,7 @@ public Builder setLongValue(long value) { return this; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder clearLongValue() { @@ -486,13 +601,13 @@ public Builder clearLongValue() { private float floatValue_ ; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder setFloatValue(float value) { @@ -501,7 +616,7 @@ public Builder setFloatValue(float value) { return this; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder clearFloatValue() { @@ -512,13 +627,13 @@ public Builder clearFloatValue() { private double doubleValue_ ; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder setDoubleValue(double value) { @@ -527,7 +642,7 @@ public Builder setDoubleValue(double value) { return this; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder clearDoubleValue() { @@ -538,13 +653,13 @@ public Builder clearDoubleValue() { private boolean booleanValue_ ; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder setBooleanValue(boolean value) { @@ -553,7 +668,7 @@ public Builder setBooleanValue(boolean value) { return this; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder clearBooleanValue() { @@ -563,12 +678,12 @@ public Builder clearBooleanValue() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -591,16 +706,7 @@ public PrimitiveTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new PrimitiveTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new PrimitiveTest(input, extensionRegistry); } }; @@ -624,24 +730,24 @@ public interface FieldConverterTestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional string enumString = 1; + * string enumString = 1; */ java.lang.String getEnumString(); /** - * optional string enumString = 1; + * string enumString = 1; */ com.google.protobuf.ByteString getEnumStringBytes(); /** - * optional int64 dateLong = 2; + * int64 dateLong = 2; */ long getDateLong(); /** * repeated string stringSetValue = 3; */ - com.google.protobuf.ProtocolStringList + java.util.List getStringSetValueList(); /** * repeated string stringSetValue = 3; @@ -661,11 +767,12 @@ public interface FieldConverterTestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.FieldConverterTest} */ public static final class FieldConverterTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.FieldConverterTest) FieldConverterTestOrBuilder { + private static final long serialVersionUID = 0L; // Use FieldConverterTest.newBuilder() to construct. - private FieldConverterTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private FieldConverterTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FieldConverterTest() { @@ -677,13 +784,19 @@ private FieldConverterTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private FieldConverterTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -693,13 +806,14 @@ private FieldConverterTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); enumString_ = s; break; @@ -710,7 +824,7 @@ private FieldConverterTest( break; } case 26: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { stringSetValue_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; @@ -721,15 +835,15 @@ private FieldConverterTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { stringSetValue_ = stringSetValue_.getUnmodifiableView(); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -738,7 +852,7 @@ private FieldConverterTest( return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -749,7 +863,7 @@ private FieldConverterTest( public static final int ENUMSTRING_FIELD_NUMBER = 1; private volatile java.lang.Object enumString_; /** - * optional string enumString = 1; + * string enumString = 1; */ public java.lang.String getEnumString() { java.lang.Object ref = enumString_; @@ -764,7 +878,7 @@ public java.lang.String getEnumString() { } } /** - * optional string enumString = 1; + * string enumString = 1; */ public com.google.protobuf.ByteString getEnumStringBytes() { @@ -783,7 +897,7 @@ public java.lang.String getEnumString() { public static final int DATELONG_FIELD_NUMBER = 2; private long dateLong_; /** - * optional int64 dateLong = 2; + * int64 dateLong = 2; */ public long getDateLong() { return dateLong_; @@ -831,14 +945,15 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getEnumStringBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, enumString_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, enumString_); } if (dateLong_ != 0L) { output.writeInt64(2, dateLong_); } for (int i = 0; i < stringSetValue_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, stringSetValue_.getRaw(i)); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stringSetValue_.getRaw(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -847,7 +962,7 @@ public int getSerializedSize() { size = 0; if (!getEnumStringBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, enumString_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, enumString_); } if (dateLong_ != 0L) { size += com.google.protobuf.CodedOutputStream @@ -861,11 +976,64 @@ public int getSerializedSize() { size += dataSize; size += 1 * getStringSetValueList().size(); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest other = (net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest) obj; + + boolean result = true; + result = result && getEnumString() + .equals(other.getEnumString()); + result = result && (getDateLong() + == other.getDateLong()); + result = result && getStringSetValueList() + .equals(other.getStringSetValueList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENUMSTRING_FIELD_NUMBER; + hash = (53 * hash) + getEnumString().hashCode(); + hash = (37 * hash) + DATELONG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDateLong()); + if (getStringSetValueCount() > 0) { + hash = (37 * hash) + STRINGSETVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringSetValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -889,34 +1057,40 @@ public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterT } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -933,7 +1107,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -941,7 +1115,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.FieldConverterTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.FieldConverterTest) net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -949,7 +1123,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -962,12 +1136,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -1014,6 +1189,32 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest bui return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest) { return mergeFrom((net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest)other); @@ -1042,6 +1243,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Fiel } onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1059,7 +1261,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -1071,7 +1273,7 @@ public Builder mergeFrom( private java.lang.Object enumString_ = ""; /** - * optional string enumString = 1; + * string enumString = 1; */ public java.lang.String getEnumString() { java.lang.Object ref = enumString_; @@ -1086,7 +1288,7 @@ public java.lang.String getEnumString() { } } /** - * optional string enumString = 1; + * string enumString = 1; */ public com.google.protobuf.ByteString getEnumStringBytes() { @@ -1102,7 +1304,7 @@ public java.lang.String getEnumString() { } } /** - * optional string enumString = 1; + * string enumString = 1; */ public Builder setEnumString( java.lang.String value) { @@ -1115,7 +1317,7 @@ public Builder setEnumString( return this; } /** - * optional string enumString = 1; + * string enumString = 1; */ public Builder clearEnumString() { @@ -1124,7 +1326,7 @@ public Builder clearEnumString() { return this; } /** - * optional string enumString = 1; + * string enumString = 1; */ public Builder setEnumStringBytes( com.google.protobuf.ByteString value) { @@ -1140,13 +1342,13 @@ public Builder setEnumStringBytes( private long dateLong_ ; /** - * optional int64 dateLong = 2; + * int64 dateLong = 2; */ public long getDateLong() { return dateLong_; } /** - * optional int64 dateLong = 2; + * int64 dateLong = 2; */ public Builder setDateLong(long value) { @@ -1155,7 +1357,7 @@ public Builder setDateLong(long value) { return this; } /** - * optional int64 dateLong = 2; + * int64 dateLong = 2; */ public Builder clearDateLong() { @@ -1259,12 +1461,12 @@ public Builder addStringSetValueBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -1287,16 +1489,7 @@ public FieldConverterTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new FieldConverterTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new FieldConverterTest(input, extensionRegistry); } }; @@ -1320,35 +1513,35 @@ public interface NullDefaultTestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional string nullString = 1; + * string nullString = 1; */ java.lang.String getNullString(); /** - * optional string nullString = 1; + * string nullString = 1; */ com.google.protobuf.ByteString getNullStringBytes(); /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ java.lang.String getCustomInspectionString(); /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ com.google.protobuf.ByteString getCustomInspectionStringBytes(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ boolean hasDefaultPrimitives(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getDefaultPrimitives(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getDefaultPrimitivesOrBuilder(); } @@ -1356,11 +1549,12 @@ public interface NullDefaultTestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.NullDefaultTest} */ public static final class NullDefaultTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.NullDefaultTest) NullDefaultTestOrBuilder { + private static final long serialVersionUID = 0L; // Use NullDefaultTest.newBuilder() to construct. - private NullDefaultTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private NullDefaultTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NullDefaultTest() { @@ -1371,13 +1565,19 @@ private NullDefaultTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private NullDefaultTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -1387,19 +1587,20 @@ private NullDefaultTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); nullString_ = s; break; } case 18: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); customInspectionString_ = s; break; @@ -1420,12 +1621,12 @@ private NullDefaultTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -1434,7 +1635,7 @@ private NullDefaultTest( return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1444,7 +1645,7 @@ private NullDefaultTest( public static final int NULLSTRING_FIELD_NUMBER = 1; private volatile java.lang.Object nullString_; /** - * optional string nullString = 1; + * string nullString = 1; */ public java.lang.String getNullString() { java.lang.Object ref = nullString_; @@ -1459,7 +1660,7 @@ public java.lang.String getNullString() { } } /** - * optional string nullString = 1; + * string nullString = 1; */ public com.google.protobuf.ByteString getNullStringBytes() { @@ -1478,7 +1679,7 @@ public java.lang.String getNullString() { public static final int CUSTOMINSPECTIONSTRING_FIELD_NUMBER = 2; private volatile java.lang.Object customInspectionString_; /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public java.lang.String getCustomInspectionString() { java.lang.Object ref = customInspectionString_; @@ -1493,7 +1694,7 @@ public java.lang.String getCustomInspectionString() { } } /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public com.google.protobuf.ByteString getCustomInspectionStringBytes() { @@ -1512,19 +1713,19 @@ public java.lang.String getCustomInspectionString() { public static final int DEFAULTPRIMITIVES_FIELD_NUMBER = 3; private net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest defaultPrimitives_; /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public boolean hasDefaultPrimitives() { return defaultPrimitives_ != null; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getDefaultPrimitives() { return defaultPrimitives_ == null ? net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.getDefaultInstance() : defaultPrimitives_; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getDefaultPrimitivesOrBuilder() { return getDefaultPrimitives(); @@ -1543,14 +1744,15 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNullStringBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, nullString_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, nullString_); } if (!getCustomInspectionStringBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 2, customInspectionString_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customInspectionString_); } if (defaultPrimitives_ != null) { output.writeMessage(3, getDefaultPrimitives()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -1559,20 +1761,75 @@ public int getSerializedSize() { size = 0; if (!getNullStringBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, nullString_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, nullString_); } if (!getCustomInspectionStringBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(2, customInspectionString_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customInspectionString_); } if (defaultPrimitives_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getDefaultPrimitives()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest other = (net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest) obj; + + boolean result = true; + result = result && getNullString() + .equals(other.getNullString()); + result = result && getCustomInspectionString() + .equals(other.getCustomInspectionString()); + result = result && (hasDefaultPrimitives() == other.hasDefaultPrimitives()); + if (hasDefaultPrimitives()) { + result = result && getDefaultPrimitives() + .equals(other.getDefaultPrimitives()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NULLSTRING_FIELD_NUMBER; + hash = (53 * hash) + getNullString().hashCode(); + hash = (37 * hash) + CUSTOMINSPECTIONSTRING_FIELD_NUMBER; + hash = (53 * hash) + getCustomInspectionString().hashCode(); + if (hasDefaultPrimitives()) { + hash = (37 * hash) + DEFAULTPRIMITIVES_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPrimitives().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1596,34 +1853,40 @@ public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -1640,7 +1903,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1648,7 +1911,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.NullDefaultTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.NullDefaultTest) net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1656,7 +1919,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1669,12 +1932,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -1722,6 +1986,32 @@ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest buildP return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest) { return mergeFrom((net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest)other); @@ -1744,6 +2034,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Null if (other.hasDefaultPrimitives()) { mergeDefaultPrimitives(other.getDefaultPrimitives()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1761,7 +2052,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -1772,7 +2063,7 @@ public Builder mergeFrom( private java.lang.Object nullString_ = ""; /** - * optional string nullString = 1; + * string nullString = 1; */ public java.lang.String getNullString() { java.lang.Object ref = nullString_; @@ -1787,7 +2078,7 @@ public java.lang.String getNullString() { } } /** - * optional string nullString = 1; + * string nullString = 1; */ public com.google.protobuf.ByteString getNullStringBytes() { @@ -1803,7 +2094,7 @@ public java.lang.String getNullString() { } } /** - * optional string nullString = 1; + * string nullString = 1; */ public Builder setNullString( java.lang.String value) { @@ -1816,7 +2107,7 @@ public Builder setNullString( return this; } /** - * optional string nullString = 1; + * string nullString = 1; */ public Builder clearNullString() { @@ -1825,7 +2116,7 @@ public Builder clearNullString() { return this; } /** - * optional string nullString = 1; + * string nullString = 1; */ public Builder setNullStringBytes( com.google.protobuf.ByteString value) { @@ -1841,7 +2132,7 @@ public Builder setNullStringBytes( private java.lang.Object customInspectionString_ = ""; /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public java.lang.String getCustomInspectionString() { java.lang.Object ref = customInspectionString_; @@ -1856,7 +2147,7 @@ public java.lang.String getCustomInspectionString() { } } /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public com.google.protobuf.ByteString getCustomInspectionStringBytes() { @@ -1872,7 +2163,7 @@ public java.lang.String getCustomInspectionString() { } } /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public Builder setCustomInspectionString( java.lang.String value) { @@ -1885,7 +2176,7 @@ public Builder setCustomInspectionString( return this; } /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public Builder clearCustomInspectionString() { @@ -1894,7 +2185,7 @@ public Builder clearCustomInspectionString() { return this; } /** - * optional string customInspectionString = 2; + * string customInspectionString = 2; */ public Builder setCustomInspectionStringBytes( com.google.protobuf.ByteString value) { @@ -1909,16 +2200,16 @@ public Builder setCustomInspectionStringBytes( } private net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest defaultPrimitives_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> defaultPrimitivesBuilder_; /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public boolean hasDefaultPrimitives() { return defaultPrimitivesBuilder_ != null || defaultPrimitives_ != null; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getDefaultPrimitives() { if (defaultPrimitivesBuilder_ == null) { @@ -1928,7 +2219,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getDefau } } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public Builder setDefaultPrimitives(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest value) { if (defaultPrimitivesBuilder_ == null) { @@ -1944,7 +2235,7 @@ public Builder setDefaultPrimitives(net.badata.protobuf.converter.proto.Converte return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public Builder setDefaultPrimitives( net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder builderForValue) { @@ -1958,7 +2249,7 @@ public Builder setDefaultPrimitives( return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public Builder mergeDefaultPrimitives(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest value) { if (defaultPrimitivesBuilder_ == null) { @@ -1976,7 +2267,7 @@ public Builder mergeDefaultPrimitives(net.badata.protobuf.converter.proto.Conver return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public Builder clearDefaultPrimitives() { if (defaultPrimitivesBuilder_ == null) { @@ -1990,7 +2281,7 @@ public Builder clearDefaultPrimitives() { return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder getDefaultPrimitivesBuilder() { @@ -1998,7 +2289,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder return getDefaultPrimitivesFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getDefaultPrimitivesOrBuilder() { if (defaultPrimitivesBuilder_ != null) { @@ -2009,13 +2300,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder } } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; + * .net.badata.protobuf.converter.proto.PrimitiveTest defaultPrimitives = 3; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> getDefaultPrimitivesFieldBuilder() { if (defaultPrimitivesBuilder_ == null) { - defaultPrimitivesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + defaultPrimitivesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder>( getDefaultPrimitives(), getParentForChildren(), @@ -2026,12 +2317,12 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -2054,16 +2345,7 @@ public NullDefaultTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NullDefaultTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new NullDefaultTest(input, extensionRegistry); } }; @@ -2087,83 +2369,83 @@ public interface ConverterTestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ int getIntValue(); /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ long getLongValue(); /** - * optional float floatValue = 3; + * float floatValue = 3; */ float getFloatValue(); /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ double getDoubleValue(); /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ boolean getBooleanValue(); /** - * optional string stringValue = 6; + * string stringValue = 6; */ java.lang.String getStringValue(); /** - * optional string stringValue = 6; + * string stringValue = 6; */ com.google.protobuf.ByteString getStringValueBytes(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ boolean hasPrimitiveValue(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getPrimitiveValue(); /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getPrimitiveValueOrBuilder(); /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ boolean hasFieldConversionValue(); /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest getFieldConversionValue(); /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder getFieldConversionValueOrBuilder(); /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ boolean hasNullDefaultValue(); /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest getNullDefaultValue(); /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder getNullDefaultValueOrBuilder(); /** * repeated string stringListValue = 10; */ - com.google.protobuf.ProtocolStringList + java.util.List getStringListValueList(); /** * repeated string stringListValue = 10; @@ -2252,20 +2534,20 @@ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getCom int index); /** - * optional bytes bytesValue = 14; + * bytes bytesValue = 14; */ com.google.protobuf.ByteString getBytesValue(); /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ boolean hasRecursiveValue(); /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getRecursiveValue(); /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder getRecursiveValueOrBuilder(); } @@ -2273,11 +2555,12 @@ net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getCom * Protobuf type {@code net.badata.protobuf.converter.proto.ConverterTest} */ public static final class ConverterTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.ConverterTest) ConverterTestOrBuilder { + private static final long serialVersionUID = 0L; // Use ConverterTest.newBuilder() to construct. - private ConverterTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private ConverterTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ConverterTest() { @@ -2297,13 +2580,19 @@ private ConverterTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ConverterTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -2313,7 +2602,8 @@ private ConverterTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2344,7 +2634,7 @@ private ConverterTest( break; } case 50: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); stringValue_ = s; break; @@ -2389,7 +2679,7 @@ private ConverterTest( break; } case 82: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { stringListValue_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000200; @@ -2402,7 +2692,8 @@ private ConverterTest( complexListValue_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000400; } - complexListValue_.add(input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); + complexListValue_.add( + input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); break; } case 98: { @@ -2410,7 +2701,8 @@ private ConverterTest( complexSetValue_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000800; } - complexSetValue_.add(input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); + complexSetValue_.add( + input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); break; } case 106: { @@ -2418,7 +2710,8 @@ private ConverterTest( complexNullableCollectionValue_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00001000; } - complexNullableCollectionValue_.add(input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); + complexNullableCollectionValue_.add( + input.readMessage(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.parser(), extensionRegistry)); break; } case 114: { @@ -2442,11 +2735,10 @@ private ConverterTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { stringListValue_ = stringListValue_.getUnmodifiableView(); @@ -2460,6 +2752,7 @@ private ConverterTest( if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) { complexNullableCollectionValue_ = java.util.Collections.unmodifiableList(complexNullableCollectionValue_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -2468,7 +2761,7 @@ private ConverterTest( return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_ConverterTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_ConverterTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -2479,7 +2772,7 @@ private ConverterTest( public static final int INTVALUE_FIELD_NUMBER = 1; private int intValue_; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; @@ -2488,7 +2781,7 @@ public int getIntValue() { public static final int LONGVALUE_FIELD_NUMBER = 2; private long longValue_; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; @@ -2497,7 +2790,7 @@ public long getLongValue() { public static final int FLOATVALUE_FIELD_NUMBER = 3; private float floatValue_; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; @@ -2506,7 +2799,7 @@ public float getFloatValue() { public static final int DOUBLEVALUE_FIELD_NUMBER = 4; private double doubleValue_; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; @@ -2515,7 +2808,7 @@ public double getDoubleValue() { public static final int BOOLEANVALUE_FIELD_NUMBER = 5; private boolean booleanValue_; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; @@ -2524,7 +2817,7 @@ public boolean getBooleanValue() { public static final int STRINGVALUE_FIELD_NUMBER = 6; private volatile java.lang.Object stringValue_; /** - * optional string stringValue = 6; + * string stringValue = 6; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -2539,7 +2832,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -2558,19 +2851,19 @@ public java.lang.String getStringValue() { public static final int PRIMITIVEVALUE_FIELD_NUMBER = 7; private net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest primitiveValue_; /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public boolean hasPrimitiveValue() { return primitiveValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getPrimitiveValue() { return primitiveValue_ == null ? net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.getDefaultInstance() : primitiveValue_; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getPrimitiveValueOrBuilder() { return getPrimitiveValue(); @@ -2579,19 +2872,19 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder public static final int FIELDCONVERSIONVALUE_FIELD_NUMBER = 8; private net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest fieldConversionValue_; /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public boolean hasFieldConversionValue() { return fieldConversionValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest getFieldConversionValue() { return fieldConversionValue_ == null ? net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.getDefaultInstance() : fieldConversionValue_; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder getFieldConversionValueOrBuilder() { return getFieldConversionValue(); @@ -2600,19 +2893,19 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBu public static final int NULLDEFAULTVALUE_FIELD_NUMBER = 9; private net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest nullDefaultValue_; /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public boolean hasNullDefaultValue() { return nullDefaultValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest getNullDefaultValue() { return nullDefaultValue_ == null ? net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.getDefaultInstance() : nullDefaultValue_; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder getNullDefaultValueOrBuilder() { return getNullDefaultValue(); @@ -2755,7 +3048,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder public static final int BYTESVALUE_FIELD_NUMBER = 14; private com.google.protobuf.ByteString bytesValue_; /** - * optional bytes bytesValue = 14; + * bytes bytesValue = 14; */ public com.google.protobuf.ByteString getBytesValue() { return bytesValue_; @@ -2764,19 +3057,19 @@ public com.google.protobuf.ByteString getBytesValue() { public static final int RECURSIVEVALUE_FIELD_NUMBER = 15; private net.badata.protobuf.converter.proto.ConverterProto.ConverterTest recursiveValue_; /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public boolean hasRecursiveValue() { return recursiveValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getRecursiveValue() { return recursiveValue_ == null ? net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.getDefaultInstance() : recursiveValue_; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder getRecursiveValueOrBuilder() { return getRecursiveValue(); @@ -2810,7 +3103,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBool(5, booleanValue_); } if (!getStringValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, stringValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stringValue_); } if (primitiveValue_ != null) { output.writeMessage(7, getPrimitiveValue()); @@ -2822,7 +3115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeMessage(9, getNullDefaultValue()); } for (int i = 0; i < stringListValue_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 10, stringListValue_.getRaw(i)); + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, stringListValue_.getRaw(i)); } for (int i = 0; i < complexListValue_.size(); i++) { output.writeMessage(11, complexListValue_.get(i)); @@ -2839,6 +3132,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (recursiveValue_ != null) { output.writeMessage(15, getRecursiveValue()); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -2867,7 +3161,7 @@ public int getSerializedSize() { .computeBoolSize(5, booleanValue_); } if (!getStringValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, stringValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, stringValue_); } if (primitiveValue_ != null) { size += com.google.protobuf.CodedOutputStream @@ -2909,11 +3203,145 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(15, getRecursiveValue()); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.ConverterProto.ConverterTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.ConverterProto.ConverterTest other = (net.badata.protobuf.converter.proto.ConverterProto.ConverterTest) obj; + + boolean result = true; + result = result && (getIntValue() + == other.getIntValue()); + result = result && (getLongValue() + == other.getLongValue()); + result = result && ( + java.lang.Float.floatToIntBits(getFloatValue()) + == java.lang.Float.floatToIntBits( + other.getFloatValue())); + result = result && ( + java.lang.Double.doubleToLongBits(getDoubleValue()) + == java.lang.Double.doubleToLongBits( + other.getDoubleValue())); + result = result && (getBooleanValue() + == other.getBooleanValue()); + result = result && getStringValue() + .equals(other.getStringValue()); + result = result && (hasPrimitiveValue() == other.hasPrimitiveValue()); + if (hasPrimitiveValue()) { + result = result && getPrimitiveValue() + .equals(other.getPrimitiveValue()); + } + result = result && (hasFieldConversionValue() == other.hasFieldConversionValue()); + if (hasFieldConversionValue()) { + result = result && getFieldConversionValue() + .equals(other.getFieldConversionValue()); + } + result = result && (hasNullDefaultValue() == other.hasNullDefaultValue()); + if (hasNullDefaultValue()) { + result = result && getNullDefaultValue() + .equals(other.getNullDefaultValue()); + } + result = result && getStringListValueList() + .equals(other.getStringListValueList()); + result = result && getComplexListValueList() + .equals(other.getComplexListValueList()); + result = result && getComplexSetValueList() + .equals(other.getComplexSetValueList()); + result = result && getComplexNullableCollectionValueList() + .equals(other.getComplexNullableCollectionValueList()); + result = result && getBytesValue() + .equals(other.getBytesValue()); + result = result && (hasRecursiveValue() == other.hasRecursiveValue()); + if (hasRecursiveValue()) { + result = result && getRecursiveValue() + .equals(other.getRecursiveValue()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntValue(); + hash = (37 * hash) + LONGVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongValue()); + hash = (37 * hash) + FLOATVALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getFloatValue()); + hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + hash = (37 * hash) + BOOLEANVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBooleanValue()); + hash = (37 * hash) + STRINGVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + if (hasPrimitiveValue()) { + hash = (37 * hash) + PRIMITIVEVALUE_FIELD_NUMBER; + hash = (53 * hash) + getPrimitiveValue().hashCode(); + } + if (hasFieldConversionValue()) { + hash = (37 * hash) + FIELDCONVERSIONVALUE_FIELD_NUMBER; + hash = (53 * hash) + getFieldConversionValue().hashCode(); + } + if (hasNullDefaultValue()) { + hash = (37 * hash) + NULLDEFAULTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getNullDefaultValue().hashCode(); + } + if (getStringListValueCount() > 0) { + hash = (37 * hash) + STRINGLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringListValueList().hashCode(); + } + if (getComplexListValueCount() > 0) { + hash = (37 * hash) + COMPLEXLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getComplexListValueList().hashCode(); + } + if (getComplexSetValueCount() > 0) { + hash = (37 * hash) + COMPLEXSETVALUE_FIELD_NUMBER; + hash = (53 * hash) + getComplexSetValueList().hashCode(); + } + if (getComplexNullableCollectionValueCount() > 0) { + hash = (37 * hash) + COMPLEXNULLABLECOLLECTIONVALUE_FIELD_NUMBER; + hash = (53 * hash) + getComplexNullableCollectionValueList().hashCode(); + } + hash = (37 * hash) + BYTESVALUE_FIELD_NUMBER; + hash = (53 * hash) + getBytesValue().hashCode(); + if (hasRecursiveValue()) { + hash = (37 * hash) + RECURSIVEVALUE_FIELD_NUMBER; + hash = (53 * hash) + getRecursiveValue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2937,34 +3365,40 @@ public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest p } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ConverterProto.ConverterTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -2981,7 +3415,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -2989,7 +3423,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.ConverterTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.ConverterTest) net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -2997,7 +3431,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_ConverterTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ConverterProto.internal_static_net_badata_protobuf_converter_proto_ConverterTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -3010,12 +3444,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { getComplexListValueFieldBuilder(); getComplexSetValueFieldBuilder(); getComplexNullableCollectionValueFieldBuilder(); @@ -3169,6 +3604,32 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest buildPar return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.ConverterProto.ConverterTest) { return mergeFrom((net.badata.protobuf.converter.proto.ConverterProto.ConverterTest)other); @@ -3237,7 +3698,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Conv complexListValue_ = other.complexListValue_; bitField0_ = (bitField0_ & ~0x00000400); complexListValueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComplexListValueFieldBuilder() : null; } else { complexListValueBuilder_.addAllMessages(other.complexListValue_); @@ -3263,7 +3724,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Conv complexSetValue_ = other.complexSetValue_; bitField0_ = (bitField0_ & ~0x00000800); complexSetValueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComplexSetValueFieldBuilder() : null; } else { complexSetValueBuilder_.addAllMessages(other.complexSetValue_); @@ -3289,7 +3750,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Conv complexNullableCollectionValue_ = other.complexNullableCollectionValue_; bitField0_ = (bitField0_ & ~0x00001000); complexNullableCollectionValueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComplexNullableCollectionValueFieldBuilder() : null; } else { complexNullableCollectionValueBuilder_.addAllMessages(other.complexNullableCollectionValue_); @@ -3302,6 +3763,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ConverterProto.Conv if (other.hasRecursiveValue()) { mergeRecursiveValue(other.getRecursiveValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -3319,7 +3781,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.ConverterProto.ConverterTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -3331,13 +3793,13 @@ public Builder mergeFrom( private int intValue_ ; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder setIntValue(int value) { @@ -3346,7 +3808,7 @@ public Builder setIntValue(int value) { return this; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder clearIntValue() { @@ -3357,13 +3819,13 @@ public Builder clearIntValue() { private long longValue_ ; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder setLongValue(long value) { @@ -3372,7 +3834,7 @@ public Builder setLongValue(long value) { return this; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder clearLongValue() { @@ -3383,13 +3845,13 @@ public Builder clearLongValue() { private float floatValue_ ; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder setFloatValue(float value) { @@ -3398,7 +3860,7 @@ public Builder setFloatValue(float value) { return this; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder clearFloatValue() { @@ -3409,13 +3871,13 @@ public Builder clearFloatValue() { private double doubleValue_ ; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder setDoubleValue(double value) { @@ -3424,7 +3886,7 @@ public Builder setDoubleValue(double value) { return this; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder clearDoubleValue() { @@ -3435,13 +3897,13 @@ public Builder clearDoubleValue() { private boolean booleanValue_ ; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder setBooleanValue(boolean value) { @@ -3450,7 +3912,7 @@ public Builder setBooleanValue(boolean value) { return this; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder clearBooleanValue() { @@ -3461,7 +3923,7 @@ public Builder clearBooleanValue() { private java.lang.Object stringValue_ = ""; /** - * optional string stringValue = 6; + * string stringValue = 6; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -3476,7 +3938,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -3492,7 +3954,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder setStringValue( java.lang.String value) { @@ -3505,7 +3967,7 @@ public Builder setStringValue( return this; } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder clearStringValue() { @@ -3514,7 +3976,7 @@ public Builder clearStringValue() { return this; } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder setStringValueBytes( com.google.protobuf.ByteString value) { @@ -3529,16 +3991,16 @@ public Builder setStringValueBytes( } private net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest primitiveValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> primitiveValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public boolean hasPrimitiveValue() { return primitiveValueBuilder_ != null || primitiveValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getPrimitiveValue() { if (primitiveValueBuilder_ == null) { @@ -3548,7 +4010,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest getPrimi } } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public Builder setPrimitiveValue(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest value) { if (primitiveValueBuilder_ == null) { @@ -3564,7 +4026,7 @@ public Builder setPrimitiveValue(net.badata.protobuf.converter.proto.ConverterPr return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public Builder setPrimitiveValue( net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder builderForValue) { @@ -3578,7 +4040,7 @@ public Builder setPrimitiveValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public Builder mergePrimitiveValue(net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest value) { if (primitiveValueBuilder_ == null) { @@ -3596,7 +4058,7 @@ public Builder mergePrimitiveValue(net.badata.protobuf.converter.proto.Converter return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public Builder clearPrimitiveValue() { if (primitiveValueBuilder_ == null) { @@ -3610,7 +4072,7 @@ public Builder clearPrimitiveValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder getPrimitiveValueBuilder() { @@ -3618,7 +4080,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder return getPrimitiveValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder getPrimitiveValueOrBuilder() { if (primitiveValueBuilder_ != null) { @@ -3629,13 +4091,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder } } /** - * optional .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; + * .net.badata.protobuf.converter.proto.PrimitiveTest primitiveValue = 7; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> getPrimitiveValueFieldBuilder() { if (primitiveValueBuilder_ == null) { - primitiveValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + primitiveValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder>( getPrimitiveValue(), getParentForChildren(), @@ -3646,16 +4108,16 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder } private net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest fieldConversionValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder> fieldConversionValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public boolean hasFieldConversionValue() { return fieldConversionValueBuilder_ != null || fieldConversionValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest getFieldConversionValue() { if (fieldConversionValueBuilder_ == null) { @@ -3665,7 +4127,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest get } } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public Builder setFieldConversionValue(net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest value) { if (fieldConversionValueBuilder_ == null) { @@ -3681,7 +4143,7 @@ public Builder setFieldConversionValue(net.badata.protobuf.converter.proto.Conve return this; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public Builder setFieldConversionValue( net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Builder builderForValue) { @@ -3695,7 +4157,7 @@ public Builder setFieldConversionValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public Builder mergeFieldConversionValue(net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest value) { if (fieldConversionValueBuilder_ == null) { @@ -3713,7 +4175,7 @@ public Builder mergeFieldConversionValue(net.badata.protobuf.converter.proto.Con return this; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public Builder clearFieldConversionValue() { if (fieldConversionValueBuilder_ == null) { @@ -3727,7 +4189,7 @@ public Builder clearFieldConversionValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Builder getFieldConversionValueBuilder() { @@ -3735,7 +4197,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Bui return getFieldConversionValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder getFieldConversionValueOrBuilder() { if (fieldConversionValueBuilder_ != null) { @@ -3746,13 +4208,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBu } } /** - * optional .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; + * .net.badata.protobuf.converter.proto.FieldConverterTest fieldConversionValue = 8; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder> getFieldConversionValueFieldBuilder() { if (fieldConversionValueBuilder_ == null) { - fieldConversionValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + fieldConversionValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBuilder>( getFieldConversionValue(), getParentForChildren(), @@ -3763,16 +4225,16 @@ public net.badata.protobuf.converter.proto.ConverterProto.FieldConverterTestOrBu } private net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest nullDefaultValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder> nullDefaultValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public boolean hasNullDefaultValue() { return nullDefaultValueBuilder_ != null || nullDefaultValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest getNullDefaultValue() { if (nullDefaultValueBuilder_ == null) { @@ -3782,7 +4244,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest getNul } } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public Builder setNullDefaultValue(net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest value) { if (nullDefaultValueBuilder_ == null) { @@ -3798,7 +4260,7 @@ public Builder setNullDefaultValue(net.badata.protobuf.converter.proto.Converter return this; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public Builder setNullDefaultValue( net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builder builderForValue) { @@ -3812,7 +4274,7 @@ public Builder setNullDefaultValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public Builder mergeNullDefaultValue(net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest value) { if (nullDefaultValueBuilder_ == null) { @@ -3830,7 +4292,7 @@ public Builder mergeNullDefaultValue(net.badata.protobuf.converter.proto.Convert return this; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public Builder clearNullDefaultValue() { if (nullDefaultValueBuilder_ == null) { @@ -3844,7 +4306,7 @@ public Builder clearNullDefaultValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builder getNullDefaultValueBuilder() { @@ -3852,7 +4314,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builde return getNullDefaultValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder getNullDefaultValueOrBuilder() { if (nullDefaultValueBuilder_ != null) { @@ -3863,13 +4325,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuild } } /** - * optional .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; + * .net.badata.protobuf.converter.proto.NullDefaultTest nullDefaultValue = 9; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder> getNullDefaultValueFieldBuilder() { if (nullDefaultValueBuilder_ == null) { - nullDefaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + nullDefaultValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.NullDefaultTestOrBuilder>( getNullDefaultValue(), getParentForChildren(), @@ -3982,7 +4444,7 @@ private void ensureComplexListValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> complexListValueBuilder_; /** @@ -4198,11 +4660,11 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder getComplexListValueBuilderList() { return getComplexListValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> getComplexListValueFieldBuilder() { if (complexListValueBuilder_ == null) { - complexListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + complexListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder>( complexListValue_, ((bitField0_ & 0x00000400) == 0x00000400), @@ -4222,7 +4684,7 @@ private void ensureComplexSetValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> complexSetValueBuilder_; /** @@ -4438,11 +4900,11 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder getComplexSetValueBuilderList() { return getComplexSetValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> getComplexSetValueFieldBuilder() { if (complexSetValueBuilder_ == null) { - complexSetValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + complexSetValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder>( complexSetValue_, ((bitField0_ & 0x00000800) == 0x00000800), @@ -4462,7 +4924,7 @@ private void ensureComplexNullableCollectionValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> complexNullableCollectionValueBuilder_; /** @@ -4678,11 +5140,11 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder getComplexNullableCollectionValueBuilderList() { return getComplexNullableCollectionValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder> getComplexNullableCollectionValueFieldBuilder() { if (complexNullableCollectionValueBuilder_ == null) { - complexNullableCollectionValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + complexNullableCollectionValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTestOrBuilder>( complexNullableCollectionValue_, ((bitField0_ & 0x00001000) == 0x00001000), @@ -4695,13 +5157,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.PrimitiveTest.Builder private com.google.protobuf.ByteString bytesValue_ = com.google.protobuf.ByteString.EMPTY; /** - * optional bytes bytesValue = 14; + * bytes bytesValue = 14; */ public com.google.protobuf.ByteString getBytesValue() { return bytesValue_; } /** - * optional bytes bytesValue = 14; + * bytes bytesValue = 14; */ public Builder setBytesValue(com.google.protobuf.ByteString value) { if (value == null) { @@ -4713,7 +5175,7 @@ public Builder setBytesValue(com.google.protobuf.ByteString value) { return this; } /** - * optional bytes bytesValue = 14; + * bytes bytesValue = 14; */ public Builder clearBytesValue() { @@ -4723,16 +5185,16 @@ public Builder clearBytesValue() { } private net.badata.protobuf.converter.proto.ConverterProto.ConverterTest recursiveValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.ConverterTest, net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder> recursiveValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public boolean hasRecursiveValue() { return recursiveValueBuilder_ != null || recursiveValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getRecursiveValue() { if (recursiveValueBuilder_ == null) { @@ -4742,7 +5204,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getRecur } } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public Builder setRecursiveValue(net.badata.protobuf.converter.proto.ConverterProto.ConverterTest value) { if (recursiveValueBuilder_ == null) { @@ -4758,7 +5220,7 @@ public Builder setRecursiveValue(net.badata.protobuf.converter.proto.ConverterPr return this; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public Builder setRecursiveValue( net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder builderForValue) { @@ -4772,7 +5234,7 @@ public Builder setRecursiveValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public Builder mergeRecursiveValue(net.badata.protobuf.converter.proto.ConverterProto.ConverterTest value) { if (recursiveValueBuilder_ == null) { @@ -4790,7 +5252,7 @@ public Builder mergeRecursiveValue(net.badata.protobuf.converter.proto.Converter return this; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public Builder clearRecursiveValue() { if (recursiveValueBuilder_ == null) { @@ -4804,7 +5266,7 @@ public Builder clearRecursiveValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder getRecursiveValueBuilder() { @@ -4812,7 +5274,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder return getRecursiveValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder getRecursiveValueOrBuilder() { if (recursiveValueBuilder_ != null) { @@ -4823,13 +5285,13 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder } } /** - * optional .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; + * .net.badata.protobuf.converter.proto.ConverterTest recursiveValue = 15; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.ConverterTest, net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder> getRecursiveValueFieldBuilder() { if (recursiveValueBuilder_ == null) { - recursiveValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + recursiveValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.ConverterProto.ConverterTest, net.badata.protobuf.converter.proto.ConverterProto.ConverterTest.Builder, net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder>( getRecursiveValue(), getParentForChildren(), @@ -4840,12 +5302,12 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTestOrBuilder } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -4868,16 +5330,7 @@ public ConverterTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ConverterTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new ConverterTest(input, extensionRegistry); } }; @@ -4896,32 +5349,32 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getDefau } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_ConverterTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_ConverterTest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { @@ -4934,7 +5387,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getDefau "stringSetValue\030\003 \003(\t\"\224\001\n\017NullDefaultTest" + "\022\022\n\nnullString\030\001 \001(\t\022\036\n\026customInspection" + "String\030\002 \001(\t\022M\n\021defaultPrimitives\030\003 \001(\0132" + - "2.net.badata.protobuf.converter.proto.Pr", + "2.net.badata.protobuf.converter.proto.Pr" + "imitiveTest\"\353\005\n\rConverterTest\022\020\n\010intValu" + "e\030\001 \001(\005\022\021\n\tlongValue\030\002 \001(\003\022\022\n\nfloatValue" + "\030\003 \001(\002\022\023\n\013doubleValue\030\004 \001(\001\022\024\n\014booleanVa" + @@ -4944,7 +5397,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getDefau "rsionValue\030\010 \001(\01327.net.badata.protobuf.c" + "onverter.proto.FieldConverterTest\022N\n\020nul" + "lDefaultValue\030\t \001(\01324.net.badata.protobu" + - "f.converter.proto.NullDefaultTest\022\027\n\017str", + "f.converter.proto.NullDefaultTest\022\027\n\017str" + "ingListValue\030\n \003(\t\022L\n\020complexListValue\030\013" + " \003(\01322.net.badata.protobuf.converter.pro" + "to.PrimitiveTest\022K\n\017complexSetValue\030\014 \003(" + @@ -4954,7 +5407,7 @@ public net.badata.protobuf.converter.proto.ConverterProto.ConverterTest getDefau "erter.proto.PrimitiveTest\022\022\n\nbytesValue\030" + "\016 \001(\014\022J\n\016recursiveValue\030\017 \001(\01322.net.bada" + "ta.protobuf.converter.proto.ConverterTes" + - "tB5\n#net.badata.protobuf.converter.proto", + "tB5\n#net.badata.protobuf.converter.proto" + "B\016ConverterProtob\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = @@ -4972,25 +5425,25 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_PrimitiveTest_descriptor, new java.lang.String[] { "IntValue", "LongValue", "FloatValue", "DoubleValue", "BooleanValue", }); internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_FieldConverterTest_descriptor, new java.lang.String[] { "EnumString", "DateLong", "StringSetValue", }); internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_NullDefaultTest_descriptor, new java.lang.String[] { "NullString", "CustomInspectionString", "DefaultPrimitives", }); internal_static_net_badata_protobuf_converter_proto_ConverterTest_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_net_badata_protobuf_converter_proto_ConverterTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_ConverterTest_descriptor, new java.lang.String[] { "IntValue", "LongValue", "FloatValue", "DoubleValue", "BooleanValue", "StringValue", "PrimitiveValue", "FieldConversionValue", "NullDefaultValue", "StringListValue", "ComplexListValue", "ComplexSetValue", "ComplexNullableCollectionValue", "BytesValue", "RecursiveValue", }); } diff --git a/src/test/java/net/badata/protobuf/converter/proto/DomainInheritanceProto.java b/src/test/java/net/badata/protobuf/converter/proto/DomainInheritanceProto.java index 3b4b963..e9d6513 100644 --- a/src/test/java/net/badata/protobuf/converter/proto/DomainInheritanceProto.java +++ b/src/test/java/net/badata/protobuf/converter/proto/DomainInheritanceProto.java @@ -5,30 +5,36 @@ public final class DomainInheritanceProto { private DomainInheritanceProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } public interface TestOrBuilder extends // @@protoc_insertion_point(interface_extends:net.badata.protobuf.converter.proto.Test) com.google.protobuf.MessageOrBuilder { /** - * optional int32 inheritedInt = 1; + * int32 inheritedInt = 1; */ int getInheritedInt(); /** - * optional float inheritedFloat = 2; + * float inheritedFloat = 2; */ float getInheritedFloat(); /** - * optional int64 ownLong = 3; + * int64 ownLong = 3; */ long getOwnLong(); /** - * optional double ownDouble = 4; + * double ownDouble = 4; */ double getOwnDouble(); } @@ -36,11 +42,12 @@ public interface TestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.Test} */ public static final class Test extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.Test) TestOrBuilder { + private static final long serialVersionUID = 0L; // Use Test.newBuilder() to construct. - private Test(com.google.protobuf.GeneratedMessage.Builder builder) { + private Test(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Test() { @@ -53,13 +60,19 @@ private Test() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private Test( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -69,7 +82,8 @@ private Test( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -97,12 +111,12 @@ private Test( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -111,7 +125,7 @@ private Test( return net.badata.protobuf.converter.proto.DomainInheritanceProto.internal_static_net_badata_protobuf_converter_proto_Test_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.DomainInheritanceProto.internal_static_net_badata_protobuf_converter_proto_Test_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -121,7 +135,7 @@ private Test( public static final int INHERITEDINT_FIELD_NUMBER = 1; private int inheritedInt_; /** - * optional int32 inheritedInt = 1; + * int32 inheritedInt = 1; */ public int getInheritedInt() { return inheritedInt_; @@ -130,7 +144,7 @@ public int getInheritedInt() { public static final int INHERITEDFLOAT_FIELD_NUMBER = 2; private float inheritedFloat_; /** - * optional float inheritedFloat = 2; + * float inheritedFloat = 2; */ public float getInheritedFloat() { return inheritedFloat_; @@ -139,7 +153,7 @@ public float getInheritedFloat() { public static final int OWNLONG_FIELD_NUMBER = 3; private long ownLong_; /** - * optional int64 ownLong = 3; + * int64 ownLong = 3; */ public long getOwnLong() { return ownLong_; @@ -148,7 +162,7 @@ public long getOwnLong() { public static final int OWNDOUBLE_FIELD_NUMBER = 4; private double ownDouble_; /** - * optional double ownDouble = 4; + * double ownDouble = 4; */ public double getOwnDouble() { return ownDouble_; @@ -178,6 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (ownDouble_ != 0D) { output.writeDouble(4, ownDouble_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -201,11 +216,72 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, ownDouble_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.DomainInheritanceProto.Test)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.DomainInheritanceProto.Test other = (net.badata.protobuf.converter.proto.DomainInheritanceProto.Test) obj; + + boolean result = true; + result = result && (getInheritedInt() + == other.getInheritedInt()); + result = result && ( + java.lang.Float.floatToIntBits(getInheritedFloat()) + == java.lang.Float.floatToIntBits( + other.getInheritedFloat())); + result = result && (getOwnLong() + == other.getOwnLong()); + result = result && ( + java.lang.Double.doubleToLongBits(getOwnDouble()) + == java.lang.Double.doubleToLongBits( + other.getOwnDouble())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INHERITEDINT_FIELD_NUMBER; + hash = (53 * hash) + getInheritedInt(); + hash = (37 * hash) + INHERITEDFLOAT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getInheritedFloat()); + hash = (37 * hash) + OWNLONG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOwnLong()); + hash = (37 * hash) + OWNDOUBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getOwnDouble())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -229,34 +305,40 @@ public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test pa } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.DomainInheritanceProto.Test parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -273,7 +355,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -281,7 +363,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.Test} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.Test) net.badata.protobuf.converter.proto.DomainInheritanceProto.TestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -289,7 +371,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.DomainInheritanceProto.internal_static_net_badata_protobuf_converter_proto_Test_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.DomainInheritanceProto.internal_static_net_badata_protobuf_converter_proto_Test_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -302,12 +384,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -350,6 +433,32 @@ public net.badata.protobuf.converter.proto.DomainInheritanceProto.Test buildPart return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.DomainInheritanceProto.Test) { return mergeFrom((net.badata.protobuf.converter.proto.DomainInheritanceProto.Test)other); @@ -373,6 +482,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.DomainInheritancePr if (other.getOwnDouble() != 0D) { setOwnDouble(other.getOwnDouble()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -390,7 +500,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.DomainInheritanceProto.Test) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -401,13 +511,13 @@ public Builder mergeFrom( private int inheritedInt_ ; /** - * optional int32 inheritedInt = 1; + * int32 inheritedInt = 1; */ public int getInheritedInt() { return inheritedInt_; } /** - * optional int32 inheritedInt = 1; + * int32 inheritedInt = 1; */ public Builder setInheritedInt(int value) { @@ -416,7 +526,7 @@ public Builder setInheritedInt(int value) { return this; } /** - * optional int32 inheritedInt = 1; + * int32 inheritedInt = 1; */ public Builder clearInheritedInt() { @@ -427,13 +537,13 @@ public Builder clearInheritedInt() { private float inheritedFloat_ ; /** - * optional float inheritedFloat = 2; + * float inheritedFloat = 2; */ public float getInheritedFloat() { return inheritedFloat_; } /** - * optional float inheritedFloat = 2; + * float inheritedFloat = 2; */ public Builder setInheritedFloat(float value) { @@ -442,7 +552,7 @@ public Builder setInheritedFloat(float value) { return this; } /** - * optional float inheritedFloat = 2; + * float inheritedFloat = 2; */ public Builder clearInheritedFloat() { @@ -453,13 +563,13 @@ public Builder clearInheritedFloat() { private long ownLong_ ; /** - * optional int64 ownLong = 3; + * int64 ownLong = 3; */ public long getOwnLong() { return ownLong_; } /** - * optional int64 ownLong = 3; + * int64 ownLong = 3; */ public Builder setOwnLong(long value) { @@ -468,7 +578,7 @@ public Builder setOwnLong(long value) { return this; } /** - * optional int64 ownLong = 3; + * int64 ownLong = 3; */ public Builder clearOwnLong() { @@ -479,13 +589,13 @@ public Builder clearOwnLong() { private double ownDouble_ ; /** - * optional double ownDouble = 4; + * double ownDouble = 4; */ public double getOwnDouble() { return ownDouble_; } /** - * optional double ownDouble = 4; + * double ownDouble = 4; */ public Builder setOwnDouble(double value) { @@ -494,7 +604,7 @@ public Builder setOwnDouble(double value) { return this; } /** - * optional double ownDouble = 4; + * double ownDouble = 4; */ public Builder clearOwnDouble() { @@ -504,12 +614,12 @@ public Builder clearOwnDouble() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -532,16 +642,7 @@ public Test parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new Test(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new Test(input, extensionRegistry); } }; @@ -560,17 +661,17 @@ public net.badata.protobuf.converter.proto.DomainInheritanceProto.Test getDefaul } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_Test_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_Test_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { @@ -596,7 +697,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_net_badata_protobuf_converter_proto_Test_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_net_badata_protobuf_converter_proto_Test_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_Test_descriptor, new java.lang.String[] { "InheritedInt", "InheritedFloat", "OwnLong", "OwnDouble", }); } diff --git a/src/test/java/net/badata/protobuf/converter/proto/MappingProto.java b/src/test/java/net/badata/protobuf/converter/proto/MappingProto.java index 74b4672..f3c16b6 100644 --- a/src/test/java/net/badata/protobuf/converter/proto/MappingProto.java +++ b/src/test/java/net/badata/protobuf/converter/proto/MappingProto.java @@ -5,19 +5,25 @@ public final class MappingProto { private MappingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } public interface NestedTestOrBuilder extends // @@protoc_insertion_point(interface_extends:net.badata.protobuf.converter.proto.NestedTest) com.google.protobuf.MessageOrBuilder { /** - * optional string stringValue = 1; + * string stringValue = 1; */ java.lang.String getStringValue(); /** - * optional string stringValue = 1; + * string stringValue = 1; */ com.google.protobuf.ByteString getStringValueBytes(); @@ -26,11 +32,12 @@ public interface NestedTestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.NestedTest} */ public static final class NestedTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.NestedTest) NestedTestOrBuilder { + private static final long serialVersionUID = 0L; // Use NestedTest.newBuilder() to construct. - private NestedTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private NestedTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private NestedTest() { @@ -40,13 +47,19 @@ private NestedTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private NestedTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -56,13 +69,14 @@ private NestedTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); stringValue_ = s; break; @@ -70,12 +84,12 @@ private NestedTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -84,7 +98,7 @@ private NestedTest( return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_NestedTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_NestedTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -94,7 +108,7 @@ private NestedTest( public static final int STRINGVALUE_FIELD_NUMBER = 1; private volatile java.lang.Object stringValue_; /** - * optional string stringValue = 1; + * string stringValue = 1; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -109,7 +123,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 1; + * string stringValue = 1; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -138,8 +152,9 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getStringValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, stringValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringValue_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -148,13 +163,55 @@ public int getSerializedSize() { size = 0; if (!getStringValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, stringValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, stringValue_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.MappingProto.NestedTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.MappingProto.NestedTest other = (net.badata.protobuf.converter.proto.MappingProto.NestedTest) obj; + + boolean result = true; + result = result && getStringValue() + .equals(other.getStringValue()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + STRINGVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -178,34 +235,40 @@ public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseF } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.NestedTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -222,7 +285,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -230,7 +293,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.NestedTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.NestedTest) net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -238,7 +301,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_NestedTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_NestedTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -251,12 +314,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -290,6 +354,32 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTest buildPartial( return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.MappingProto.NestedTest) { return mergeFrom((net.badata.protobuf.converter.proto.MappingProto.NestedTest)other); @@ -305,6 +395,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.MappingProto.Nested stringValue_ = other.stringValue_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -322,7 +413,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.MappingProto.NestedTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -333,7 +424,7 @@ public Builder mergeFrom( private java.lang.Object stringValue_ = ""; /** - * optional string stringValue = 1; + * string stringValue = 1; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -348,7 +439,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 1; + * string stringValue = 1; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -364,7 +455,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 1; + * string stringValue = 1; */ public Builder setStringValue( java.lang.String value) { @@ -377,7 +468,7 @@ public Builder setStringValue( return this; } /** - * optional string stringValue = 1; + * string stringValue = 1; */ public Builder clearStringValue() { @@ -386,7 +477,7 @@ public Builder clearStringValue() { return this; } /** - * optional string stringValue = 1; + * string stringValue = 1; */ public Builder setStringValueBytes( com.google.protobuf.ByteString value) { @@ -401,12 +492,12 @@ public Builder setStringValueBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -429,16 +520,7 @@ public NestedTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new NestedTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new NestedTest(input, extensionRegistry); } }; @@ -462,57 +544,57 @@ public interface MappingTestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ int getIntValue(); /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ long getLongValue(); /** - * optional float floatValue = 3; + * float floatValue = 3; */ float getFloatValue(); /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ double getDoubleValue(); /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ boolean getBooleanValue(); /** - * optional string stringValue = 6; + * string stringValue = 6; */ java.lang.String getStringValue(); /** - * optional string stringValue = 6; + * string stringValue = 6; */ com.google.protobuf.ByteString getStringValueBytes(); /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ boolean hasNestedValue(); /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ net.badata.protobuf.converter.proto.MappingProto.NestedTest getNestedValue(); /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder getNestedValueOrBuilder(); /** * repeated string stringListValue = 8; */ - com.google.protobuf.ProtocolStringList + java.util.List getStringListValueList(); /** * repeated string stringListValue = 8; @@ -556,11 +638,12 @@ net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder getNestedLi * Protobuf type {@code net.badata.protobuf.converter.proto.MappingTest} */ public static final class MappingTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.MappingTest) MappingTestOrBuilder { + private static final long serialVersionUID = 0L; // Use MappingTest.newBuilder() to construct. - private MappingTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private MappingTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MappingTest() { @@ -577,13 +660,19 @@ private MappingTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MappingTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -593,7 +682,8 @@ private MappingTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -624,7 +714,7 @@ private MappingTest( break; } case 50: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); stringValue_ = s; break; @@ -643,7 +733,7 @@ private MappingTest( break; } case 66: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { stringListValue_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000080; @@ -656,17 +746,17 @@ private MappingTest( nestedListValue_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } - nestedListValue_.add(input.readMessage(net.badata.protobuf.converter.proto.MappingProto.NestedTest.parser(), extensionRegistry)); + nestedListValue_.add( + input.readMessage(net.badata.protobuf.converter.proto.MappingProto.NestedTest.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { stringListValue_ = stringListValue_.getUnmodifiableView(); @@ -674,6 +764,7 @@ private MappingTest( if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { nestedListValue_ = java.util.Collections.unmodifiableList(nestedListValue_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -682,7 +773,7 @@ private MappingTest( return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_MappingTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_MappingTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -693,7 +784,7 @@ private MappingTest( public static final int INTVALUE_FIELD_NUMBER = 1; private int intValue_; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; @@ -702,7 +793,7 @@ public int getIntValue() { public static final int LONGVALUE_FIELD_NUMBER = 2; private long longValue_; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; @@ -711,7 +802,7 @@ public long getLongValue() { public static final int FLOATVALUE_FIELD_NUMBER = 3; private float floatValue_; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; @@ -720,7 +811,7 @@ public float getFloatValue() { public static final int DOUBLEVALUE_FIELD_NUMBER = 4; private double doubleValue_; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; @@ -729,7 +820,7 @@ public double getDoubleValue() { public static final int BOOLEANVALUE_FIELD_NUMBER = 5; private boolean booleanValue_; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; @@ -738,7 +829,7 @@ public boolean getBooleanValue() { public static final int STRINGVALUE_FIELD_NUMBER = 6; private volatile java.lang.Object stringValue_; /** - * optional string stringValue = 6; + * string stringValue = 6; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -753,7 +844,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -772,19 +863,19 @@ public java.lang.String getStringValue() { public static final int NESTEDVALUE_FIELD_NUMBER = 7; private net.badata.protobuf.converter.proto.MappingProto.NestedTest nestedValue_; /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public boolean hasNestedValue() { return nestedValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public net.badata.protobuf.converter.proto.MappingProto.NestedTest getNestedValue() { return nestedValue_ == null ? net.badata.protobuf.converter.proto.MappingProto.NestedTest.getDefaultInstance() : nestedValue_; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder getNestedValueOrBuilder() { return getNestedValue(); @@ -882,17 +973,18 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeBool(5, booleanValue_); } if (!getStringValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 6, stringValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, stringValue_); } if (nestedValue_ != null) { output.writeMessage(7, getNestedValue()); } for (int i = 0; i < stringListValue_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 8, stringListValue_.getRaw(i)); + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, stringListValue_.getRaw(i)); } for (int i = 0; i < nestedListValue_.size(); i++) { output.writeMessage(9, nestedListValue_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -921,7 +1013,7 @@ public int getSerializedSize() { .computeBoolSize(5, booleanValue_); } if (!getStringValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(6, stringValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, stringValue_); } if (nestedValue_ != null) { size += com.google.protobuf.CodedOutputStream @@ -939,11 +1031,102 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, nestedListValue_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.MappingProto.MappingTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.MappingProto.MappingTest other = (net.badata.protobuf.converter.proto.MappingProto.MappingTest) obj; + + boolean result = true; + result = result && (getIntValue() + == other.getIntValue()); + result = result && (getLongValue() + == other.getLongValue()); + result = result && ( + java.lang.Float.floatToIntBits(getFloatValue()) + == java.lang.Float.floatToIntBits( + other.getFloatValue())); + result = result && ( + java.lang.Double.doubleToLongBits(getDoubleValue()) + == java.lang.Double.doubleToLongBits( + other.getDoubleValue())); + result = result && (getBooleanValue() + == other.getBooleanValue()); + result = result && getStringValue() + .equals(other.getStringValue()); + result = result && (hasNestedValue() == other.hasNestedValue()); + if (hasNestedValue()) { + result = result && getNestedValue() + .equals(other.getNestedValue()); + } + result = result && getStringListValueList() + .equals(other.getStringListValueList()); + result = result && getNestedListValueList() + .equals(other.getNestedListValueList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntValue(); + hash = (37 * hash) + LONGVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongValue()); + hash = (37 * hash) + FLOATVALUE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getFloatValue()); + hash = (37 * hash) + DOUBLEVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + hash = (37 * hash) + BOOLEANVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBooleanValue()); + hash = (37 * hash) + STRINGVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + if (hasNestedValue()) { + hash = (37 * hash) + NESTEDVALUE_FIELD_NUMBER; + hash = (53 * hash) + getNestedValue().hashCode(); + } + if (getStringListValueCount() > 0) { + hash = (37 * hash) + STRINGLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringListValueList().hashCode(); + } + if (getNestedListValueCount() > 0) { + hash = (37 * hash) + NESTEDLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getNestedListValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -967,34 +1150,40 @@ public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parse } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MappingProto.MappingTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -1011,7 +1200,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1019,7 +1208,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.MappingTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.MappingTest) net.badata.protobuf.converter.proto.MappingProto.MappingTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1027,7 +1216,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_MappingTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MappingProto.internal_static_net_badata_protobuf_converter_proto_MappingTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1040,12 +1229,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { getNestedListValueFieldBuilder(); } } @@ -1131,6 +1321,32 @@ public net.badata.protobuf.converter.proto.MappingProto.MappingTest buildPartial return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.MappingProto.MappingTest) { return mergeFrom((net.badata.protobuf.converter.proto.MappingProto.MappingTest)other); @@ -1193,13 +1409,14 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.MappingProto.Mappin nestedListValue_ = other.nestedListValue_; bitField0_ = (bitField0_ & ~0x00000100); nestedListValueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getNestedListValueFieldBuilder() : null; } else { nestedListValueBuilder_.addAllMessages(other.nestedListValue_); } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1217,7 +1434,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.MappingProto.MappingTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -1229,13 +1446,13 @@ public Builder mergeFrom( private int intValue_ ; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder setIntValue(int value) { @@ -1244,7 +1461,7 @@ public Builder setIntValue(int value) { return this; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder clearIntValue() { @@ -1255,13 +1472,13 @@ public Builder clearIntValue() { private long longValue_ ; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder setLongValue(long value) { @@ -1270,7 +1487,7 @@ public Builder setLongValue(long value) { return this; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder clearLongValue() { @@ -1281,13 +1498,13 @@ public Builder clearLongValue() { private float floatValue_ ; /** - * optional float floatValue = 3; + * float floatValue = 3; */ public float getFloatValue() { return floatValue_; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder setFloatValue(float value) { @@ -1296,7 +1513,7 @@ public Builder setFloatValue(float value) { return this; } /** - * optional float floatValue = 3; + * float floatValue = 3; */ public Builder clearFloatValue() { @@ -1307,13 +1524,13 @@ public Builder clearFloatValue() { private double doubleValue_ ; /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public double getDoubleValue() { return doubleValue_; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder setDoubleValue(double value) { @@ -1322,7 +1539,7 @@ public Builder setDoubleValue(double value) { return this; } /** - * optional double doubleValue = 4; + * double doubleValue = 4; */ public Builder clearDoubleValue() { @@ -1333,13 +1550,13 @@ public Builder clearDoubleValue() { private boolean booleanValue_ ; /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public boolean getBooleanValue() { return booleanValue_; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder setBooleanValue(boolean value) { @@ -1348,7 +1565,7 @@ public Builder setBooleanValue(boolean value) { return this; } /** - * optional bool booleanValue = 5; + * bool booleanValue = 5; */ public Builder clearBooleanValue() { @@ -1359,7 +1576,7 @@ public Builder clearBooleanValue() { private java.lang.Object stringValue_ = ""; /** - * optional string stringValue = 6; + * string stringValue = 6; */ public java.lang.String getStringValue() { java.lang.Object ref = stringValue_; @@ -1374,7 +1591,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public com.google.protobuf.ByteString getStringValueBytes() { @@ -1390,7 +1607,7 @@ public java.lang.String getStringValue() { } } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder setStringValue( java.lang.String value) { @@ -1403,7 +1620,7 @@ public Builder setStringValue( return this; } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder clearStringValue() { @@ -1412,7 +1629,7 @@ public Builder clearStringValue() { return this; } /** - * optional string stringValue = 6; + * string stringValue = 6; */ public Builder setStringValueBytes( com.google.protobuf.ByteString value) { @@ -1427,16 +1644,16 @@ public Builder setStringValueBytes( } private net.badata.protobuf.converter.proto.MappingProto.NestedTest nestedValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder> nestedValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public boolean hasNestedValue() { return nestedValueBuilder_ != null || nestedValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public net.badata.protobuf.converter.proto.MappingProto.NestedTest getNestedValue() { if (nestedValueBuilder_ == null) { @@ -1446,7 +1663,7 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTest getNestedValu } } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public Builder setNestedValue(net.badata.protobuf.converter.proto.MappingProto.NestedTest value) { if (nestedValueBuilder_ == null) { @@ -1462,7 +1679,7 @@ public Builder setNestedValue(net.badata.protobuf.converter.proto.MappingProto.N return this; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public Builder setNestedValue( net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder builderForValue) { @@ -1476,7 +1693,7 @@ public Builder setNestedValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public Builder mergeNestedValue(net.badata.protobuf.converter.proto.MappingProto.NestedTest value) { if (nestedValueBuilder_ == null) { @@ -1494,7 +1711,7 @@ public Builder mergeNestedValue(net.badata.protobuf.converter.proto.MappingProto return this; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public Builder clearNestedValue() { if (nestedValueBuilder_ == null) { @@ -1508,7 +1725,7 @@ public Builder clearNestedValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder getNestedValueBuilder() { @@ -1516,7 +1733,7 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder getNe return getNestedValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ public net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder getNestedValueOrBuilder() { if (nestedValueBuilder_ != null) { @@ -1527,13 +1744,13 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder getN } } /** - * optional .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; + * .net.badata.protobuf.converter.proto.NestedTest nestedValue = 7; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder> getNestedValueFieldBuilder() { if (nestedValueBuilder_ == null) { - nestedValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + nestedValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder>( getNestedValue(), getParentForChildren(), @@ -1646,7 +1863,7 @@ private void ensureNestedListValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder> nestedListValueBuilder_; /** @@ -1862,11 +2079,11 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder addNe getNestedListValueBuilderList() { return getNestedListValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder> getNestedListValueFieldBuilder() { if (nestedListValueBuilder_ == null) { - nestedListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + nestedListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MappingProto.NestedTest, net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder, net.badata.protobuf.converter.proto.MappingProto.NestedTestOrBuilder>( nestedListValue_, ((bitField0_ & 0x00000100) == 0x00000100), @@ -1878,12 +2095,12 @@ public net.badata.protobuf.converter.proto.MappingProto.NestedTest.Builder addNe } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -1906,16 +2123,7 @@ public MappingTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MappingTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new MappingTest(input, extensionRegistry); } }; @@ -1934,22 +2142,22 @@ public net.badata.protobuf.converter.proto.MappingProto.MappingTest getDefaultIn } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_NestedTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_NestedTest_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_MappingTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_MappingTest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { @@ -1962,7 +2170,7 @@ public net.badata.protobuf.converter.proto.MappingProto.MappingTest getDefaultIn "alue\030\007 \001(\0132/.net.badata.protobuf.convert" + "er.proto.NestedTest\022\027\n\017stringListValue\030\010" + " \003(\t\022H\n\017nestedListValue\030\t \003(\0132/.net.bada" + - "ta.protobuf.converter.proto.NestedTestB3", + "ta.protobuf.converter.proto.NestedTestB3" + "\n#net.badata.protobuf.converter.protoB\014M" + "appingProtob\006proto3" }; @@ -1981,13 +2189,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_net_badata_protobuf_converter_proto_NestedTest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_net_badata_protobuf_converter_proto_NestedTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_NestedTest_descriptor, new java.lang.String[] { "StringValue", }); internal_static_net_badata_protobuf_converter_proto_MappingTest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_net_badata_protobuf_converter_proto_MappingTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_MappingTest_descriptor, new java.lang.String[] { "IntValue", "LongValue", "FloatValue", "DoubleValue", "BooleanValue", "StringValue", "NestedValue", "StringListValue", "NestedListValue", }); } diff --git a/src/test/java/net/badata/protobuf/converter/proto/MultiMappingProto.java b/src/test/java/net/badata/protobuf/converter/proto/MultiMappingProto.java index 50ecc21..88a6c43 100644 --- a/src/test/java/net/badata/protobuf/converter/proto/MultiMappingProto.java +++ b/src/test/java/net/badata/protobuf/converter/proto/MultiMappingProto.java @@ -5,20 +5,26 @@ public final class MultiMappingProto { private MultiMappingProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } public interface MultiMappingFirstOrBuilder extends // @@protoc_insertion_point(interface_extends:net.badata.protobuf.converter.proto.MultiMappingFirst) com.google.protobuf.MessageOrBuilder { /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ int getIntValue(); /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ long getLongValue(); } @@ -26,11 +32,12 @@ public interface MultiMappingFirstOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingFirst} */ public static final class MultiMappingFirst extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.MultiMappingFirst) MultiMappingFirstOrBuilder { + private static final long serialVersionUID = 0L; // Use MultiMappingFirst.newBuilder() to construct. - private MultiMappingFirst(com.google.protobuf.GeneratedMessage.Builder builder) { + private MultiMappingFirst(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MultiMappingFirst() { @@ -41,13 +48,19 @@ private MultiMappingFirst() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MultiMappingFirst( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -57,7 +70,8 @@ private MultiMappingFirst( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,12 +89,12 @@ private MultiMappingFirst( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -89,7 +103,7 @@ private MultiMappingFirst( return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -99,7 +113,7 @@ private MultiMappingFirst( public static final int INTVALUE_FIELD_NUMBER = 1; private int intValue_; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; @@ -108,7 +122,7 @@ public int getIntValue() { public static final int LONGVALUE_FIELD_NUMBER = 2; private long longValue_; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; @@ -132,6 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (longValue_ != 0L) { output.writeInt64(2, longValue_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -147,11 +162,58 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, longValue_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst other = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst) obj; + + boolean result = true; + result = result && (getIntValue() + == other.getIntValue()); + result = result && (getLongValue() + == other.getLongValue()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntValue(); + hash = (37 * hash) + LONGVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongValue()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -175,34 +237,40 @@ public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMapping } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -219,7 +287,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -227,7 +295,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingFirst} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.MultiMappingFirst) net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -235,7 +303,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -248,12 +316,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -290,6 +359,32 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst b return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst) { return mergeFrom((net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst)other); @@ -307,6 +402,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.MultiMappingProto.M if (other.getLongValue() != 0L) { setLongValue(other.getLongValue()); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -324,7 +420,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -335,13 +431,13 @@ public Builder mergeFrom( private int intValue_ ; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder setIntValue(int value) { @@ -350,7 +446,7 @@ public Builder setIntValue(int value) { return this; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder clearIntValue() { @@ -361,13 +457,13 @@ public Builder clearIntValue() { private long longValue_ ; /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public long getLongValue() { return longValue_; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder setLongValue(long value) { @@ -376,7 +472,7 @@ public Builder setLongValue(long value) { return this; } /** - * optional int64 longValue = 2; + * int64 longValue = 2; */ public Builder clearLongValue() { @@ -386,12 +482,12 @@ public Builder clearLongValue() { } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -414,16 +510,7 @@ public MultiMappingFirst parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MultiMappingFirst(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new MultiMappingFirst(input, extensionRegistry); } }; @@ -447,21 +534,21 @@ public interface MultiMappingSecondOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ int getIntValue(); /** - * optional int64 longValueChanged = 2; + * int64 longValueChanged = 2; */ long getLongValueChanged(); /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ java.lang.String getUnusableValue(); /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ com.google.protobuf.ByteString getUnusableValueBytes(); @@ -470,11 +557,12 @@ public interface MultiMappingSecondOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingSecond} */ public static final class MultiMappingSecond extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.MultiMappingSecond) MultiMappingSecondOrBuilder { + private static final long serialVersionUID = 0L; // Use MultiMappingSecond.newBuilder() to construct. - private MultiMappingSecond(com.google.protobuf.GeneratedMessage.Builder builder) { + private MultiMappingSecond(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MultiMappingSecond() { @@ -486,13 +574,19 @@ private MultiMappingSecond() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MultiMappingSecond( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -502,7 +596,8 @@ private MultiMappingSecond( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -518,7 +613,7 @@ private MultiMappingSecond( break; } case 26: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); unusableValue_ = s; break; @@ -526,12 +621,12 @@ private MultiMappingSecond( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -540,7 +635,7 @@ private MultiMappingSecond( return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -550,7 +645,7 @@ private MultiMappingSecond( public static final int INTVALUE_FIELD_NUMBER = 1; private int intValue_; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; @@ -559,7 +654,7 @@ public int getIntValue() { public static final int LONGVALUECHANGED_FIELD_NUMBER = 2; private long longValueChanged_; /** - * optional int64 longValueChanged = 2; + * int64 longValueChanged = 2; */ public long getLongValueChanged() { return longValueChanged_; @@ -568,7 +663,7 @@ public long getLongValueChanged() { public static final int UNUSABLEVALUE_FIELD_NUMBER = 3; private volatile java.lang.Object unusableValue_; /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public java.lang.String getUnusableValue() { java.lang.Object ref = unusableValue_; @@ -583,7 +678,7 @@ public java.lang.String getUnusableValue() { } } /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public com.google.protobuf.ByteString getUnusableValueBytes() { @@ -618,8 +713,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeInt64(2, longValueChanged_); } if (!getUnusableValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, unusableValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unusableValue_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -636,13 +732,64 @@ public int getSerializedSize() { .computeInt64Size(2, longValueChanged_); } if (!getUnusableValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, unusableValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, unusableValue_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond other = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond) obj; + + boolean result = true; + result = result && (getIntValue() + == other.getIntValue()); + result = result && (getLongValueChanged() + == other.getLongValueChanged()); + result = result && getUnusableValue() + .equals(other.getUnusableValue()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getIntValue(); + hash = (37 * hash) + LONGVALUECHANGED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongValueChanged()); + hash = (37 * hash) + UNUSABLEVALUE_FIELD_NUMBER; + hash = (53 * hash) + getUnusableValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -666,34 +813,40 @@ public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMapping } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -710,7 +863,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -718,7 +871,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingSecond} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.MultiMappingSecond) net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecondOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -726,7 +879,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -739,12 +892,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -784,6 +938,32 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond) { return mergeFrom((net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond)other); @@ -805,6 +985,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.MultiMappingProto.M unusableValue_ = other.unusableValue_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -822,7 +1003,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -833,13 +1014,13 @@ public Builder mergeFrom( private int intValue_ ; /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public int getIntValue() { return intValue_; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder setIntValue(int value) { @@ -848,7 +1029,7 @@ public Builder setIntValue(int value) { return this; } /** - * optional int32 intValue = 1; + * int32 intValue = 1; */ public Builder clearIntValue() { @@ -859,13 +1040,13 @@ public Builder clearIntValue() { private long longValueChanged_ ; /** - * optional int64 longValueChanged = 2; + * int64 longValueChanged = 2; */ public long getLongValueChanged() { return longValueChanged_; } /** - * optional int64 longValueChanged = 2; + * int64 longValueChanged = 2; */ public Builder setLongValueChanged(long value) { @@ -874,7 +1055,7 @@ public Builder setLongValueChanged(long value) { return this; } /** - * optional int64 longValueChanged = 2; + * int64 longValueChanged = 2; */ public Builder clearLongValueChanged() { @@ -885,7 +1066,7 @@ public Builder clearLongValueChanged() { private java.lang.Object unusableValue_ = ""; /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public java.lang.String getUnusableValue() { java.lang.Object ref = unusableValue_; @@ -900,7 +1081,7 @@ public java.lang.String getUnusableValue() { } } /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public com.google.protobuf.ByteString getUnusableValueBytes() { @@ -916,7 +1097,7 @@ public java.lang.String getUnusableValue() { } } /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public Builder setUnusableValue( java.lang.String value) { @@ -929,7 +1110,7 @@ public Builder setUnusableValue( return this; } /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public Builder clearUnusableValue() { @@ -938,7 +1119,7 @@ public Builder clearUnusableValue() { return this; } /** - * optional string unusableValue = 3; + * string unusableValue = 3; */ public Builder setUnusableValueBytes( com.google.protobuf.ByteString value) { @@ -953,12 +1134,12 @@ public Builder setUnusableValueBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -981,16 +1162,7 @@ public MultiMappingSecond parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MultiMappingSecond(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new MultiMappingSecond(input, extensionRegistry); } }; @@ -1014,15 +1186,15 @@ public interface MultiMappingTestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ boolean hasMultiMappingValue(); /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst getMultiMappingValue(); /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder getMultiMappingValueOrBuilder(); @@ -1054,11 +1226,12 @@ net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecondOrBuilde * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingTest} */ public static final class MultiMappingTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.MultiMappingTest) MultiMappingTestOrBuilder { + private static final long serialVersionUID = 0L; // Use MultiMappingTest.newBuilder() to construct. - private MultiMappingTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private MultiMappingTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MultiMappingTest() { @@ -1068,13 +1241,19 @@ private MultiMappingTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private MultiMappingTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -1084,7 +1263,8 @@ private MultiMappingTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1107,21 +1287,22 @@ private MultiMappingTest( multiMappingListValue_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } - multiMappingListValue_.add(input.readMessage(net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond.parser(), extensionRegistry)); + multiMappingListValue_.add( + input.readMessage(net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { multiMappingListValue_ = java.util.Collections.unmodifiableList(multiMappingListValue_); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -1130,7 +1311,7 @@ private MultiMappingTest( return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1141,19 +1322,19 @@ private MultiMappingTest( public static final int MULTIMAPPINGVALUE_FIELD_NUMBER = 1; private net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst multiMappingValue_; /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public boolean hasMultiMappingValue() { return multiMappingValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst getMultiMappingValue() { return multiMappingValue_ == null ? net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.getDefaultInstance() : multiMappingValue_; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder getMultiMappingValueOrBuilder() { return getMultiMappingValue(); @@ -1212,6 +1393,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < multiMappingListValue_.size(); i++) { output.writeMessage(2, multiMappingListValue_.get(i)); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -1227,11 +1409,64 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, multiMappingListValue_.get(i)); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest other = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest) obj; + + boolean result = true; + result = result && (hasMultiMappingValue() == other.hasMultiMappingValue()); + if (hasMultiMappingValue()) { + result = result && getMultiMappingValue() + .equals(other.getMultiMappingValue()); + } + result = result && getMultiMappingListValueList() + .equals(other.getMultiMappingListValueList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMultiMappingValue()) { + hash = (37 * hash) + MULTIMAPPINGVALUE_FIELD_NUMBER; + hash = (53 * hash) + getMultiMappingValue().hashCode(); + } + if (getMultiMappingListValueCount() > 0) { + hash = (37 * hash) + MULTIMAPPINGLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getMultiMappingListValueList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1255,34 +1490,40 @@ public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMapping } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -1299,7 +1540,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1307,7 +1548,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.MultiMappingTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.MultiMappingTest) net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -1315,7 +1556,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.MultiMappingProto.internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -1328,12 +1569,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { getMultiMappingListValueFieldBuilder(); } } @@ -1394,6 +1636,32 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest bu return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest) { return mergeFrom((net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest)other); @@ -1427,13 +1695,14 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.MultiMappingProto.M multiMappingListValue_ = other.multiMappingListValue_; bitField0_ = (bitField0_ & ~0x00000002); multiMappingListValueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMultiMappingListValueFieldBuilder() : null; } else { multiMappingListValueBuilder_.addAllMessages(other.multiMappingListValue_); } } } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -1451,7 +1720,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -1462,16 +1731,16 @@ public Builder mergeFrom( private int bitField0_; private net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst multiMappingValue_ = null; - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder> multiMappingValueBuilder_; /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public boolean hasMultiMappingValue() { return multiMappingValueBuilder_ != null || multiMappingValue_ != null; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst getMultiMappingValue() { if (multiMappingValueBuilder_ == null) { @@ -1481,7 +1750,7 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst g } } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public Builder setMultiMappingValue(net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst value) { if (multiMappingValueBuilder_ == null) { @@ -1497,7 +1766,7 @@ public Builder setMultiMappingValue(net.badata.protobuf.converter.proto.MultiMap return this; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public Builder setMultiMappingValue( net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.Builder builderForValue) { @@ -1511,7 +1780,7 @@ public Builder setMultiMappingValue( return this; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public Builder mergeMultiMappingValue(net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst value) { if (multiMappingValueBuilder_ == null) { @@ -1529,7 +1798,7 @@ public Builder mergeMultiMappingValue(net.badata.protobuf.converter.proto.MultiM return this; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public Builder clearMultiMappingValue() { if (multiMappingValueBuilder_ == null) { @@ -1543,7 +1812,7 @@ public Builder clearMultiMappingValue() { return this; } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.Builder getMultiMappingValueBuilder() { @@ -1551,7 +1820,7 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.B return getMultiMappingValueFieldBuilder().getBuilder(); } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder getMultiMappingValueOrBuilder() { if (multiMappingValueBuilder_ != null) { @@ -1562,13 +1831,13 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOr } } /** - * optional .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; + * .net.badata.protobuf.converter.proto.MultiMappingFirst multiMappingValue = 1; */ - private com.google.protobuf.SingleFieldBuilder< + private com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder> getMultiMappingValueFieldBuilder() { if (multiMappingValueBuilder_ == null) { - multiMappingValueBuilder_ = new com.google.protobuf.SingleFieldBuilder< + multiMappingValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirst.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingFirstOrBuilder>( getMultiMappingValue(), getParentForChildren(), @@ -1587,7 +1856,7 @@ private void ensureMultiMappingListValueIsMutable() { } } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecondOrBuilder> multiMappingListValueBuilder_; /** @@ -1803,11 +2072,11 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond. getMultiMappingListValueBuilderList() { return getMultiMappingListValueFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilder< + private com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecondOrBuilder> getMultiMappingListValueFieldBuilder() { if (multiMappingListValueBuilder_ == null) { - multiMappingListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + multiMappingListValueBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond.Builder, net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecondOrBuilder>( multiMappingListValue_, ((bitField0_ & 0x00000002) == 0x00000002), @@ -1819,12 +2088,12 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingSecond. } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -1847,16 +2116,7 @@ public MultiMappingTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new MultiMappingTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new MultiMappingTest(input, extensionRegistry); } }; @@ -1875,27 +2135,27 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest ge } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { @@ -1908,7 +2168,7 @@ public net.badata.protobuf.converter.proto.MultiMappingProto.MultiMappingTest ge "MappingValue\030\001 \001(\01326.net.badata.protobuf" + ".converter.proto.MultiMappingFirst\022V\n\025mu" + "ltiMappingListValue\030\002 \003(\01327.net.badata.p" + - "rotobuf.converter.proto.MultiMappingSeco", + "rotobuf.converter.proto.MultiMappingSeco" + "ndB8\n#net.badata.protobuf.converter.prot" + "oB\021MultiMappingProtob\006proto3" }; @@ -1927,19 +2187,19 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_MultiMappingFirst_descriptor, new java.lang.String[] { "IntValue", "LongValue", }); internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_MultiMappingSecond_descriptor, new java.lang.String[] { "IntValue", "LongValueChanged", "UnusableValue", }); internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_MultiMappingTest_descriptor, new java.lang.String[] { "MultiMappingValue", "MultiMappingListValue", }); } diff --git a/src/test/java/net/badata/protobuf/converter/proto/ResolverProto.java b/src/test/java/net/badata/protobuf/converter/proto/ResolverProto.java index f6a0af2..587e814 100644 --- a/src/test/java/net/badata/protobuf/converter/proto/ResolverProto.java +++ b/src/test/java/net/badata/protobuf/converter/proto/ResolverProto.java @@ -5,8 +5,14 @@ public final class ResolverProto { private ResolverProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); } public interface ResolverTestOrBuilder extends // @@protoc_insertion_point(interface_extends:net.badata.protobuf.converter.proto.ResolverTest) @@ -15,7 +21,7 @@ public interface ResolverTestOrBuilder extends /** * repeated string stringListValue = 1; */ - com.google.protobuf.ProtocolStringList + java.util.List getStringListValueList(); /** * repeated string stringListValue = 1; @@ -32,11 +38,11 @@ public interface ResolverTestOrBuilder extends getStringListValueBytes(int index); /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ java.lang.String getDelimitedStringValue(); /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ com.google.protobuf.ByteString getDelimitedStringValueBytes(); @@ -45,11 +51,12 @@ public interface ResolverTestOrBuilder extends * Protobuf type {@code net.badata.protobuf.converter.proto.ResolverTest} */ public static final class ResolverTest extends - com.google.protobuf.GeneratedMessage implements + com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:net.badata.protobuf.converter.proto.ResolverTest) ResolverTestOrBuilder { + private static final long serialVersionUID = 0L; // Use ResolverTest.newBuilder() to construct. - private ResolverTest(com.google.protobuf.GeneratedMessage.Builder builder) { + private ResolverTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResolverTest() { @@ -60,13 +67,19 @@ private ResolverTest() { @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + return this.unknownFields; } private ResolverTest( com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { @@ -76,13 +89,14 @@ private ResolverTest( done = true; break; default: { - if (!input.skipField(tag)) { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { stringListValue_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; @@ -91,7 +105,7 @@ private ResolverTest( break; } case 26: { - String s = input.readStringRequireUtf8(); + java.lang.String s = input.readStringRequireUtf8(); delimitedStringValue_ = s; break; @@ -99,15 +113,15 @@ private ResolverTest( } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw new RuntimeException(e.setUnfinishedMessage(this)); + throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { - throw new RuntimeException( - new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this)); + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { stringListValue_ = stringListValue_.getUnmodifiableView(); } + this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } @@ -116,7 +130,7 @@ private ResolverTest( return net.badata.protobuf.converter.proto.ResolverProto.internal_static_net_badata_protobuf_converter_proto_ResolverTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ResolverProto.internal_static_net_badata_protobuf_converter_proto_ResolverTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -156,7 +170,7 @@ public java.lang.String getStringListValue(int index) { public static final int DELIMITEDSTRINGVALUE_FIELD_NUMBER = 3; private volatile java.lang.Object delimitedStringValue_; /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public java.lang.String getDelimitedStringValue() { java.lang.Object ref = delimitedStringValue_; @@ -171,7 +185,7 @@ public java.lang.String getDelimitedStringValue() { } } /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public com.google.protobuf.ByteString getDelimitedStringValueBytes() { @@ -200,11 +214,12 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < stringListValue_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, stringListValue_.getRaw(i)); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, stringListValue_.getRaw(i)); } if (!getDelimitedStringValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, delimitedStringValue_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, delimitedStringValue_); } + unknownFields.writeTo(output); } public int getSerializedSize() { @@ -221,13 +236,61 @@ public int getSerializedSize() { size += 1 * getStringListValueList().size(); } if (!getDelimitedStringValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, delimitedStringValue_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, delimitedStringValue_); } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.badata.protobuf.converter.proto.ResolverProto.ResolverTest)) { + return super.equals(obj); + } + net.badata.protobuf.converter.proto.ResolverProto.ResolverTest other = (net.badata.protobuf.converter.proto.ResolverProto.ResolverTest) obj; + + boolean result = true; + result = result && getStringListValueList() + .equals(other.getStringListValueList()); + result = result && getDelimitedStringValue() + .equals(other.getDelimitedStringValue()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getStringListValueCount() > 0) { + hash = (37 * hash) + STRINGLISTVALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringListValueList().hashCode(); + } + hash = (37 * hash) + DELIMITEDSTRINGVALUE_FIELD_NUMBER; + hash = (53 * hash) + getDelimitedStringValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -251,34 +314,40 @@ public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest par } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return PARSER.parseFrom(input); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); } public static net.badata.protobuf.converter.proto.ResolverProto.ResolverTest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } @@ -295,7 +364,7 @@ public Builder toBuilder() { @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -303,7 +372,7 @@ protected Builder newBuilderForType( * Protobuf type {@code net.badata.protobuf.converter.proto.ResolverTest} */ public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements + com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:net.badata.protobuf.converter.proto.ResolverTest) net.badata.protobuf.converter.proto.ResolverProto.ResolverTestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor @@ -311,7 +380,7 @@ public static final class Builder extends return net.badata.protobuf.converter.proto.ResolverProto.internal_static_net_badata_protobuf_converter_proto_ResolverTest_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.badata.protobuf.converter.proto.ResolverProto.internal_static_net_badata_protobuf_converter_proto_ResolverTest_fieldAccessorTable .ensureFieldAccessorsInitialized( @@ -324,12 +393,13 @@ private Builder() { } private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { } } public Builder clear() { @@ -373,6 +443,32 @@ public net.badata.protobuf.converter.proto.ResolverProto.ResolverTest buildParti return result; } + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.badata.protobuf.converter.proto.ResolverProto.ResolverTest) { return mergeFrom((net.badata.protobuf.converter.proto.ResolverProto.ResolverTest)other); @@ -398,6 +494,7 @@ public Builder mergeFrom(net.badata.protobuf.converter.proto.ResolverProto.Resol delimitedStringValue_ = other.delimitedStringValue_; onChanged(); } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -415,7 +512,7 @@ public Builder mergeFrom( parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.badata.protobuf.converter.proto.ResolverProto.ResolverTest) e.getUnfinishedMessage(); - throw e; + throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); @@ -521,7 +618,7 @@ public Builder addStringListValueBytes( private java.lang.Object delimitedStringValue_ = ""; /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public java.lang.String getDelimitedStringValue() { java.lang.Object ref = delimitedStringValue_; @@ -536,7 +633,7 @@ public java.lang.String getDelimitedStringValue() { } } /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public com.google.protobuf.ByteString getDelimitedStringValueBytes() { @@ -552,7 +649,7 @@ public java.lang.String getDelimitedStringValue() { } } /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public Builder setDelimitedStringValue( java.lang.String value) { @@ -565,7 +662,7 @@ public Builder setDelimitedStringValue( return this; } /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public Builder clearDelimitedStringValue() { @@ -574,7 +671,7 @@ public Builder clearDelimitedStringValue() { return this; } /** - * optional string delimitedStringValue = 3; + * string delimitedStringValue = 3; */ public Builder setDelimitedStringValueBytes( com.google.protobuf.ByteString value) { @@ -589,12 +686,12 @@ public Builder setDelimitedStringValueBytes( } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + return super.mergeUnknownFields(unknownFields); } @@ -617,16 +714,7 @@ public ResolverTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - try { - return new ResolverTest(input, extensionRegistry); - } catch (RuntimeException e) { - if (e.getCause() instanceof - com.google.protobuf.InvalidProtocolBufferException) { - throw (com.google.protobuf.InvalidProtocolBufferException) - e.getCause(); - } - throw e; - } + return new ResolverTest(input, extensionRegistry); } }; @@ -645,17 +733,17 @@ public net.badata.protobuf.converter.proto.ResolverProto.ResolverTest getDefault } - private static com.google.protobuf.Descriptors.Descriptor + private static final com.google.protobuf.Descriptors.Descriptor internal_static_net_badata_protobuf_converter_proto_ResolverTest_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_net_badata_protobuf_converter_proto_ResolverTest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } - private static com.google.protobuf.Descriptors.FileDescriptor + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { @@ -680,7 +768,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_net_badata_protobuf_converter_proto_ResolverTest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_net_badata_protobuf_converter_proto_ResolverTest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_net_badata_protobuf_converter_proto_ResolverTest_descriptor, new java.lang.String[] { "StringListValue", "DelimitedStringValue", }); }