Internal.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 package com.google.protobuf;
32 
33 import java.io.IOException;
34 import java.lang.reflect.Method;
35 import java.nio.ByteBuffer;
36 import java.nio.charset.Charset;
37 import java.util.AbstractList;
38 import java.util.AbstractMap;
39 import java.util.AbstractSet;
40 import java.util.Arrays;
41 import java.util.Iterator;
42 import java.util.List;
43 import java.util.Map;
44 import java.util.RandomAccess;
45 import java.util.Set;
46 
54 public final class Internal {
55 
56  private Internal() {}
57 
58  static final Charset UTF_8 = Charset.forName("UTF-8");
59  static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
60 
62  static <T> T checkNotNull(T obj) {
63  if (obj == null) {
64  throw new NullPointerException();
65  }
66  return obj;
67  }
68 
70  static <T> T checkNotNull(T obj, String message) {
71  if (obj == null) {
72  throw new NullPointerException(message);
73  }
74  return obj;
75  }
76 
99  public static String stringDefaultValue(String bytes) {
100  return new String(bytes.getBytes(ISO_8859_1), UTF_8);
101  }
102 
110  public static ByteString bytesDefaultValue(String bytes) {
111  return ByteString.copyFrom(bytes.getBytes(ISO_8859_1));
112  }
118  public static byte[] byteArrayDefaultValue(String bytes) {
119  return bytes.getBytes(ISO_8859_1);
120  }
121 
127  public static ByteBuffer byteBufferDefaultValue(String bytes) {
128  return ByteBuffer.wrap(byteArrayDefaultValue(bytes));
129  }
130 
136  public static ByteBuffer copyByteBuffer(ByteBuffer source) {
137  // Make a duplicate of the source ByteBuffer and read data from the
138  // duplicate. This is to avoid affecting the source ByteBuffer's state.
139  ByteBuffer temp = source.duplicate();
140  // We want to copy all the data in the source ByteBuffer, not just the
141  // remaining bytes.
142  temp.clear();
143  ByteBuffer result = ByteBuffer.allocate(temp.capacity());
144  result.put(temp);
145  result.clear();
146  return result;
147  }
148 
175  public static boolean isValidUtf8(ByteString byteString) {
176  return byteString.isValidUtf8();
177  }
178 
180  public static boolean isValidUtf8(byte[] byteArray) {
181  return Utf8.isValidUtf8(byteArray);
182  }
183 
185  public static byte[] toByteArray(String value) {
186  return value.getBytes(UTF_8);
187  }
188 
190  public static String toStringUtf8(byte[] bytes) {
191  return new String(bytes, UTF_8);
192  }
193 
199  public interface EnumLite {
200  int getNumber();
201  }
202 
210  public interface EnumLiteMap<T extends EnumLite> {
212  }
213 
215  public interface EnumVerifier {
216  boolean isInRange(int number);
217  }
218 
224  public static int hashLong(long n) {
225  return (int) (n ^ (n >>> 32));
226  }
227 
233  public static int hashBoolean(boolean b) {
234  return b ? 1231 : 1237;
235  }
236 
244  public static int hashEnum(EnumLite e) {
245  return e.getNumber();
246  }
247 
249  public static int hashEnumList(List<? extends EnumLite> list) {
250  int hash = 1;
251  for (EnumLite e : list) {
252  hash = 31 * hash + hashEnum(e);
253  }
254  return hash;
255  }
256 
258  public static boolean equals(List<byte[]> a, List<byte[]> b) {
259  if (a.size() != b.size()) return false;
260  for (int i = 0; i < a.size(); ++i) {
261  if (!Arrays.equals(a.get(i), b.get(i))) {
262  return false;
263  }
264  }
265  return true;
266  }
267 
269  public static int hashCode(List<byte[]> list) {
270  int hash = 1;
271  for (byte[] bytes : list) {
272  hash = 31 * hash + hashCode(bytes);
273  }
274  return hash;
275  }
276 
278  public static int hashCode(byte[] bytes) {
279  // The hash code for a byte array should be the same as the hash code for a
280  // ByteString with the same content. This is to ensure that the generated
281  // hashCode() method will return the same value as the pure reflection
282  // based hashCode() method.
283  return Internal.hashCode(bytes, 0, bytes.length);
284  }
285 
287  static int hashCode(byte[] bytes, int offset, int length) {
288  // The hash code for a byte array should be the same as the hash code for a
289  // ByteString with the same content. This is to ensure that the generated
290  // hashCode() method will return the same value as the pure reflection
291  // based hashCode() method.
292  int h = Internal.partialHash(length, bytes, offset, length);
293  return h == 0 ? 1 : h;
294  }
295 
297  static int partialHash(int h, byte[] bytes, int offset, int length) {
298  for (int i = offset; i < offset + length; i++) {
299  h = h * 31 + bytes[i];
300  }
301  return h;
302  }
303 
305  public static boolean equalsByteBuffer(ByteBuffer a, ByteBuffer b) {
306  if (a.capacity() != b.capacity()) {
307  return false;
308  }
309  // ByteBuffer.equals() will only compare the remaining bytes, but we want to
310  // compare all the content.
311  return a.duplicate().clear().equals(b.duplicate().clear());
312  }
313 
315  public static boolean equalsByteBuffer(List<ByteBuffer> a, List<ByteBuffer> b) {
316  if (a.size() != b.size()) {
317  return false;
318  }
319  for (int i = 0; i < a.size(); ++i) {
320  if (!equalsByteBuffer(a.get(i), b.get(i))) {
321  return false;
322  }
323  }
324  return true;
325  }
326 
328  public static int hashCodeByteBuffer(List<ByteBuffer> list) {
329  int hash = 1;
330  for (ByteBuffer bytes : list) {
331  hash = 31 * hash + hashCodeByteBuffer(bytes);
332  }
333  return hash;
334  }
335 
336  private static final int DEFAULT_BUFFER_SIZE = 4096;
337 
339  public static int hashCodeByteBuffer(ByteBuffer bytes) {
340  if (bytes.hasArray()) {
341  // Fast path.
342  int h = partialHash(bytes.capacity(), bytes.array(), bytes.arrayOffset(), bytes.capacity());
343  return h == 0 ? 1 : h;
344  } else {
345  // Read the data into a temporary byte array before calculating the
346  // hash value.
347  final int bufferSize =
348  bytes.capacity() > DEFAULT_BUFFER_SIZE ? DEFAULT_BUFFER_SIZE : bytes.capacity();
349  final byte[] buffer = new byte[bufferSize];
350  final ByteBuffer duplicated = bytes.duplicate();
351  duplicated.clear();
352  int h = bytes.capacity();
353  while (duplicated.remaining() > 0) {
354  final int length =
355  duplicated.remaining() <= bufferSize ? duplicated.remaining() : bufferSize;
356  duplicated.get(buffer, 0, length);
357  h = partialHash(h, buffer, 0, length);
358  }
359  return h == 0 ? 1 : h;
360  }
361  }
362 
363  @SuppressWarnings("unchecked")
364  public static <T extends MessageLite> T getDefaultInstance(Class<T> clazz) {
365  try {
366  Method method = clazz.getMethod("getDefaultInstance");
367  return (T) method.invoke(method);
368  } catch (Exception e) {
369  throw new RuntimeException("Failed to get default instance for " + clazz, e);
370  }
371  }
372 
373 
375  public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
376 
378  public static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.wrap(EMPTY_BYTE_ARRAY);
379 
383 
384 
386  static Object mergeMessage(Object destination, Object source) {
387  return ((MessageLite) destination).toBuilder().mergeFrom((MessageLite) source).buildPartial();
388  }
389 
395  public static class ListAdapter<F, T> extends AbstractList<T> {
397  public interface Converter<F, T> {
398  T convert(F from);
399  }
400 
401  private final List<F> fromList;
402  private final Converter<F, T> converter;
403 
405  this.fromList = fromList;
406  this.converter = converter;
407  }
408 
409  @Override
410  public T get(int index) {
411  return converter.convert(fromList.get(index));
412  }
413 
414  @Override
415  public int size() {
416  return fromList.size();
417  }
418  }
419 
421  public static class MapAdapter<K, V, RealValue> extends AbstractMap<K, V> {
423  public interface Converter<A, B> {
424  B doForward(A object);
425 
426  A doBackward(B object);
427  }
428 
429  public static <T extends EnumLite> Converter<Integer, T> newEnumConverter(
430  final EnumLiteMap<T> enumMap, final T unrecognizedValue) {
431  return new Converter<Integer, T>() {
432  @Override
433  public T doForward(Integer value) {
434  T result = enumMap.findValueByNumber(value);
435  return result == null ? unrecognizedValue : result;
436  }
437 
438  @Override
439  public Integer doBackward(T value) {
440  return value.getNumber();
441  }
442  };
443  }
444 
445  private final Map<K, RealValue> realMap;
447 
449  this.realMap = realMap;
450  this.valueConverter = valueConverter;
451  }
452 
453  @SuppressWarnings("unchecked")
454  @Override
455  public V get(Object key) {
456  RealValue result = realMap.get(key);
457  if (result == null) {
458  return null;
459  }
460  return valueConverter.doForward(result);
461  }
462 
463  @Override
464  public V put(K key, V value) {
465  RealValue oldValue = realMap.put(key, valueConverter.doBackward(value));
466  if (oldValue == null) {
467  return null;
468  }
469  return valueConverter.doForward(oldValue);
470  }
471 
472  @Override
473  public Set<java.util.Map.Entry<K, V>> entrySet() {
474  return new SetAdapter(realMap.entrySet());
475  }
476 
477  private class SetAdapter extends AbstractSet<Map.Entry<K, V>> {
478  private final Set<Map.Entry<K, RealValue>> realSet;
479 
480  public SetAdapter(Set<Map.Entry<K, RealValue>> realSet) {
481  this.realSet = realSet;
482  }
483 
484  @Override
485  public Iterator<java.util.Map.Entry<K, V>> iterator() {
486  return new IteratorAdapter(realSet.iterator());
487  }
488 
489  @Override
490  public int size() {
491  return realSet.size();
492  }
493  }
494 
495  private class IteratorAdapter implements Iterator<Map.Entry<K, V>> {
496  private final Iterator<Map.Entry<K, RealValue>> realIterator;
497 
498  public IteratorAdapter(Iterator<Map.Entry<K, RealValue>> realIterator) {
499  this.realIterator = realIterator;
500  }
501 
502  @Override
503  public boolean hasNext() {
504  return realIterator.hasNext();
505  }
506 
507  @Override
508  public java.util.Map.Entry<K, V> next() {
509  return new EntryAdapter(realIterator.next());
510  }
511 
512  @Override
513  public void remove() {
514  realIterator.remove();
515  }
516  }
517 
518  private class EntryAdapter implements Map.Entry<K, V> {
519  private final Map.Entry<K, RealValue> realEntry;
520 
521  public EntryAdapter(Map.Entry<K, RealValue> realEntry) {
522  this.realEntry = realEntry;
523  }
524 
525  @Override
526  public K getKey() {
527  return realEntry.getKey();
528  }
529 
530  @Override
531  public V getValue() {
532  return valueConverter.doForward(realEntry.getValue());
533  }
534 
535  @Override
536  public V setValue(V value) {
537  RealValue oldValue = realEntry.setValue(valueConverter.doBackward(value));
538  if (oldValue == null) {
539  return null;
540  }
541  return valueConverter.doForward(oldValue);
542  }
543 
544  @Override
545  public boolean equals(Object o) {
546  if (o == this) {
547  return true;
548  }
549  if (!(o instanceof Map.Entry)) {
550  return false;
551  }
552  @SuppressWarnings("unchecked")
553  Map.Entry<?, ?> other = (Map.Entry<?, ?>) o;
554  return getKey().equals(other.getKey()) && getValue().equals(getValue());
555  }
556 
557  @Override
558  public int hashCode() {
559  return realEntry.hashCode();
560  }
561  }
562  }
563 
570  public static interface ProtobufList<E> extends List<E>, RandomAccess {
571 
576  void makeImmutable();
577 
581  boolean isModifiable();
582 
585  }
586 
591  public static interface IntList extends ProtobufList<Integer> {
592 
594  int getInt(int index);
595 
597  void addInt(int element);
598 
600  int setInt(int index, int element);
601 
603  @Override
604  IntList mutableCopyWithCapacity(int capacity);
605  }
606 
611  public static interface BooleanList extends ProtobufList<Boolean> {
612 
614  boolean getBoolean(int index);
615 
617  void addBoolean(boolean element);
618 
620  boolean setBoolean(int index, boolean element);
621 
623  @Override
624  BooleanList mutableCopyWithCapacity(int capacity);
625  }
626 
631  public static interface LongList extends ProtobufList<Long> {
632 
634  long getLong(int index);
635 
637  void addLong(long element);
638 
640  long setLong(int index, long element);
641 
643  @Override
644  LongList mutableCopyWithCapacity(int capacity);
645  }
646 
651  public static interface DoubleList extends ProtobufList<Double> {
652 
654  double getDouble(int index);
655 
657  void addDouble(double element);
658 
660  double setDouble(int index, double element);
661 
663  @Override
664  DoubleList mutableCopyWithCapacity(int capacity);
665  }
666 
671  public static interface FloatList extends ProtobufList<Float> {
672 
674  float getFloat(int index);
675 
677  void addFloat(float element);
678 
680  float setFloat(int index, float element);
681 
683  @Override
684  FloatList mutableCopyWithCapacity(int capacity);
685  }
686 
687 }
Map
struct Map Map
Definition: php/ext/google/protobuf/protobuf.h:648
com.google.protobuf.Internal.FloatList.mutableCopyWithCapacity
FloatList mutableCopyWithCapacity(int capacity)
java::lang
com.google.protobuf.Internal.ListAdapter.converter
final Converter< F, T > converter
Definition: Internal.java:402
com.google.protobuf.Internal.MapAdapter.entrySet
Set< java.util.Map.Entry< K, V > > entrySet()
Definition: Internal.java:473
com.google.protobuf.Internal.MapAdapter.realMap
final Map< K, RealValue > realMap
Definition: Internal.java:445
java::lang::reflect::Method
com.google.protobuf.Internal.hashEnumList
static int hashEnumList(List<? extends EnumLite > list)
Definition: Internal.java:249
com.google.protobuf.Internal.byteArrayDefaultValue
static byte[] byteArrayDefaultValue(String bytes)
Definition: Internal.java:118
com.google.protobuf.Internal.hashEnum
static int hashEnum(EnumLite e)
Definition: Internal.java:244
com.google.protobuf.Internal.ProtobufList.mutableCopyWithCapacity
ProtobufList< E > mutableCopyWithCapacity(int capacity)
K
#define K(t)
Definition: sha1.c:43
com.google.protobuf.Internal.FloatList.addFloat
void addFloat(float element)
com.google.protobuf.Internal.MapAdapter.EntryAdapter
Definition: Internal.java:518
com.google.protobuf.CodedInputStream.newInstance
static CodedInputStream newInstance(final InputStream input)
Definition: CodedInputStream.java:79
com.google.protobuf.Internal.EnumLiteMap
Definition: Internal.java:210
com.google.protobuf.Internal.EMPTY_BYTE_ARRAY
static final byte[] EMPTY_BYTE_ARRAY
Definition: Internal.java:375
com.google.protobuf.Internal.MapAdapter.EntryAdapter.getKey
K getKey()
Definition: Internal.java:526
Method
struct Method Method
Definition: php/ext/google/protobuf/protobuf.h:652
length
GLenum GLuint GLenum GLsizei length
Definition: glcorearb.h:2695
com.google.protobuf.Internal.bytesDefaultValue
static ByteString bytesDefaultValue(String bytes)
Definition: Internal.java:110
com.google.protobuf.Internal.MapAdapter.IteratorAdapter.IteratorAdapter
IteratorAdapter(Iterator< Map.Entry< K, RealValue >> realIterator)
Definition: Internal.java:498
com.google.protobuf.Internal.DoubleList.getDouble
double getDouble(int index)
com.google.protobuf.Internal.MapAdapter.Converter.doForward
B doForward(A object)
com.google.protobuf.Internal.hashCodeByteBuffer
static int hashCodeByteBuffer(ByteBuffer bytes)
Definition: Internal.java:339
com.google.protobuf.Internal.FloatList.getFloat
float getFloat(int index)
com.google.protobuf.Internal.MapAdapter.EntryAdapter.EntryAdapter
EntryAdapter(Map.Entry< K, RealValue > realEntry)
Definition: Internal.java:521
com.google.protobuf.Internal.MapAdapter.newEnumConverter
static< T extends EnumLite > Converter< Integer, T > newEnumConverter(final EnumLiteMap< T > enumMap, final T unrecognizedValue)
Definition: Internal.java:429
com.google.protobuf.Internal.LongList.mutableCopyWithCapacity
LongList mutableCopyWithCapacity(int capacity)
com.google.protobuf.Internal.DoubleList.addDouble
void addDouble(double element)
com.google.protobuf.Internal.MapAdapter.EntryAdapter.setValue
V setValue(V value)
Definition: Internal.java:536
com.google.protobuf.Internal.MapAdapter.Converter.doBackward
A doBackward(B object)
com.google.protobuf.Internal.copyByteBuffer
static ByteBuffer copyByteBuffer(ByteBuffer source)
Definition: Internal.java:136
com.google.protobuf.Internal.ProtobufList.makeImmutable
void makeImmutable()
com.google.protobuf.Internal.MapAdapter.SetAdapter
Definition: Internal.java:477
java::lang::reflect
com.google.protobuf.Internal.FloatList.setFloat
float setFloat(int index, float element)
com.google.protobuf.Internal.hashCode
static int hashCode(List< byte[]> list)
Definition: Internal.java:269
T
#define T(upbtypeconst, upbtype, ctype, default_value)
com.google.protobuf.Internal.MapAdapter.IteratorAdapter.next
java.util.Map.Entry< K, V > next()
Definition: Internal.java:508
com.google.protobuf.Internal.equalsByteBuffer
static boolean equalsByteBuffer(ByteBuffer a, ByteBuffer b)
Definition: Internal.java:305
bytes
uint8 bytes[10]
Definition: coded_stream_unittest.cc:153
com.google.protobuf.Internal.BooleanList.getBoolean
boolean getBoolean(int index)
com.google.protobuf.Internal.EnumVerifier.isInRange
boolean isInRange(int number)
com.google.protobuf.Internal.EMPTY_BYTE_BUFFER
static final ByteBuffer EMPTY_BYTE_BUFFER
Definition: Internal.java:378
com.google.protobuf.Internal.DEFAULT_BUFFER_SIZE
static final int DEFAULT_BUFFER_SIZE
Definition: Internal.java:336
com.google.protobuf.Internal.MapAdapter.SetAdapter.realSet
final Set< Map.Entry< K, RealValue > > realSet
Definition: Internal.java:478
b
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:3228
com.google.protobuf.Internal.LongList
Definition: Internal.java:631
com.google.protobuf.Internal.Internal
Internal()
Definition: Internal.java:56
com.google.protobuf.Internal.EnumLiteMap.findValueByNumber
T findValueByNumber(int number)
obj
GLsizei GLsizei GLuint * obj
Definition: glcorearb.h:3066
com.google.protobuf.Internal.hashBoolean
static int hashBoolean(boolean b)
Definition: Internal.java:233
com.google.protobuf.Internal.MapAdapter.SetAdapter.size
int size()
Definition: Internal.java:490
com.google.protobuf.CodedInputStream
Definition: CodedInputStream.java:61
A
Definition: logging_striptest_main.cc:56
com.google.protobuf.Internal.FloatList
Definition: Internal.java:671
com.google.protobuf.Internal.stringDefaultValue
static String stringDefaultValue(String bytes)
Definition: Internal.java:99
offset
GLintptr offset
Definition: glcorearb.h:2944
com.google.protobuf.Internal.EnumLite
Definition: Internal.java:199
com.google.protobuf.Internal.MapAdapter.SetAdapter.iterator
Iterator< java.util.Map.Entry< K, V > > iterator()
Definition: Internal.java:485
com.google.protobuf.Internal.MapAdapter.EntryAdapter.hashCode
int hashCode()
Definition: Internal.java:558
com.google.protobuf.Internal.toStringUtf8
static String toStringUtf8(byte[] bytes)
Definition: Internal.java:190
com.google.protobuf.Internal.BooleanList.setBoolean
boolean setBoolean(int index, boolean element)
com.google.protobuf.Internal.byteBufferDefaultValue
static ByteBuffer byteBufferDefaultValue(String bytes)
Definition: Internal.java:127
com.google.protobuf.Internal.hashCode
static int hashCode(byte[] bytes)
Definition: Internal.java:278
com.google.protobuf.Internal.ListAdapter.fromList
final List< F > fromList
Definition: Internal.java:401
com.google.protobuf.Internal.MapAdapter.EntryAdapter.equals
boolean equals(Object o)
Definition: Internal.java:545
com.google.protobuf.Internal.EMPTY_CODED_INPUT_STREAM
static final CodedInputStream EMPTY_CODED_INPUT_STREAM
Definition: Internal.java:381
com.google.protobuf.Internal.hashLong
static int hashLong(long n)
Definition: Internal.java:224
buffer
Definition: buffer_processor.h:43
F
#define F(msg, field)
Definition: ruby/ext/google/protobuf_c/upb.c:9347
source
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:3072
com.google.protobuf.Internal.BooleanList
Definition: Internal.java:611
com.google.protobuf.Internal.MapAdapter.put
V put(K key, V value)
Definition: Internal.java:464
com.google.protobuf.Internal.IntList.getInt
int getInt(int index)
com.google.protobuf.Internal.isValidUtf8
static boolean isValidUtf8(byte[] byteArray)
Definition: Internal.java:180
key
const SETUP_TEARDOWN_TESTCONTEXT char * key
Definition: test_wss_transport.cpp:10
com.google.protobuf.Internal.EnumVerifier
Definition: Internal.java:215
com.google.protobuf.Internal.MapAdapter.valueConverter
final Converter< RealValue, V > valueConverter
Definition: Internal.java:446
com.google.protobuf.Internal.MapAdapter.SetAdapter.SetAdapter
SetAdapter(Set< Map.Entry< K, RealValue >> realSet)
Definition: Internal.java:480
n
GLdouble n
Definition: glcorearb.h:4153
com.google.protobuf.Internal.isValidUtf8
static boolean isValidUtf8(ByteString byteString)
Definition: Internal.java:175
i
int i
Definition: gmock-matchers_test.cc:764
java
com.google.protobuf.Internal.ListAdapter.Converter
Definition: Internal.java:397
com.google.protobuf.Internal.DoubleList.setDouble
double setDouble(int index, double element)
com.google.protobuf.Internal.MapAdapter.IteratorAdapter.hasNext
boolean hasNext()
Definition: Internal.java:503
com.google.protobuf.Internal.ListAdapter.ListAdapter
ListAdapter(List< F > fromList, Converter< F, T > converter)
Definition: Internal.java:404
com.google.protobuf.Internal.ListAdapter
Definition: Internal.java:395
com.google.protobuf.Internal.IntList.setInt
int setInt(int index, int element)
com.google.protobuf.Internal.MapAdapter.Converter
Definition: Internal.java:423
com.google.protobuf.Internal.getDefaultInstance
static< T extends MessageLite > T getDefaultInstance(Class< T > clazz)
Definition: Internal.java:364
com.google.protobuf.Internal.BooleanList.mutableCopyWithCapacity
BooleanList mutableCopyWithCapacity(int capacity)
com.google.protobuf.Internal.LongList.getLong
long getLong(int index)
com.google.protobuf.Internal.ProtobufList
Definition: Internal.java:570
com.google.protobuf.Internal.BooleanList.addBoolean
void addBoolean(boolean element)
com.google.protobuf.Internal.ListAdapter.Converter.convert
T convert(F from)
com.google.protobuf.Internal.hashCodeByteBuffer
static int hashCodeByteBuffer(List< ByteBuffer > list)
Definition: Internal.java:328
com.google.protobuf.Internal.DoubleList.mutableCopyWithCapacity
DoubleList mutableCopyWithCapacity(int capacity)
com.google.protobuf.Internal.IntList
Definition: Internal.java:591
com.google.protobuf.Internal.MapAdapter.MapAdapter
MapAdapter(Map< K, RealValue > realMap, Converter< RealValue, V > valueConverter)
Definition: Internal.java:448
com.google.protobuf.Internal.IntList.addInt
void addInt(int element)
com.google.protobuf.Internal.MapAdapter.EntryAdapter.realEntry
final Map.Entry< K, RealValue > realEntry
Definition: Internal.java:519
com.google.protobuf.Internal
Definition: Internal.java:54
com.google.protobuf.Internal.equalsByteBuffer
static boolean equalsByteBuffer(List< ByteBuffer > a, List< ByteBuffer > b)
Definition: Internal.java:315
com.google.protobuf.Internal.MapAdapter.IteratorAdapter
Definition: Internal.java:495
com.google.protobuf.Internal.equals
static boolean equals(List< byte[]> a, List< byte[]> b)
Definition: Internal.java:258
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
com.google.protobuf.Internal.DoubleList
Definition: Internal.java:651
com.google.protobuf.Internal.EnumLite.getNumber
int getNumber()
com.google.protobuf.Internal.LongList.setLong
long setLong(int index, long element)
com.google.protobuf.Internal.toByteArray
static byte[] toByteArray(String value)
Definition: Internal.java:185
index
GLuint index
Definition: glcorearb.h:3055
com.google.protobuf.Internal.IntList.mutableCopyWithCapacity
IntList mutableCopyWithCapacity(int capacity)
a
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:3228
com.google.protobuf.Internal.LongList.addLong
void addLong(long element)
com.google.protobuf.Internal.MapAdapter.EntryAdapter.getValue
V getValue()
Definition: Internal.java:531
com.google.protobuf.Internal.ListAdapter.size
int size()
Definition: Internal.java:415
number
double number
Definition: cJSON.h:326
com.google.protobuf.Internal.MapAdapter.IteratorAdapter.realIterator
final Iterator< Map.Entry< K, RealValue > > realIterator
Definition: Internal.java:496
message
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glcorearb.h:2695
com.google.protobuf.Internal.ProtobufList.isModifiable
boolean isModifiable()
google::protobuf::method
const Descriptor::ReservedRange const EnumValueDescriptor method
Definition: src/google/protobuf/descriptor.h:1973
h
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:4147
com.google.protobuf.MessageLite
Definition: MessageLite.java:65
com.google.protobuf.Internal.MapAdapter
Definition: Internal.java:421
com.google.protobuf.ByteString
Definition: ByteString.java:67


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