Message.java
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 // TODO(kenton): Use generics? E.g. Builder<BuilderType extends Builder>, then
32 // mergeFrom*() could return BuilderType for better type-safety.
33 
34 package com.google.protobuf;
35 
36 import java.io.IOException;
37 import java.io.InputStream;
38 import java.util.Map;
39 
50 public interface Message extends MessageLite, MessageOrBuilder {
51 
52  // (From MessageLite, re-declared here only for return type covariance.)
53  @Override
55 
56 
57  // -----------------------------------------------------------------
58  // Comparison and hashing
59 
69  @Override
70  boolean equals(Object other);
71 
80  @Override
81  int hashCode();
82 
83  // -----------------------------------------------------------------
84  // Convenience methods.
85 
90  @Override
91  String toString();
92 
93  // =================================================================
94  // Builders
95 
96  // (From MessageLite, re-declared here only for return type covariance.)
97  @Override
99 
100  @Override
101  Builder toBuilder();
102 
105  // (From MessageLite.Builder, re-declared here only for return type
106  // covariance.)
107  @Override
108  Builder clear();
109 
127  Builder mergeFrom(Message other);
128 
129  // (From MessageLite.Builder, re-declared here only for return type
130  // covariance.)
131  @Override
132  Message build();
133 
134  @Override
136 
137  @Override
138  Builder clone();
139 
140  @Override
141  Builder mergeFrom(CodedInputStream input) throws IOException;
142 
143  @Override
145  throws IOException;
146 
148  @Override
150 
163 
180 
197 
203 
209 
215 
225 
233 
236 
239 
240  // ---------------------------------------------------------------
241  // Convenience methods.
242 
243  // (From MessageLite.Builder, re-declared here only for return type
244  // covariance.)
245  @Override
247 
248  @Override
251 
252  @Override
254 
255  @Override
256  Builder mergeFrom(byte[] data, int off, int len) throws InvalidProtocolBufferException;
257 
258  @Override
259  Builder mergeFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
261 
262  @Override
263  Builder mergeFrom(byte[] data, int off, int len, ExtensionRegistryLite extensionRegistry)
265 
266  @Override
267  Builder mergeFrom(InputStream input) throws IOException;
268 
269  @Override
270  Builder mergeFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
271  throws IOException;
272 
273  @Override
274  boolean mergeDelimitedFrom(InputStream input) throws IOException;
275 
276  @Override
277  boolean mergeDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
278  throws IOException;
279  }
280 }
com.google.protobuf.Message.Builder.addRepeatedField
Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
com.google.protobuf.Descriptors
Definition: Descriptors.java:80
com.google.protobuf.Message.Builder.setField
Builder setField(Descriptors.FieldDescriptor field, Object value)
com.google.protobuf.Message.Builder.mergeFrom
Builder mergeFrom(Message other)
input
std::string input
Definition: tokenizer_unittest.cc:197
com.google.protobuf.Message.Builder.mergeUnknownFields
Builder mergeUnknownFields(UnknownFieldSet unknownFields)
com.google.protobuf.Message.toBuilder
Builder toBuilder()
com.google.protobuf.Message.toString
String toString()
com.google.protobuf.Message.Builder.mergeDelimitedFrom
boolean mergeDelimitedFrom(InputStream input)
com.google.protobuf.Message.Builder.setUnknownFields
Builder setUnknownFields(UnknownFieldSet unknownFields)
com.google.protobuf.Message.newBuilderForType
Builder newBuilderForType()
com.google.protobuf.Message.Builder.clearField
Builder clearField(Descriptors.FieldDescriptor field)
com.google.protobuf.Message.Builder.clear
Builder clear()
com.google.protobuf.Message.getParserForType
Parser<? extends Message > getParserForType()
com.google.protobuf.Parser
Definition: Parser.java:47
com.google.protobuf.CodedInputStream
Definition: CodedInputStream.java:61
com.google.protobuf.Descriptors.OneofDescriptor
Definition: Descriptors.java:2597
com.google.protobuf.Message.Builder
Definition: Message.java:104
com.google.protobuf.UnknownFieldSet
Definition: UnknownFieldSet.java:58
com.google.protobuf.MessageOrBuilder
Definition: MessageOrBuilder.java:42
com.google.protobuf.Message.Builder.clone
Builder clone()
com.google.protobuf.Message.Builder.setRepeatedField
Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
com.google.protobuf.Message.Builder.build
Message build()
com.google.protobuf.ExtensionRegistryLite
Definition: ExtensionRegistryLite.java:70
field
const FieldDescriptor * field
Definition: parser_unittest.cc:2694
java
com.google.protobuf.Descriptors.Descriptor
Definition: Descriptors.java:629
len
int len
Definition: php/ext/google/protobuf/map.c:206
com.google.protobuf.Message.equals
boolean equals(Object other)
com.google.protobuf.Message.Builder.getDescriptorForType
Descriptors.Descriptor getDescriptorForType()
com.google.protobuf.Message.hashCode
int hashCode()
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879
com.google.protobuf.Message.Builder.clearOneof
Builder clearOneof(Descriptors.OneofDescriptor oneof)
com.google.protobuf.InvalidProtocolBufferException
Definition: InvalidProtocolBufferException.java:41
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
com.google.protobuf.Message.Builder.getFieldBuilder
Builder getFieldBuilder(Descriptors.FieldDescriptor field)
com.google.protobuf.Message.Builder.getRepeatedFieldBuilder
Builder getRepeatedFieldBuilder(Descriptors.FieldDescriptor field, int index)
index
GLuint index
Definition: glcorearb.h:3055
com.google.protobuf.Message.Builder.buildPartial
Message buildPartial()
com.google.protobuf.Message.Builder.newBuilderForField
Builder newBuilderForField(Descriptors.FieldDescriptor field)
com.google.protobuf.Message
Definition: Message.java:50
com.google.protobuf.MessageLite
Definition: MessageLite.java:65
com.google.protobuf.Descriptors.FieldDescriptor
Definition: Descriptors.java:949
com.google.protobuf.ByteString
Definition: ByteString.java:67


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:56