diff options
Diffstat (limited to 'java/core/src/main/java/com/google/protobuf/AbstractParser.java')
-rw-r--r-- | java/core/src/main/java/com/google/protobuf/AbstractParser.java | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/java/core/src/main/java/com/google/protobuf/AbstractParser.java b/java/core/src/main/java/com/google/protobuf/AbstractParser.java index ba570e3d..abfaca8c 100644 --- a/java/core/src/main/java/com/google/protobuf/AbstractParser.java +++ b/java/core/src/main/java/com/google/protobuf/AbstractParser.java @@ -36,23 +36,19 @@ import java.io.InputStream; import java.nio.ByteBuffer; /** - * A partial implementation of the {@link Parser} interface which implements - * as many methods of that interface as possible in terms of other methods. + * A partial implementation of the {@link Parser} interface which implements as many methods of that + * interface as possible in terms of other methods. * - * Note: This class implements all the convenience methods in the - * {@link Parser} interface. See {@link Parser} for related javadocs. - * Subclasses need to implement - * {@link Parser#parsePartialFrom(CodedInputStream, ExtensionRegistryLite)} + * <p>Note: This class implements all the convenience methods in the {@link Parser} interface. See + * {@link Parser} for related javadocs. Subclasses need to implement {@link + * Parser#parsePartialFrom(CodedInputStream, ExtensionRegistryLite)} * * @author liujisi@google.com (Pherl Liu) */ public abstract class AbstractParser<MessageType extends MessageLite> implements Parser<MessageType> { - /** - * Creates an UninitializedMessageException for MessageType. - */ - private UninitializedMessageException - newUninitializedMessageException(MessageType message) { + /** Creates an UninitializedMessageException for MessageType. */ + private UninitializedMessageException newUninitializedMessageException(MessageType message) { if (message instanceof AbstractMessageLite) { return ((AbstractMessageLite) message).newUninitializedMessageException(); } @@ -75,8 +71,8 @@ public abstract class AbstractParser<MessageType extends MessageLite> return message; } - private static final ExtensionRegistryLite EMPTY_REGISTRY - = ExtensionRegistryLite.getEmptyRegistry(); + private static final ExtensionRegistryLite EMPTY_REGISTRY = + ExtensionRegistryLite.getEmptyRegistry(); @Override public MessageType parsePartialFrom(CodedInputStream input) @@ -87,8 +83,7 @@ public abstract class AbstractParser<MessageType extends MessageLite> @Override public MessageType parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { - return checkMessageInitialized( - parsePartialFrom(input, extensionRegistry)); + return checkMessageInitialized(parsePartialFrom(input, extensionRegistry)); } @Override @@ -193,8 +188,7 @@ public abstract class AbstractParser<MessageType extends MessageLite> public MessageType parseFrom( byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { - return checkMessageInitialized( - parsePartialFrom(data, off, len, extensionRegistry)); + return checkMessageInitialized(parsePartialFrom(data, off, len, extensionRegistry)); } @Override @@ -235,8 +229,7 @@ public abstract class AbstractParser<MessageType extends MessageLite> @Override public MessageType parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { - return checkMessageInitialized( - parsePartialFrom(input, extensionRegistry)); + return checkMessageInitialized(parsePartialFrom(input, extensionRegistry)); } @Override @@ -271,8 +264,7 @@ public abstract class AbstractParser<MessageType extends MessageLite> @Override public MessageType parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException { - return checkMessageInitialized( - parsePartialDelimitedFrom(input, extensionRegistry)); + return checkMessageInitialized(parsePartialDelimitedFrom(input, extensionRegistry)); } @Override |