| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 public static final int TYPE_GROUP = 10; | 60 public static final int TYPE_GROUP = 10; |
| 61 public static final int TYPE_MESSAGE = 11; | 61 public static final int TYPE_MESSAGE = 11; |
| 62 public static final int TYPE_BYTES = 12; | 62 public static final int TYPE_BYTES = 12; |
| 63 public static final int TYPE_UINT32 = 13; | 63 public static final int TYPE_UINT32 = 13; |
| 64 public static final int TYPE_ENUM = 14; | 64 public static final int TYPE_ENUM = 14; |
| 65 public static final int TYPE_SFIXED32 = 15; | 65 public static final int TYPE_SFIXED32 = 15; |
| 66 public static final int TYPE_SFIXED64 = 16; | 66 public static final int TYPE_SFIXED64 = 16; |
| 67 public static final int TYPE_SINT32 = 17; | 67 public static final int TYPE_SINT32 = 17; |
| 68 public static final int TYPE_SINT64 = 18; | 68 public static final int TYPE_SINT64 = 18; |
| 69 | 69 |
| 70 protected static final Charset UTF_8 = Charset.forName("UTF-8"); | 70 static final Charset UTF_8 = Charset.forName("UTF-8"); |
| 71 protected static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); | 71 static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); |
| 72 | 72 |
| 73 private InternalNano() {} | 73 private InternalNano() {} |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * An object to provide synchronization when lazily initializing static fields | 76 * An object to provide synchronization when lazily initializing static fields |
| 77 * of {@link MessageNano} subclasses. | 77 * of {@link MessageNano} subclasses. |
| 78 * <p> | 78 * <p> |
| 79 * To enable earlier versions of ProGuard to inline short methods from a | 79 * To enable earlier versions of ProGuard to inline short methods from a |
| 80 * generated MessageNano subclass to the call sites, that class must not have | 80 * generated MessageNano subclass to the call sites, that class must not have |
| 81 * a class initializer, which will be created if there is any static variable | 81 * a class initializer, which will be created if there is any static variable |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 538 } |
| 539 | 539 |
| 540 // This avoids having to make FieldArray public. | 540 // This avoids having to make FieldArray public. |
| 541 public static void cloneUnknownFieldData(ExtendableMessageNano original, | 541 public static void cloneUnknownFieldData(ExtendableMessageNano original, |
| 542 ExtendableMessageNano cloned) { | 542 ExtendableMessageNano cloned) { |
| 543 if (original.unknownFieldData != null) { | 543 if (original.unknownFieldData != null) { |
| 544 cloned.unknownFieldData = (FieldArray) original.unknownFieldData.clone(); | 544 cloned.unknownFieldData = (FieldArray) original.unknownFieldData.clone(); |
| 545 } | 545 } |
| 546 } | 546 } |
| 547 } | 547 } |
| OLD | NEW |