Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.FilterInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class AbstractMessageLite implements MessageLite {
|
||||
protected int memoizedHashCode = 0;
|
||||
|
||||
public UninitializedMessageException newUninitializedMessageException() {
|
||||
return new UninitializedMessageException(this);
|
||||
}
|
||||
|
||||
public void writeDelimitedTo(OutputStream outputStream) throws IOException {
|
||||
int serializedSize = getSerializedSize();
|
||||
CodedOutputStream newInstance = CodedOutputStream.newInstance(outputStream, CodedOutputStream.computePreferredBufferSize(CodedOutputStream.computeRawVarint32Size(serializedSize) + serializedSize));
|
||||
newInstance.writeRawVarint32(serializedSize);
|
||||
writeTo(newInstance);
|
||||
newInstance.flush();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder<BuilderType extends Builder> implements MessageLite.Builder {
|
||||
public static UninitializedMessageException newUninitializedMessageException(MessageLite messageLite) {
|
||||
return new UninitializedMessageException(messageLite);
|
||||
}
|
||||
|
||||
@Override //
|
||||
/* renamed from: clone */
|
||||
public abstract BuilderType mo1392clone();
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.MessageLite.Builder
|
||||
public abstract BuilderType mergeFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class LimitedInputStream extends FilterInputStream {
|
||||
private int limit;
|
||||
|
||||
public LimitedInputStream(InputStream inputStream, int i) {
|
||||
super(inputStream);
|
||||
this.limit = i;
|
||||
}
|
||||
|
||||
@Override // java.io.FilterInputStream, java.io.InputStream
|
||||
public int available() throws IOException {
|
||||
return Math.min(super.available(), this.limit);
|
||||
}
|
||||
|
||||
@Override // java.io.FilterInputStream, java.io.InputStream
|
||||
public int read() throws IOException {
|
||||
if (this.limit <= 0) {
|
||||
return -1;
|
||||
}
|
||||
int read = super.read();
|
||||
if (read >= 0) {
|
||||
this.limit--;
|
||||
}
|
||||
return read;
|
||||
}
|
||||
|
||||
@Override // java.io.FilterInputStream, java.io.InputStream
|
||||
public long skip(long j4) throws IOException {
|
||||
long skip = super.skip(Math.min(j4, this.limit));
|
||||
if (skip >= 0) {
|
||||
this.limit = (int) (this.limit - skip);
|
||||
}
|
||||
return skip;
|
||||
}
|
||||
|
||||
@Override // java.io.FilterInputStream, java.io.InputStream
|
||||
public int read(byte[] bArr, int i, int i4) throws IOException {
|
||||
int i5 = this.limit;
|
||||
if (i5 <= 0) {
|
||||
return -1;
|
||||
}
|
||||
int read = super.read(bArr, i, Math.min(i4, i5));
|
||||
if (read >= 0) {
|
||||
this.limit -= read;
|
||||
}
|
||||
return read;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.AbstractMessageLite;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class AbstractParser<MessageType extends MessageLite> implements Parser<MessageType> {
|
||||
private static final ExtensionRegistryLite EMPTY_REGISTRY = ExtensionRegistryLite.getEmptyRegistry();
|
||||
|
||||
private MessageType checkMessageInitialized(MessageType messagetype) throws InvalidProtocolBufferException {
|
||||
if (messagetype == null || messagetype.isInitialized()) {
|
||||
return messagetype;
|
||||
}
|
||||
throw newUninitializedMessageException(messagetype).asInvalidProtocolBufferException().setUnfinishedMessage(messagetype);
|
||||
}
|
||||
|
||||
private UninitializedMessageException newUninitializedMessageException(MessageType messagetype) {
|
||||
return messagetype instanceof AbstractMessageLite ? ((AbstractMessageLite) messagetype).newUninitializedMessageException() : new UninitializedMessageException(messagetype);
|
||||
}
|
||||
|
||||
public MessageType parsePartialDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
try {
|
||||
int read = inputStream.read();
|
||||
if (read == -1) {
|
||||
return null;
|
||||
}
|
||||
return parsePartialFrom(new AbstractMessageLite.Builder.LimitedInputStream(inputStream, CodedInputStream.readRawVarint32(read, inputStream)), extensionRegistryLite);
|
||||
} catch (IOException e4) {
|
||||
throw new InvalidProtocolBufferException(e4.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public MessageType parsePartialFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
CodedInputStream newCodedInput = byteString.newCodedInput();
|
||||
MessageType messagetype = (MessageType) parsePartialFrom(newCodedInput, extensionRegistryLite);
|
||||
try {
|
||||
newCodedInput.checkLastTagWas(0);
|
||||
return messagetype;
|
||||
} catch (InvalidProtocolBufferException e4) {
|
||||
throw e4.setUnfinishedMessage(messagetype);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.Parser
|
||||
public MessageType parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
return checkMessageInitialized(parsePartialDelimitedFrom(inputStream, extensionRegistryLite));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.Parser
|
||||
public MessageType parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
return checkMessageInitialized(parsePartialFrom(byteString, extensionRegistryLite));
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.Parser
|
||||
public MessageType parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
return checkMessageInitialized(parsePartialFrom(inputStream, extensionRegistryLite));
|
||||
}
|
||||
|
||||
public MessageType parsePartialFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException {
|
||||
CodedInputStream newInstance = CodedInputStream.newInstance(inputStream);
|
||||
MessageType messagetype = (MessageType) parsePartialFrom(newInstance, extensionRegistryLite);
|
||||
try {
|
||||
newInstance.checkLastTagWas(0);
|
||||
return messagetype;
|
||||
} catch (InvalidProtocolBufferException e4) {
|
||||
throw e4.setUnfinishedMessage(messagetype);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.ByteString;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class BoundedByteString extends LiteralByteString {
|
||||
private final int bytesLength;
|
||||
private final int bytesOffset;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class BoundedByteIterator implements ByteString.ByteIterator {
|
||||
private final int limit;
|
||||
private int position;
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.position < this.limit;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString.ByteIterator
|
||||
public byte nextByte() {
|
||||
int i = this.position;
|
||||
if (i >= this.limit) {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
byte[] bArr = BoundedByteString.this.bytes;
|
||||
this.position = i + 1;
|
||||
return bArr[i];
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private BoundedByteIterator() {
|
||||
int offsetIntoBytes = BoundedByteString.this.getOffsetIntoBytes();
|
||||
this.position = offsetIntoBytes;
|
||||
this.limit = offsetIntoBytes + BoundedByteString.this.size();
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // java.util.Iterator
|
||||
public Byte next() {
|
||||
return Byte.valueOf(nextByte());
|
||||
}
|
||||
}
|
||||
|
||||
public BoundedByteString(byte[] bArr, int i, int i4) {
|
||||
super(bArr);
|
||||
if (i < 0) {
|
||||
StringBuilder sb = new StringBuilder(29);
|
||||
sb.append("Offset too small: ");
|
||||
sb.append(i);
|
||||
throw new IllegalArgumentException(sb.toString());
|
||||
}
|
||||
if (i4 < 0) {
|
||||
StringBuilder sb2 = new StringBuilder(29);
|
||||
sb2.append("Length too small: ");
|
||||
sb2.append(i);
|
||||
throw new IllegalArgumentException(sb2.toString());
|
||||
}
|
||||
if (i + i4 <= bArr.length) {
|
||||
this.bytesOffset = i;
|
||||
this.bytesLength = i4;
|
||||
return;
|
||||
}
|
||||
StringBuilder sb3 = new StringBuilder(48);
|
||||
sb3.append("Offset+Length too large: ");
|
||||
sb3.append(i);
|
||||
sb3.append("+");
|
||||
sb3.append(i4);
|
||||
throw new IllegalArgumentException(sb3.toString());
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LiteralByteString
|
||||
public byte byteAt(int i) {
|
||||
if (i < 0) {
|
||||
StringBuilder sb = new StringBuilder(28);
|
||||
sb.append("Index too small: ");
|
||||
sb.append(i);
|
||||
throw new ArrayIndexOutOfBoundsException(sb.toString());
|
||||
}
|
||||
if (i < size()) {
|
||||
return this.bytes[this.bytesOffset + i];
|
||||
}
|
||||
int size = size();
|
||||
StringBuilder sb2 = new StringBuilder(41);
|
||||
sb2.append("Index too large: ");
|
||||
sb2.append(i);
|
||||
sb2.append(", ");
|
||||
sb2.append(size);
|
||||
throw new ArrayIndexOutOfBoundsException(sb2.toString());
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LiteralByteString, kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public void copyToInternal(byte[] bArr, int i, int i4, int i5) {
|
||||
System.arraycopy(this.bytes, getOffsetIntoBytes() + i, bArr, i4, i5);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LiteralByteString
|
||||
public int getOffsetIntoBytes() {
|
||||
return this.bytesOffset;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LiteralByteString, kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int size() {
|
||||
return this.bytesLength;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LiteralByteString, kotlin.reflect.jvm.internal.impl.protobuf.ByteString, java.lang.Iterable
|
||||
public Iterator<Byte> iterator() {
|
||||
return new BoundedByteIterator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class ByteString implements Iterable<Byte> {
|
||||
static final /* synthetic */ boolean $assertionsDisabled = false;
|
||||
public static final ByteString EMPTY = new LiteralByteString(new byte[0]);
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ByteIterator extends Iterator<Byte> {
|
||||
byte nextByte();
|
||||
}
|
||||
|
||||
private static ByteString balancedConcat(Iterator<ByteString> it, int i) {
|
||||
if (i == 1) {
|
||||
return it.next();
|
||||
}
|
||||
int i4 = i >>> 1;
|
||||
return balancedConcat(it, i4).concat(balancedConcat(it, i - i4));
|
||||
}
|
||||
|
||||
public static ByteString copyFrom(byte[] bArr, int i, int i4) {
|
||||
byte[] bArr2 = new byte[i4];
|
||||
System.arraycopy(bArr, i, bArr2, 0, i4);
|
||||
return new LiteralByteString(bArr2);
|
||||
}
|
||||
|
||||
public static ByteString copyFromUtf8(String str) {
|
||||
try {
|
||||
return new LiteralByteString(str.getBytes("UTF-8"));
|
||||
} catch (UnsupportedEncodingException e4) {
|
||||
throw new RuntimeException("UTF-8 not supported?", e4);
|
||||
}
|
||||
}
|
||||
|
||||
public static Output newOutput() {
|
||||
return new Output(128);
|
||||
}
|
||||
|
||||
public ByteString concat(ByteString byteString) {
|
||||
int size = size();
|
||||
int size2 = byteString.size();
|
||||
if (size + size2 < 2147483647L) {
|
||||
return RopeByteString.concatenate(this, byteString);
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(53);
|
||||
sb.append("ByteString would be too long: ");
|
||||
sb.append(size);
|
||||
sb.append("+");
|
||||
sb.append(size2);
|
||||
throw new IllegalArgumentException(sb.toString());
|
||||
}
|
||||
|
||||
public void copyTo(byte[] bArr, int i, int i4, int i5) {
|
||||
if (i < 0) {
|
||||
StringBuilder sb = new StringBuilder(30);
|
||||
sb.append("Source offset < 0: ");
|
||||
sb.append(i);
|
||||
throw new IndexOutOfBoundsException(sb.toString());
|
||||
}
|
||||
if (i4 < 0) {
|
||||
StringBuilder sb2 = new StringBuilder(30);
|
||||
sb2.append("Target offset < 0: ");
|
||||
sb2.append(i4);
|
||||
throw new IndexOutOfBoundsException(sb2.toString());
|
||||
}
|
||||
if (i5 < 0) {
|
||||
StringBuilder sb3 = new StringBuilder(23);
|
||||
sb3.append("Length < 0: ");
|
||||
sb3.append(i5);
|
||||
throw new IndexOutOfBoundsException(sb3.toString());
|
||||
}
|
||||
int i6 = i + i5;
|
||||
if (i6 > size()) {
|
||||
StringBuilder sb4 = new StringBuilder(34);
|
||||
sb4.append("Source end offset < 0: ");
|
||||
sb4.append(i6);
|
||||
throw new IndexOutOfBoundsException(sb4.toString());
|
||||
}
|
||||
int i7 = i4 + i5;
|
||||
if (i7 <= bArr.length) {
|
||||
if (i5 > 0) {
|
||||
copyToInternal(bArr, i, i4, i5);
|
||||
}
|
||||
} else {
|
||||
StringBuilder sb5 = new StringBuilder(34);
|
||||
sb5.append("Target end offset < 0: ");
|
||||
sb5.append(i7);
|
||||
throw new IndexOutOfBoundsException(sb5.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void copyToInternal(byte[] bArr, int i, int i4, int i5);
|
||||
|
||||
public abstract int getTreeDepth();
|
||||
|
||||
public abstract boolean isBalanced();
|
||||
|
||||
public boolean isEmpty() {
|
||||
return size() == 0;
|
||||
}
|
||||
|
||||
public abstract boolean isValidUtf8();
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // java.lang.Iterable
|
||||
public abstract Iterator<Byte> iterator();
|
||||
|
||||
public abstract CodedInputStream newCodedInput();
|
||||
|
||||
public abstract int partialHash(int i, int i4, int i5);
|
||||
|
||||
public abstract int partialIsValidUtf8(int i, int i4, int i5);
|
||||
|
||||
public abstract int peekCachedHashCode();
|
||||
|
||||
public abstract int size();
|
||||
|
||||
public byte[] toByteArray() {
|
||||
int size = size();
|
||||
if (size == 0) {
|
||||
return Internal.EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
byte[] bArr = new byte[size];
|
||||
copyToInternal(bArr, 0, 0, size);
|
||||
return bArr;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return String.format("<ByteString@%s size=%d>", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size()));
|
||||
}
|
||||
|
||||
public abstract String toString(String str) throws UnsupportedEncodingException;
|
||||
|
||||
public String toStringUtf8() {
|
||||
try {
|
||||
return toString("UTF-8");
|
||||
} catch (UnsupportedEncodingException e4) {
|
||||
throw new RuntimeException("UTF-8 not supported?", e4);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeTo(OutputStream outputStream, int i, int i4) throws IOException {
|
||||
if (i < 0) {
|
||||
StringBuilder sb = new StringBuilder(30);
|
||||
sb.append("Source offset < 0: ");
|
||||
sb.append(i);
|
||||
throw new IndexOutOfBoundsException(sb.toString());
|
||||
}
|
||||
if (i4 < 0) {
|
||||
StringBuilder sb2 = new StringBuilder(23);
|
||||
sb2.append("Length < 0: ");
|
||||
sb2.append(i4);
|
||||
throw new IndexOutOfBoundsException(sb2.toString());
|
||||
}
|
||||
int i5 = i + i4;
|
||||
if (i5 <= size()) {
|
||||
if (i4 > 0) {
|
||||
writeToInternal(outputStream, i, i4);
|
||||
}
|
||||
} else {
|
||||
StringBuilder sb3 = new StringBuilder(39);
|
||||
sb3.append("Source end offset exceeded: ");
|
||||
sb3.append(i5);
|
||||
throw new IndexOutOfBoundsException(sb3.toString());
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void writeToInternal(OutputStream outputStream, int i, int i4) throws IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class Output extends OutputStream {
|
||||
private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
|
||||
private byte[] buffer;
|
||||
private int bufferPos;
|
||||
private final ArrayList<ByteString> flushedBuffers;
|
||||
private int flushedBuffersTotalBytes;
|
||||
private final int initialCapacity;
|
||||
|
||||
public Output(int i) {
|
||||
if (i < 0) {
|
||||
throw new IllegalArgumentException("Buffer size < 0");
|
||||
}
|
||||
this.initialCapacity = i;
|
||||
this.flushedBuffers = new ArrayList<>();
|
||||
this.buffer = new byte[i];
|
||||
}
|
||||
|
||||
private byte[] copyArray(byte[] bArr, int i) {
|
||||
byte[] bArr2 = new byte[i];
|
||||
System.arraycopy(bArr, 0, bArr2, 0, Math.min(bArr.length, i));
|
||||
return bArr2;
|
||||
}
|
||||
|
||||
private void flushFullBuffer(int i) {
|
||||
this.flushedBuffers.add(new LiteralByteString(this.buffer));
|
||||
int length = this.flushedBuffersTotalBytes + this.buffer.length;
|
||||
this.flushedBuffersTotalBytes = length;
|
||||
this.buffer = new byte[Math.max(this.initialCapacity, Math.max(i, length >>> 1))];
|
||||
this.bufferPos = 0;
|
||||
}
|
||||
|
||||
private void flushLastBuffer() {
|
||||
int i = this.bufferPos;
|
||||
byte[] bArr = this.buffer;
|
||||
if (i >= bArr.length) {
|
||||
this.flushedBuffers.add(new LiteralByteString(this.buffer));
|
||||
this.buffer = EMPTY_BYTE_ARRAY;
|
||||
} else if (i > 0) {
|
||||
this.flushedBuffers.add(new LiteralByteString(copyArray(bArr, i)));
|
||||
}
|
||||
this.flushedBuffersTotalBytes += this.bufferPos;
|
||||
this.bufferPos = 0;
|
||||
}
|
||||
|
||||
public synchronized int size() {
|
||||
return this.flushedBuffersTotalBytes + this.bufferPos;
|
||||
}
|
||||
|
||||
public synchronized ByteString toByteString() {
|
||||
flushLastBuffer();
|
||||
return ByteString.copyFrom(this.flushedBuffers);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return String.format("<ByteString.Output@%s size=%d>", Integer.toHexString(System.identityHashCode(this)), Integer.valueOf(size()));
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream
|
||||
public synchronized void write(int i) {
|
||||
try {
|
||||
if (this.bufferPos == this.buffer.length) {
|
||||
flushFullBuffer(1);
|
||||
}
|
||||
byte[] bArr = this.buffer;
|
||||
int i4 = this.bufferPos;
|
||||
this.bufferPos = i4 + 1;
|
||||
bArr[i4] = (byte) i;
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.io.OutputStream
|
||||
public synchronized void write(byte[] bArr, int i, int i4) {
|
||||
try {
|
||||
byte[] bArr2 = this.buffer;
|
||||
int length = bArr2.length;
|
||||
int i5 = this.bufferPos;
|
||||
if (i4 <= length - i5) {
|
||||
System.arraycopy(bArr, i, bArr2, i5, i4);
|
||||
this.bufferPos += i4;
|
||||
} else {
|
||||
int length2 = bArr2.length - i5;
|
||||
System.arraycopy(bArr, i, bArr2, i5, length2);
|
||||
int i6 = i4 - length2;
|
||||
flushFullBuffer(i6);
|
||||
System.arraycopy(bArr, i + length2, this.buffer, 0, i6);
|
||||
this.bufferPos = i6;
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ByteString copyFrom(byte[] bArr) {
|
||||
return copyFrom(bArr, 0, bArr.length);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Type inference failed for: r0v2, types: [java.util.Collection] */
|
||||
/* JADX WARN: Type inference failed for: r0v3, types: [java.util.Collection] */
|
||||
/* JADX WARN: Type inference failed for: r0v5, types: [java.util.ArrayList] */
|
||||
public static ByteString copyFrom(Iterable<ByteString> iterable) {
|
||||
?? r02;
|
||||
if (!(iterable instanceof Collection)) {
|
||||
r02 = new ArrayList();
|
||||
Iterator<ByteString> it = iterable.iterator();
|
||||
while (it.hasNext()) {
|
||||
r02.add(it.next());
|
||||
}
|
||||
} else {
|
||||
r02 = (Collection) iterable;
|
||||
}
|
||||
if (r02.isEmpty()) {
|
||||
return EMPTY;
|
||||
}
|
||||
return balancedConcat(r02.iterator(), r02.size());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,724 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import kotlin.UByte;
|
||||
import kotlin.io.ConstantsKt;
|
||||
import kotlin.jvm.internal.ByteCompanionObject;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
|
||||
import kotlinx.coroutines.scheduling.WorkQueueKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class CodedInputStream {
|
||||
private final byte[] buffer;
|
||||
private final boolean bufferIsImmutable;
|
||||
private int bufferPos;
|
||||
private int bufferSize;
|
||||
private int bufferSizeAfterLimit;
|
||||
private int currentLimit;
|
||||
private boolean enableAliasing;
|
||||
private final InputStream input;
|
||||
private int lastTag;
|
||||
private int recursionDepth;
|
||||
private int recursionLimit;
|
||||
private RefillCallback refillCallback;
|
||||
private int sizeLimit;
|
||||
private int totalBytesRetired;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface RefillCallback {
|
||||
void onRefill();
|
||||
}
|
||||
|
||||
private CodedInputStream(InputStream inputStream) {
|
||||
this.enableAliasing = false;
|
||||
this.currentLimit = Integer.MAX_VALUE;
|
||||
this.recursionLimit = 64;
|
||||
this.sizeLimit = 67108864;
|
||||
this.refillCallback = null;
|
||||
this.buffer = new byte[ConstantsKt.DEFAULT_BLOCK_SIZE];
|
||||
this.bufferSize = 0;
|
||||
this.bufferPos = 0;
|
||||
this.totalBytesRetired = 0;
|
||||
this.input = inputStream;
|
||||
this.bufferIsImmutable = false;
|
||||
}
|
||||
|
||||
public static int decodeZigZag32(int i) {
|
||||
return (-(i & 1)) ^ (i >>> 1);
|
||||
}
|
||||
|
||||
public static long decodeZigZag64(long j4) {
|
||||
return (-(j4 & 1)) ^ (j4 >>> 1);
|
||||
}
|
||||
|
||||
private void ensureAvailable(int i) throws IOException {
|
||||
if (this.bufferSize - this.bufferPos < i) {
|
||||
refillBuffer(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static CodedInputStream newInstance(InputStream inputStream) {
|
||||
return new CodedInputStream(inputStream);
|
||||
}
|
||||
|
||||
private byte[] readRawBytesSlowPath(int i) throws IOException {
|
||||
if (i <= 0) {
|
||||
if (i == 0) {
|
||||
return Internal.EMPTY_BYTE_ARRAY;
|
||||
}
|
||||
throw InvalidProtocolBufferException.negativeSize();
|
||||
}
|
||||
int i4 = this.totalBytesRetired;
|
||||
int i5 = this.bufferPos;
|
||||
int i6 = i4 + i5 + i;
|
||||
int i7 = this.currentLimit;
|
||||
if (i6 > i7) {
|
||||
skipRawBytes((i7 - i4) - i5);
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
if (i < 4096) {
|
||||
byte[] bArr = new byte[i];
|
||||
int i8 = this.bufferSize - i5;
|
||||
System.arraycopy(this.buffer, i5, bArr, 0, i8);
|
||||
this.bufferPos = this.bufferSize;
|
||||
int i9 = i - i8;
|
||||
ensureAvailable(i9);
|
||||
System.arraycopy(this.buffer, 0, bArr, i8, i9);
|
||||
this.bufferPos = i9;
|
||||
return bArr;
|
||||
}
|
||||
int i10 = this.bufferSize;
|
||||
this.totalBytesRetired = i4 + i10;
|
||||
this.bufferPos = 0;
|
||||
this.bufferSize = 0;
|
||||
int i11 = i10 - i5;
|
||||
int i12 = i - i11;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
while (i12 > 0) {
|
||||
int min = Math.min(i12, ConstantsKt.DEFAULT_BLOCK_SIZE);
|
||||
byte[] bArr2 = new byte[min];
|
||||
int i13 = 0;
|
||||
while (i13 < min) {
|
||||
InputStream inputStream = this.input;
|
||||
int read = inputStream == null ? -1 : inputStream.read(bArr2, i13, min - i13);
|
||||
if (read == -1) {
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
this.totalBytesRetired += read;
|
||||
i13 += read;
|
||||
}
|
||||
i12 -= min;
|
||||
arrayList.add(bArr2);
|
||||
}
|
||||
byte[] bArr3 = new byte[i];
|
||||
System.arraycopy(this.buffer, i5, bArr3, 0, i11);
|
||||
Iterator it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
byte[] bArr4 = (byte[]) it.next();
|
||||
System.arraycopy(bArr4, 0, bArr3, i11, bArr4.length);
|
||||
i11 += bArr4.length;
|
||||
}
|
||||
return bArr3;
|
||||
}
|
||||
|
||||
private void recomputeBufferSizeAfterLimit() {
|
||||
int i = this.bufferSize + this.bufferSizeAfterLimit;
|
||||
this.bufferSize = i;
|
||||
int i4 = this.totalBytesRetired + i;
|
||||
int i5 = this.currentLimit;
|
||||
if (i4 <= i5) {
|
||||
this.bufferSizeAfterLimit = 0;
|
||||
return;
|
||||
}
|
||||
int i6 = i4 - i5;
|
||||
this.bufferSizeAfterLimit = i6;
|
||||
this.bufferSize = i - i6;
|
||||
}
|
||||
|
||||
private void refillBuffer(int i) throws IOException {
|
||||
if (!tryRefillBuffer(i)) {
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
}
|
||||
|
||||
private void skipRawBytesSlowPath(int i) throws IOException {
|
||||
if (i < 0) {
|
||||
throw InvalidProtocolBufferException.negativeSize();
|
||||
}
|
||||
int i4 = this.totalBytesRetired;
|
||||
int i5 = this.bufferPos;
|
||||
int i6 = i4 + i5 + i;
|
||||
int i7 = this.currentLimit;
|
||||
if (i6 > i7) {
|
||||
skipRawBytes((i7 - i4) - i5);
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
int i8 = this.bufferSize;
|
||||
int i9 = i8 - i5;
|
||||
this.bufferPos = i8;
|
||||
refillBuffer(1);
|
||||
while (true) {
|
||||
int i10 = i - i9;
|
||||
int i11 = this.bufferSize;
|
||||
if (i10 <= i11) {
|
||||
this.bufferPos = i10;
|
||||
return;
|
||||
} else {
|
||||
i9 += i11;
|
||||
this.bufferPos = i11;
|
||||
refillBuffer(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean tryRefillBuffer(int i) throws IOException {
|
||||
int i4 = this.bufferPos;
|
||||
if (i4 + i <= this.bufferSize) {
|
||||
StringBuilder sb = new StringBuilder(77);
|
||||
sb.append("refillBuffer() called when ");
|
||||
sb.append(i);
|
||||
sb.append(" bytes were already available in buffer");
|
||||
throw new IllegalStateException(sb.toString());
|
||||
}
|
||||
if (this.totalBytesRetired + i4 + i > this.currentLimit) {
|
||||
return false;
|
||||
}
|
||||
RefillCallback refillCallback = this.refillCallback;
|
||||
if (refillCallback != null) {
|
||||
refillCallback.onRefill();
|
||||
}
|
||||
if (this.input != null) {
|
||||
int i5 = this.bufferPos;
|
||||
if (i5 > 0) {
|
||||
int i6 = this.bufferSize;
|
||||
if (i6 > i5) {
|
||||
byte[] bArr = this.buffer;
|
||||
System.arraycopy(bArr, i5, bArr, 0, i6 - i5);
|
||||
}
|
||||
this.totalBytesRetired += i5;
|
||||
this.bufferSize -= i5;
|
||||
this.bufferPos = 0;
|
||||
}
|
||||
InputStream inputStream = this.input;
|
||||
byte[] bArr2 = this.buffer;
|
||||
int i7 = this.bufferSize;
|
||||
int read = inputStream.read(bArr2, i7, bArr2.length - i7);
|
||||
if (read == 0 || read < -1 || read > this.buffer.length) {
|
||||
StringBuilder sb2 = new StringBuilder(102);
|
||||
sb2.append("InputStream#read(byte[]) returned invalid result: ");
|
||||
sb2.append(read);
|
||||
sb2.append("\nThe InputStream implementation is buggy.");
|
||||
throw new IllegalStateException(sb2.toString());
|
||||
}
|
||||
if (read > 0) {
|
||||
this.bufferSize += read;
|
||||
if ((this.totalBytesRetired + i) - this.sizeLimit > 0) {
|
||||
throw InvalidProtocolBufferException.sizeLimitExceeded();
|
||||
}
|
||||
recomputeBufferSizeAfterLimit();
|
||||
if (this.bufferSize >= i) {
|
||||
return true;
|
||||
}
|
||||
return tryRefillBuffer(i);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void checkLastTagWas(int i) throws InvalidProtocolBufferException {
|
||||
if (this.lastTag != i) {
|
||||
throw InvalidProtocolBufferException.invalidEndTag();
|
||||
}
|
||||
}
|
||||
|
||||
public int getBytesUntilLimit() {
|
||||
int i = this.currentLimit;
|
||||
if (i == Integer.MAX_VALUE) {
|
||||
return -1;
|
||||
}
|
||||
return i - (this.totalBytesRetired + this.bufferPos);
|
||||
}
|
||||
|
||||
public boolean isAtEnd() throws IOException {
|
||||
return this.bufferPos == this.bufferSize && !tryRefillBuffer(1);
|
||||
}
|
||||
|
||||
public void popLimit(int i) {
|
||||
this.currentLimit = i;
|
||||
recomputeBufferSizeAfterLimit();
|
||||
}
|
||||
|
||||
public int pushLimit(int i) throws InvalidProtocolBufferException {
|
||||
if (i < 0) {
|
||||
throw InvalidProtocolBufferException.negativeSize();
|
||||
}
|
||||
int i4 = this.totalBytesRetired + this.bufferPos + i;
|
||||
int i5 = this.currentLimit;
|
||||
if (i4 > i5) {
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
this.currentLimit = i4;
|
||||
recomputeBufferSizeAfterLimit();
|
||||
return i5;
|
||||
}
|
||||
|
||||
public boolean readBool() throws IOException {
|
||||
return readRawVarint64() != 0;
|
||||
}
|
||||
|
||||
public ByteString readBytes() throws IOException {
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
int i = this.bufferSize;
|
||||
int i4 = this.bufferPos;
|
||||
if (readRawVarint32 > i - i4 || readRawVarint32 <= 0) {
|
||||
return readRawVarint32 == 0 ? ByteString.EMPTY : new LiteralByteString(readRawBytesSlowPath(readRawVarint32));
|
||||
}
|
||||
ByteString boundedByteString = (this.bufferIsImmutable && this.enableAliasing) ? new BoundedByteString(this.buffer, this.bufferPos, readRawVarint32) : ByteString.copyFrom(this.buffer, i4, readRawVarint32);
|
||||
this.bufferPos += readRawVarint32;
|
||||
return boundedByteString;
|
||||
}
|
||||
|
||||
public double readDouble() throws IOException {
|
||||
return Double.longBitsToDouble(readRawLittleEndian64());
|
||||
}
|
||||
|
||||
public int readEnum() throws IOException {
|
||||
return readRawVarint32();
|
||||
}
|
||||
|
||||
public int readFixed32() throws IOException {
|
||||
return readRawLittleEndian32();
|
||||
}
|
||||
|
||||
public long readFixed64() throws IOException {
|
||||
return readRawLittleEndian64();
|
||||
}
|
||||
|
||||
public float readFloat() throws IOException {
|
||||
return Float.intBitsToFloat(readRawLittleEndian32());
|
||||
}
|
||||
|
||||
public void readGroup(int i, MessageLite.Builder builder, ExtensionRegistryLite extensionRegistryLite) throws IOException {
|
||||
int i4 = this.recursionDepth;
|
||||
if (i4 >= this.recursionLimit) {
|
||||
throw InvalidProtocolBufferException.recursionLimitExceeded();
|
||||
}
|
||||
this.recursionDepth = i4 + 1;
|
||||
builder.mergeFrom(this, extensionRegistryLite);
|
||||
checkLastTagWas(WireFormat.makeTag(i, 4));
|
||||
this.recursionDepth--;
|
||||
}
|
||||
|
||||
public int readInt32() throws IOException {
|
||||
return readRawVarint32();
|
||||
}
|
||||
|
||||
public long readInt64() throws IOException {
|
||||
return readRawVarint64();
|
||||
}
|
||||
|
||||
public void readMessage(MessageLite.Builder builder, ExtensionRegistryLite extensionRegistryLite) throws IOException {
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
if (this.recursionDepth < this.recursionLimit) {
|
||||
int pushLimit = pushLimit(readRawVarint32);
|
||||
this.recursionDepth++;
|
||||
builder.mergeFrom(this, extensionRegistryLite);
|
||||
checkLastTagWas(0);
|
||||
this.recursionDepth--;
|
||||
popLimit(pushLimit);
|
||||
return;
|
||||
}
|
||||
throw InvalidProtocolBufferException.recursionLimitExceeded();
|
||||
}
|
||||
|
||||
public byte readRawByte() throws IOException {
|
||||
if (this.bufferPos == this.bufferSize) {
|
||||
refillBuffer(1);
|
||||
}
|
||||
byte[] bArr = this.buffer;
|
||||
int i = this.bufferPos;
|
||||
this.bufferPos = i + 1;
|
||||
return bArr[i];
|
||||
}
|
||||
|
||||
public int readRawLittleEndian32() throws IOException {
|
||||
int i = this.bufferPos;
|
||||
if (this.bufferSize - i < 4) {
|
||||
refillBuffer(4);
|
||||
i = this.bufferPos;
|
||||
}
|
||||
byte[] bArr = this.buffer;
|
||||
this.bufferPos = i + 4;
|
||||
return (bArr[i] & UByte.MAX_VALUE) | ((bArr[i + 1] & UByte.MAX_VALUE) << 8) | ((bArr[i + 2] & UByte.MAX_VALUE) << 16) | ((bArr[i + 3] & UByte.MAX_VALUE) << 24);
|
||||
}
|
||||
|
||||
public long readRawLittleEndian64() throws IOException {
|
||||
int i = this.bufferPos;
|
||||
if (this.bufferSize - i < 8) {
|
||||
refillBuffer(8);
|
||||
i = this.bufferPos;
|
||||
}
|
||||
byte[] bArr = this.buffer;
|
||||
this.bufferPos = i + 8;
|
||||
return ((bArr[i + 7] & 255) << 56) | (bArr[i] & 255) | ((bArr[i + 1] & 255) << 8) | ((bArr[i + 2] & 255) << 16) | ((bArr[i + 3] & 255) << 24) | ((bArr[i + 4] & 255) << 32) | ((bArr[i + 5] & 255) << 40) | ((bArr[i + 6] & 255) << 48);
|
||||
}
|
||||
|
||||
public int readRawVarint32() throws IOException {
|
||||
int i;
|
||||
int i4 = this.bufferPos;
|
||||
int i5 = this.bufferSize;
|
||||
if (i5 != i4) {
|
||||
byte[] bArr = this.buffer;
|
||||
int i6 = i4 + 1;
|
||||
byte b4 = bArr[i4];
|
||||
if (b4 >= 0) {
|
||||
this.bufferPos = i6;
|
||||
return b4;
|
||||
}
|
||||
if (i5 - i6 >= 9) {
|
||||
int i7 = i4 + 2;
|
||||
int i8 = (bArr[i6] << 7) ^ b4;
|
||||
long j4 = i8;
|
||||
if (j4 < 0) {
|
||||
i = (int) ((-128) ^ j4);
|
||||
} else {
|
||||
int i9 = i4 + 3;
|
||||
int i10 = (bArr[i7] << 14) ^ i8;
|
||||
long j5 = i10;
|
||||
if (j5 >= 0) {
|
||||
i = (int) (16256 ^ j5);
|
||||
} else {
|
||||
int i11 = i4 + 4;
|
||||
long j6 = i10 ^ (bArr[i9] << 21);
|
||||
if (j6 < 0) {
|
||||
i = (int) ((-2080896) ^ j6);
|
||||
} else {
|
||||
i9 = i4 + 5;
|
||||
int i12 = (int) ((r1 ^ (r3 << 28)) ^ 266354560);
|
||||
if (bArr[i11] < 0) {
|
||||
i11 = i4 + 6;
|
||||
if (bArr[i9] < 0) {
|
||||
i9 = i4 + 7;
|
||||
if (bArr[i11] < 0) {
|
||||
i11 = i4 + 8;
|
||||
if (bArr[i9] < 0) {
|
||||
i9 = i4 + 9;
|
||||
if (bArr[i11] < 0) {
|
||||
int i13 = i4 + 10;
|
||||
if (bArr[i9] >= 0) {
|
||||
i7 = i13;
|
||||
i = i12;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
i = i12;
|
||||
}
|
||||
i = i12;
|
||||
}
|
||||
i7 = i11;
|
||||
}
|
||||
i7 = i9;
|
||||
}
|
||||
this.bufferPos = i7;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return (int) readRawVarint64SlowPath();
|
||||
}
|
||||
|
||||
public long readRawVarint64() throws IOException {
|
||||
long j4;
|
||||
long j5;
|
||||
long j6;
|
||||
int i = this.bufferPos;
|
||||
int i4 = this.bufferSize;
|
||||
if (i4 != i) {
|
||||
byte[] bArr = this.buffer;
|
||||
int i5 = i + 1;
|
||||
byte b4 = bArr[i];
|
||||
if (b4 >= 0) {
|
||||
this.bufferPos = i5;
|
||||
return b4;
|
||||
}
|
||||
if (i4 - i5 >= 9) {
|
||||
int i6 = i + 2;
|
||||
long j7 = (bArr[i5] << 7) ^ b4;
|
||||
if (j7 >= 0) {
|
||||
int i7 = i + 3;
|
||||
long j8 = j7 ^ (bArr[i6] << 14);
|
||||
if (j8 >= 0) {
|
||||
j6 = 16256;
|
||||
} else {
|
||||
i6 = i + 4;
|
||||
j7 = j8 ^ (bArr[i7] << 21);
|
||||
if (j7 < 0) {
|
||||
j5 = -2080896;
|
||||
} else {
|
||||
i7 = i + 5;
|
||||
j8 = j7 ^ (bArr[i6] << 28);
|
||||
if (j8 >= 0) {
|
||||
j6 = 266354560;
|
||||
} else {
|
||||
i6 = i + 6;
|
||||
j7 = j8 ^ (bArr[i7] << 35);
|
||||
if (j7 < 0) {
|
||||
j5 = -34093383808L;
|
||||
} else {
|
||||
i7 = i + 7;
|
||||
j8 = j7 ^ (bArr[i6] << 42);
|
||||
if (j8 >= 0) {
|
||||
j6 = 4363953127296L;
|
||||
} else {
|
||||
i6 = i + 8;
|
||||
j7 = j8 ^ (bArr[i7] << 49);
|
||||
if (j7 < 0) {
|
||||
j5 = -558586000294016L;
|
||||
} else {
|
||||
i7 = i + 9;
|
||||
long j9 = (j7 ^ (bArr[i6] << 56)) ^ 71499008037633920L;
|
||||
if (j9 >= 0) {
|
||||
j4 = j9;
|
||||
i6 = i7;
|
||||
this.bufferPos = i6;
|
||||
return j4;
|
||||
}
|
||||
i6 = i + 10;
|
||||
if (bArr[i7] >= 0) {
|
||||
j4 = j9;
|
||||
this.bufferPos = i6;
|
||||
return j4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
j4 = j8 ^ j6;
|
||||
i6 = i7;
|
||||
this.bufferPos = i6;
|
||||
return j4;
|
||||
}
|
||||
j5 = -128;
|
||||
j4 = j7 ^ j5;
|
||||
this.bufferPos = i6;
|
||||
return j4;
|
||||
}
|
||||
}
|
||||
return readRawVarint64SlowPath();
|
||||
}
|
||||
|
||||
public long readRawVarint64SlowPath() throws IOException {
|
||||
long j4 = 0;
|
||||
for (int i = 0; i < 64; i += 7) {
|
||||
j4 |= (r3 & ByteCompanionObject.MAX_VALUE) << i;
|
||||
if ((readRawByte() & ByteCompanionObject.MIN_VALUE) == 0) {
|
||||
return j4;
|
||||
}
|
||||
}
|
||||
throw InvalidProtocolBufferException.malformedVarint();
|
||||
}
|
||||
|
||||
public int readSFixed32() throws IOException {
|
||||
return readRawLittleEndian32();
|
||||
}
|
||||
|
||||
public long readSFixed64() throws IOException {
|
||||
return readRawLittleEndian64();
|
||||
}
|
||||
|
||||
public int readSInt32() throws IOException {
|
||||
return decodeZigZag32(readRawVarint32());
|
||||
}
|
||||
|
||||
public long readSInt64() throws IOException {
|
||||
return decodeZigZag64(readRawVarint64());
|
||||
}
|
||||
|
||||
public String readString() throws IOException {
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
int i = this.bufferSize;
|
||||
int i4 = this.bufferPos;
|
||||
if (readRawVarint32 > i - i4 || readRawVarint32 <= 0) {
|
||||
return readRawVarint32 == 0 ? "" : new String(readRawBytesSlowPath(readRawVarint32), "UTF-8");
|
||||
}
|
||||
String str = new String(this.buffer, i4, readRawVarint32, "UTF-8");
|
||||
this.bufferPos += readRawVarint32;
|
||||
return str;
|
||||
}
|
||||
|
||||
public String readStringRequireUtf8() throws IOException {
|
||||
byte[] readRawBytesSlowPath;
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
int i = this.bufferPos;
|
||||
if (readRawVarint32 <= this.bufferSize - i && readRawVarint32 > 0) {
|
||||
readRawBytesSlowPath = this.buffer;
|
||||
this.bufferPos = i + readRawVarint32;
|
||||
} else {
|
||||
if (readRawVarint32 == 0) {
|
||||
return "";
|
||||
}
|
||||
readRawBytesSlowPath = readRawBytesSlowPath(readRawVarint32);
|
||||
i = 0;
|
||||
}
|
||||
if (Utf8.isValidUtf8(readRawBytesSlowPath, i, i + readRawVarint32)) {
|
||||
return new String(readRawBytesSlowPath, i, readRawVarint32, "UTF-8");
|
||||
}
|
||||
throw InvalidProtocolBufferException.invalidUtf8();
|
||||
}
|
||||
|
||||
public int readTag() throws IOException {
|
||||
if (isAtEnd()) {
|
||||
this.lastTag = 0;
|
||||
return 0;
|
||||
}
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
this.lastTag = readRawVarint32;
|
||||
if (WireFormat.getTagFieldNumber(readRawVarint32) != 0) {
|
||||
return this.lastTag;
|
||||
}
|
||||
throw InvalidProtocolBufferException.invalidTag();
|
||||
}
|
||||
|
||||
public int readUInt32() throws IOException {
|
||||
return readRawVarint32();
|
||||
}
|
||||
|
||||
public long readUInt64() throws IOException {
|
||||
return readRawVarint64();
|
||||
}
|
||||
|
||||
public boolean skipField(int i, CodedOutputStream codedOutputStream) throws IOException {
|
||||
int tagWireType = WireFormat.getTagWireType(i);
|
||||
if (tagWireType == 0) {
|
||||
long readInt64 = readInt64();
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
codedOutputStream.writeUInt64NoTag(readInt64);
|
||||
return true;
|
||||
}
|
||||
if (tagWireType == 1) {
|
||||
long readRawLittleEndian64 = readRawLittleEndian64();
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
codedOutputStream.writeFixed64NoTag(readRawLittleEndian64);
|
||||
return true;
|
||||
}
|
||||
if (tagWireType == 2) {
|
||||
ByteString readBytes = readBytes();
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
codedOutputStream.writeBytesNoTag(readBytes);
|
||||
return true;
|
||||
}
|
||||
if (tagWireType == 3) {
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
skipMessage(codedOutputStream);
|
||||
int makeTag = WireFormat.makeTag(WireFormat.getTagFieldNumber(i), 4);
|
||||
checkLastTagWas(makeTag);
|
||||
codedOutputStream.writeRawVarint32(makeTag);
|
||||
return true;
|
||||
}
|
||||
if (tagWireType == 4) {
|
||||
return false;
|
||||
}
|
||||
if (tagWireType != 5) {
|
||||
throw InvalidProtocolBufferException.invalidWireType();
|
||||
}
|
||||
int readRawLittleEndian32 = readRawLittleEndian32();
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
codedOutputStream.writeFixed32NoTag(readRawLittleEndian32);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void skipMessage(CodedOutputStream codedOutputStream) throws IOException {
|
||||
int readTag;
|
||||
do {
|
||||
readTag = readTag();
|
||||
if (readTag == 0) {
|
||||
return;
|
||||
}
|
||||
} while (skipField(readTag, codedOutputStream));
|
||||
}
|
||||
|
||||
public void skipRawBytes(int i) throws IOException {
|
||||
int i4 = this.bufferSize;
|
||||
int i5 = this.bufferPos;
|
||||
if (i > i4 - i5 || i < 0) {
|
||||
skipRawBytesSlowPath(i);
|
||||
} else {
|
||||
this.bufferPos = i5 + i;
|
||||
}
|
||||
}
|
||||
|
||||
public static CodedInputStream newInstance(LiteralByteString literalByteString) {
|
||||
CodedInputStream codedInputStream = new CodedInputStream(literalByteString);
|
||||
try {
|
||||
codedInputStream.pushLimit(literalByteString.size());
|
||||
return codedInputStream;
|
||||
} catch (InvalidProtocolBufferException e4) {
|
||||
throw new IllegalArgumentException(e4);
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends MessageLite> T readMessage(Parser<T> parser, ExtensionRegistryLite extensionRegistryLite) throws IOException {
|
||||
int readRawVarint32 = readRawVarint32();
|
||||
if (this.recursionDepth < this.recursionLimit) {
|
||||
int pushLimit = pushLimit(readRawVarint32);
|
||||
this.recursionDepth++;
|
||||
T parsePartialFrom = parser.parsePartialFrom(this, extensionRegistryLite);
|
||||
checkLastTagWas(0);
|
||||
this.recursionDepth--;
|
||||
popLimit(pushLimit);
|
||||
return parsePartialFrom;
|
||||
}
|
||||
throw InvalidProtocolBufferException.recursionLimitExceeded();
|
||||
}
|
||||
|
||||
private CodedInputStream(LiteralByteString literalByteString) {
|
||||
this.enableAliasing = false;
|
||||
this.currentLimit = Integer.MAX_VALUE;
|
||||
this.recursionLimit = 64;
|
||||
this.sizeLimit = 67108864;
|
||||
this.refillCallback = null;
|
||||
this.buffer = literalByteString.bytes;
|
||||
int offsetIntoBytes = literalByteString.getOffsetIntoBytes();
|
||||
this.bufferPos = offsetIntoBytes;
|
||||
this.bufferSize = offsetIntoBytes + literalByteString.size();
|
||||
this.totalBytesRetired = -this.bufferPos;
|
||||
this.input = null;
|
||||
this.bufferIsImmutable = true;
|
||||
}
|
||||
|
||||
public static int readRawVarint32(int i, InputStream inputStream) throws IOException {
|
||||
if ((i & 128) == 0) {
|
||||
return i;
|
||||
}
|
||||
int i4 = i & WorkQueueKt.MASK;
|
||||
int i5 = 7;
|
||||
while (i5 < 32) {
|
||||
int read = inputStream.read();
|
||||
if (read == -1) {
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
i4 |= (read & WorkQueueKt.MASK) << i5;
|
||||
if ((read & 128) == 0) {
|
||||
return i4;
|
||||
}
|
||||
i5 += 7;
|
||||
}
|
||||
while (i5 < 64) {
|
||||
int read2 = inputStream.read();
|
||||
if (read2 == -1) {
|
||||
throw InvalidProtocolBufferException.truncatedMessage();
|
||||
}
|
||||
if ((read2 & 128) == 0) {
|
||||
return i4;
|
||||
}
|
||||
i5 += 7;
|
||||
}
|
||||
throw InvalidProtocolBufferException.malformedVarint();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import kotlin.KotlinVersion;
|
||||
import kotlin.io.ConstantsKt;
|
||||
import kotlinx.coroutines.scheduling.WorkQueueKt;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class CodedOutputStream {
|
||||
private final byte[] buffer;
|
||||
private final int limit;
|
||||
private final OutputStream output;
|
||||
private int totalBytesWritten = 0;
|
||||
private int position = 0;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class OutOfSpaceException extends IOException {
|
||||
public OutOfSpaceException() {
|
||||
super("CodedOutputStream was writing to a flat byte array and ran out of space.");
|
||||
}
|
||||
}
|
||||
|
||||
private CodedOutputStream(OutputStream outputStream, byte[] bArr) {
|
||||
this.output = outputStream;
|
||||
this.buffer = bArr;
|
||||
this.limit = bArr.length;
|
||||
}
|
||||
|
||||
public static int computeBoolSize(int i, boolean z3) {
|
||||
return computeBoolSizeNoTag(z3) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeBoolSizeNoTag(boolean z3) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static int computeByteArraySizeNoTag(byte[] bArr) {
|
||||
return computeRawVarint32Size(bArr.length) + bArr.length;
|
||||
}
|
||||
|
||||
public static int computeBytesSize(int i, ByteString byteString) {
|
||||
return computeBytesSizeNoTag(byteString) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeBytesSizeNoTag(ByteString byteString) {
|
||||
return byteString.size() + computeRawVarint32Size(byteString.size());
|
||||
}
|
||||
|
||||
public static int computeDoubleSize(int i, double d4) {
|
||||
return computeDoubleSizeNoTag(d4) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeDoubleSizeNoTag(double d4) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public static int computeEnumSize(int i, int i4) {
|
||||
return computeEnumSizeNoTag(i4) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeEnumSizeNoTag(int i) {
|
||||
return computeInt32SizeNoTag(i);
|
||||
}
|
||||
|
||||
public static int computeFixed32SizeNoTag(int i) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public static int computeFixed64SizeNoTag(long j4) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public static int computeFloatSize(int i, float f2) {
|
||||
return computeFloatSizeNoTag(f2) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeFloatSizeNoTag(float f2) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public static int computeGroupSizeNoTag(MessageLite messageLite) {
|
||||
return messageLite.getSerializedSize();
|
||||
}
|
||||
|
||||
public static int computeInt32Size(int i, int i4) {
|
||||
return computeInt32SizeNoTag(i4) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeInt32SizeNoTag(int i) {
|
||||
if (i >= 0) {
|
||||
return computeRawVarint32Size(i);
|
||||
}
|
||||
return 10;
|
||||
}
|
||||
|
||||
public static int computeInt64SizeNoTag(long j4) {
|
||||
return computeRawVarint64Size(j4);
|
||||
}
|
||||
|
||||
public static int computeLazyFieldSizeNoTag(LazyFieldLite lazyFieldLite) {
|
||||
int serializedSize = lazyFieldLite.getSerializedSize();
|
||||
return computeRawVarint32Size(serializedSize) + serializedSize;
|
||||
}
|
||||
|
||||
public static int computeMessageSize(int i, MessageLite messageLite) {
|
||||
return computeMessageSizeNoTag(messageLite) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeMessageSizeNoTag(MessageLite messageLite) {
|
||||
int serializedSize = messageLite.getSerializedSize();
|
||||
return computeRawVarint32Size(serializedSize) + serializedSize;
|
||||
}
|
||||
|
||||
public static int computePreferredBufferSize(int i) {
|
||||
return i > 4096 ? ConstantsKt.DEFAULT_BLOCK_SIZE : i;
|
||||
}
|
||||
|
||||
public static int computeRawVarint32Size(int i) {
|
||||
if ((i & (-128)) == 0) {
|
||||
return 1;
|
||||
}
|
||||
if ((i & (-16384)) == 0) {
|
||||
return 2;
|
||||
}
|
||||
if (((-2097152) & i) == 0) {
|
||||
return 3;
|
||||
}
|
||||
return (i & (-268435456)) == 0 ? 4 : 5;
|
||||
}
|
||||
|
||||
public static int computeRawVarint64Size(long j4) {
|
||||
if (((-128) & j4) == 0) {
|
||||
return 1;
|
||||
}
|
||||
if (((-16384) & j4) == 0) {
|
||||
return 2;
|
||||
}
|
||||
if (((-2097152) & j4) == 0) {
|
||||
return 3;
|
||||
}
|
||||
if (((-268435456) & j4) == 0) {
|
||||
return 4;
|
||||
}
|
||||
if (((-34359738368L) & j4) == 0) {
|
||||
return 5;
|
||||
}
|
||||
if (((-4398046511104L) & j4) == 0) {
|
||||
return 6;
|
||||
}
|
||||
if (((-562949953421312L) & j4) == 0) {
|
||||
return 7;
|
||||
}
|
||||
if (((-72057594037927936L) & j4) == 0) {
|
||||
return 8;
|
||||
}
|
||||
return (j4 & Long.MIN_VALUE) == 0 ? 9 : 10;
|
||||
}
|
||||
|
||||
public static int computeSFixed32SizeNoTag(int i) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public static int computeSFixed64SizeNoTag(long j4) {
|
||||
return 8;
|
||||
}
|
||||
|
||||
public static int computeSInt32SizeNoTag(int i) {
|
||||
return computeRawVarint32Size(encodeZigZag32(i));
|
||||
}
|
||||
|
||||
public static int computeSInt64Size(int i, long j4) {
|
||||
return computeSInt64SizeNoTag(j4) + computeTagSize(i);
|
||||
}
|
||||
|
||||
public static int computeSInt64SizeNoTag(long j4) {
|
||||
return computeRawVarint64Size(encodeZigZag64(j4));
|
||||
}
|
||||
|
||||
public static int computeStringSizeNoTag(String str) {
|
||||
try {
|
||||
byte[] bytes = str.getBytes("UTF-8");
|
||||
return computeRawVarint32Size(bytes.length) + bytes.length;
|
||||
} catch (UnsupportedEncodingException e4) {
|
||||
throw new RuntimeException("UTF-8 not supported.", e4);
|
||||
}
|
||||
}
|
||||
|
||||
public static int computeTagSize(int i) {
|
||||
return computeRawVarint32Size(WireFormat.makeTag(i, 0));
|
||||
}
|
||||
|
||||
public static int computeUInt32SizeNoTag(int i) {
|
||||
return computeRawVarint32Size(i);
|
||||
}
|
||||
|
||||
public static int computeUInt64SizeNoTag(long j4) {
|
||||
return computeRawVarint64Size(j4);
|
||||
}
|
||||
|
||||
public static int encodeZigZag32(int i) {
|
||||
return (i >> 31) ^ (i << 1);
|
||||
}
|
||||
|
||||
public static long encodeZigZag64(long j4) {
|
||||
return (j4 >> 63) ^ (j4 << 1);
|
||||
}
|
||||
|
||||
public static CodedOutputStream newInstance(OutputStream outputStream, int i) {
|
||||
return new CodedOutputStream(outputStream, new byte[i]);
|
||||
}
|
||||
|
||||
private void refreshBuffer() throws IOException {
|
||||
OutputStream outputStream = this.output;
|
||||
if (outputStream == null) {
|
||||
throw new OutOfSpaceException();
|
||||
}
|
||||
outputStream.write(this.buffer, 0, this.position);
|
||||
this.position = 0;
|
||||
}
|
||||
|
||||
public void flush() throws IOException {
|
||||
if (this.output != null) {
|
||||
refreshBuffer();
|
||||
}
|
||||
}
|
||||
|
||||
public void writeBool(int i, boolean z3) throws IOException {
|
||||
writeTag(i, 0);
|
||||
writeBoolNoTag(z3);
|
||||
}
|
||||
|
||||
public void writeBoolNoTag(boolean z3) throws IOException {
|
||||
writeRawByte(z3 ? 1 : 0);
|
||||
}
|
||||
|
||||
public void writeByteArrayNoTag(byte[] bArr) throws IOException {
|
||||
writeRawVarint32(bArr.length);
|
||||
writeRawBytes(bArr);
|
||||
}
|
||||
|
||||
public void writeBytes(int i, ByteString byteString) throws IOException {
|
||||
writeTag(i, 2);
|
||||
writeBytesNoTag(byteString);
|
||||
}
|
||||
|
||||
public void writeBytesNoTag(ByteString byteString) throws IOException {
|
||||
writeRawVarint32(byteString.size());
|
||||
writeRawBytes(byteString);
|
||||
}
|
||||
|
||||
public void writeDouble(int i, double d4) throws IOException {
|
||||
writeTag(i, 1);
|
||||
writeDoubleNoTag(d4);
|
||||
}
|
||||
|
||||
public void writeDoubleNoTag(double d4) throws IOException {
|
||||
writeRawLittleEndian64(Double.doubleToRawLongBits(d4));
|
||||
}
|
||||
|
||||
public void writeEnum(int i, int i4) throws IOException {
|
||||
writeTag(i, 0);
|
||||
writeEnumNoTag(i4);
|
||||
}
|
||||
|
||||
public void writeEnumNoTag(int i) throws IOException {
|
||||
writeInt32NoTag(i);
|
||||
}
|
||||
|
||||
public void writeFixed32NoTag(int i) throws IOException {
|
||||
writeRawLittleEndian32(i);
|
||||
}
|
||||
|
||||
public void writeFixed64NoTag(long j4) throws IOException {
|
||||
writeRawLittleEndian64(j4);
|
||||
}
|
||||
|
||||
public void writeFloat(int i, float f2) throws IOException {
|
||||
writeTag(i, 5);
|
||||
writeFloatNoTag(f2);
|
||||
}
|
||||
|
||||
public void writeFloatNoTag(float f2) throws IOException {
|
||||
writeRawLittleEndian32(Float.floatToRawIntBits(f2));
|
||||
}
|
||||
|
||||
public void writeGroup(int i, MessageLite messageLite) throws IOException {
|
||||
writeTag(i, 3);
|
||||
writeGroupNoTag(messageLite);
|
||||
writeTag(i, 4);
|
||||
}
|
||||
|
||||
public void writeGroupNoTag(MessageLite messageLite) throws IOException {
|
||||
messageLite.writeTo(this);
|
||||
}
|
||||
|
||||
public void writeInt32(int i, int i4) throws IOException {
|
||||
writeTag(i, 0);
|
||||
writeInt32NoTag(i4);
|
||||
}
|
||||
|
||||
public void writeInt32NoTag(int i) throws IOException {
|
||||
if (i >= 0) {
|
||||
writeRawVarint32(i);
|
||||
} else {
|
||||
writeRawVarint64(i);
|
||||
}
|
||||
}
|
||||
|
||||
public void writeInt64NoTag(long j4) throws IOException {
|
||||
writeRawVarint64(j4);
|
||||
}
|
||||
|
||||
public void writeMessage(int i, MessageLite messageLite) throws IOException {
|
||||
writeTag(i, 2);
|
||||
writeMessageNoTag(messageLite);
|
||||
}
|
||||
|
||||
public void writeMessageNoTag(MessageLite messageLite) throws IOException {
|
||||
writeRawVarint32(messageLite.getSerializedSize());
|
||||
messageLite.writeTo(this);
|
||||
}
|
||||
|
||||
public void writeMessageSetExtension(int i, MessageLite messageLite) throws IOException {
|
||||
writeTag(1, 3);
|
||||
writeUInt32(2, i);
|
||||
writeMessage(3, messageLite);
|
||||
writeTag(1, 4);
|
||||
}
|
||||
|
||||
public void writeRawByte(byte b4) throws IOException {
|
||||
if (this.position == this.limit) {
|
||||
refreshBuffer();
|
||||
}
|
||||
byte[] bArr = this.buffer;
|
||||
int i = this.position;
|
||||
this.position = i + 1;
|
||||
bArr[i] = b4;
|
||||
this.totalBytesWritten++;
|
||||
}
|
||||
|
||||
public void writeRawBytes(ByteString byteString) throws IOException {
|
||||
writeRawBytes(byteString, 0, byteString.size());
|
||||
}
|
||||
|
||||
public void writeRawLittleEndian32(int i) throws IOException {
|
||||
writeRawByte(i & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte((i >> 8) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte((i >> 16) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte((i >> 24) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
}
|
||||
|
||||
public void writeRawLittleEndian64(long j4) throws IOException {
|
||||
writeRawByte(((int) j4) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 8)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 16)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 24)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 32)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 40)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 48)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
writeRawByte(((int) (j4 >> 56)) & KotlinVersion.MAX_COMPONENT_VALUE);
|
||||
}
|
||||
|
||||
public void writeRawVarint32(int i) throws IOException {
|
||||
while ((i & (-128)) != 0) {
|
||||
writeRawByte((i & WorkQueueKt.MASK) | 128);
|
||||
i >>>= 7;
|
||||
}
|
||||
writeRawByte(i);
|
||||
}
|
||||
|
||||
public void writeRawVarint64(long j4) throws IOException {
|
||||
while (((-128) & j4) != 0) {
|
||||
writeRawByte((((int) j4) & WorkQueueKt.MASK) | 128);
|
||||
j4 >>>= 7;
|
||||
}
|
||||
writeRawByte((int) j4);
|
||||
}
|
||||
|
||||
public void writeSFixed32NoTag(int i) throws IOException {
|
||||
writeRawLittleEndian32(i);
|
||||
}
|
||||
|
||||
public void writeSFixed64NoTag(long j4) throws IOException {
|
||||
writeRawLittleEndian64(j4);
|
||||
}
|
||||
|
||||
public void writeSInt32NoTag(int i) throws IOException {
|
||||
writeRawVarint32(encodeZigZag32(i));
|
||||
}
|
||||
|
||||
public void writeSInt64(int i, long j4) throws IOException {
|
||||
writeTag(i, 0);
|
||||
writeSInt64NoTag(j4);
|
||||
}
|
||||
|
||||
public void writeSInt64NoTag(long j4) throws IOException {
|
||||
writeRawVarint64(encodeZigZag64(j4));
|
||||
}
|
||||
|
||||
public void writeStringNoTag(String str) throws IOException {
|
||||
byte[] bytes = str.getBytes("UTF-8");
|
||||
writeRawVarint32(bytes.length);
|
||||
writeRawBytes(bytes);
|
||||
}
|
||||
|
||||
public void writeTag(int i, int i4) throws IOException {
|
||||
writeRawVarint32(WireFormat.makeTag(i, i4));
|
||||
}
|
||||
|
||||
public void writeUInt32(int i, int i4) throws IOException {
|
||||
writeTag(i, 0);
|
||||
writeUInt32NoTag(i4);
|
||||
}
|
||||
|
||||
public void writeUInt32NoTag(int i) throws IOException {
|
||||
writeRawVarint32(i);
|
||||
}
|
||||
|
||||
public void writeUInt64NoTag(long j4) throws IOException {
|
||||
writeRawVarint64(j4);
|
||||
}
|
||||
|
||||
public void writeRawBytes(byte[] bArr) throws IOException {
|
||||
writeRawBytes(bArr, 0, bArr.length);
|
||||
}
|
||||
|
||||
public void writeRawBytes(byte[] bArr, int i, int i4) throws IOException {
|
||||
int i5 = this.limit;
|
||||
int i6 = this.position;
|
||||
if (i5 - i6 >= i4) {
|
||||
System.arraycopy(bArr, i, this.buffer, i6, i4);
|
||||
this.position += i4;
|
||||
this.totalBytesWritten += i4;
|
||||
return;
|
||||
}
|
||||
int i7 = i5 - i6;
|
||||
System.arraycopy(bArr, i, this.buffer, i6, i7);
|
||||
int i8 = i + i7;
|
||||
int i9 = i4 - i7;
|
||||
this.position = this.limit;
|
||||
this.totalBytesWritten += i7;
|
||||
refreshBuffer();
|
||||
if (i9 <= this.limit) {
|
||||
System.arraycopy(bArr, i8, this.buffer, 0, i9);
|
||||
this.position = i9;
|
||||
} else {
|
||||
this.output.write(bArr, i8, i9);
|
||||
}
|
||||
this.totalBytesWritten += i9;
|
||||
}
|
||||
|
||||
public void writeRawByte(int i) throws IOException {
|
||||
writeRawByte((byte) i);
|
||||
}
|
||||
|
||||
public void writeRawBytes(ByteString byteString, int i, int i4) throws IOException {
|
||||
int i5 = this.limit;
|
||||
int i6 = this.position;
|
||||
if (i5 - i6 >= i4) {
|
||||
byteString.copyTo(this.buffer, i, i6, i4);
|
||||
this.position += i4;
|
||||
this.totalBytesWritten += i4;
|
||||
return;
|
||||
}
|
||||
int i7 = i5 - i6;
|
||||
byteString.copyTo(this.buffer, i, i6, i7);
|
||||
int i8 = i + i7;
|
||||
int i9 = i4 - i7;
|
||||
this.position = this.limit;
|
||||
this.totalBytesWritten += i7;
|
||||
refreshBuffer();
|
||||
if (i9 <= this.limit) {
|
||||
byteString.copyTo(this.buffer, i8, 0, i9);
|
||||
this.position = i9;
|
||||
} else {
|
||||
byteString.writeTo(this.output, i8, i9);
|
||||
}
|
||||
this.totalBytesWritten += i9;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ExtensionRegistryLite {
|
||||
private static final ExtensionRegistryLite EMPTY = new ExtensionRegistryLite(true);
|
||||
private static volatile boolean eagerlyParseMessageSets = false;
|
||||
private final Map<ObjectIntPair, GeneratedMessageLite.GeneratedExtension<?, ?>> extensionsByNumber;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ObjectIntPair {
|
||||
private final int number;
|
||||
private final Object object;
|
||||
|
||||
public ObjectIntPair(Object obj, int i) {
|
||||
this.object = obj;
|
||||
this.number = i;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof ObjectIntPair)) {
|
||||
return false;
|
||||
}
|
||||
ObjectIntPair objectIntPair = (ObjectIntPair) obj;
|
||||
return this.object == objectIntPair.object && this.number == objectIntPair.number;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return (System.identityHashCode(this.object) * 65535) + this.number;
|
||||
}
|
||||
}
|
||||
|
||||
public ExtensionRegistryLite() {
|
||||
this.extensionsByNumber = new HashMap();
|
||||
}
|
||||
|
||||
public static ExtensionRegistryLite getEmptyRegistry() {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
public static ExtensionRegistryLite newInstance() {
|
||||
return new ExtensionRegistryLite();
|
||||
}
|
||||
|
||||
public final void add(GeneratedMessageLite.GeneratedExtension<?, ?> generatedExtension) {
|
||||
this.extensionsByNumber.put(new ObjectIntPair(generatedExtension.getContainingTypeDefaultInstance(), generatedExtension.getNumber()), generatedExtension);
|
||||
}
|
||||
|
||||
public <ContainingType extends MessageLite> GeneratedMessageLite.GeneratedExtension<ContainingType, ?> findLiteExtensionByNumber(ContainingType containingtype, int i) {
|
||||
return (GeneratedMessageLite.GeneratedExtension) this.extensionsByNumber.get(new ObjectIntPair(containingtype, i));
|
||||
}
|
||||
|
||||
private ExtensionRegistryLite(boolean z3) {
|
||||
this.extensionsByNumber = Collections.EMPTY_MAP;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,703 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.Internal;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.LazyField;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.WireFormat;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public final class FieldSet<FieldDescriptorType extends FieldDescriptorLite<FieldDescriptorType>> {
|
||||
private static final FieldSet DEFAULT_INSTANCE = new FieldSet(true);
|
||||
private boolean isImmutable;
|
||||
private boolean hasLazyField = false;
|
||||
private final SmallSortedMap<FieldDescriptorType, Object> fields = SmallSortedMap.newFieldMap(16);
|
||||
|
||||
/* renamed from: kotlin.reflect.jvm.internal.impl.protobuf.FieldSet$1, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static /* synthetic */ class AnonymousClass1 {
|
||||
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$FieldType;
|
||||
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$JavaType;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[WireFormat.FieldType.values().length];
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType = iArr;
|
||||
try {
|
||||
iArr[WireFormat.FieldType.DOUBLE.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FLOAT.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT64.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT64.ordinal()] = 4;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.INT32.ordinal()] = 5;
|
||||
} catch (NoSuchFieldError unused5) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED64.ordinal()] = 6;
|
||||
} catch (NoSuchFieldError unused6) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.FIXED32.ordinal()] = 7;
|
||||
} catch (NoSuchFieldError unused7) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BOOL.ordinal()] = 8;
|
||||
} catch (NoSuchFieldError unused8) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.STRING.ordinal()] = 9;
|
||||
} catch (NoSuchFieldError unused9) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.BYTES.ordinal()] = 10;
|
||||
} catch (NoSuchFieldError unused10) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.UINT32.ordinal()] = 11;
|
||||
} catch (NoSuchFieldError unused11) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED32.ordinal()] = 12;
|
||||
} catch (NoSuchFieldError unused12) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SFIXED64.ordinal()] = 13;
|
||||
} catch (NoSuchFieldError unused13) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT32.ordinal()] = 14;
|
||||
} catch (NoSuchFieldError unused14) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.SINT64.ordinal()] = 15;
|
||||
} catch (NoSuchFieldError unused15) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.GROUP.ordinal()] = 16;
|
||||
} catch (NoSuchFieldError unused16) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.MESSAGE.ordinal()] = 17;
|
||||
} catch (NoSuchFieldError unused17) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$FieldType[WireFormat.FieldType.ENUM.ordinal()] = 18;
|
||||
} catch (NoSuchFieldError unused18) {
|
||||
}
|
||||
int[] iArr2 = new int[WireFormat.JavaType.values().length];
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType = iArr2;
|
||||
try {
|
||||
iArr2[WireFormat.JavaType.INT.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused19) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.LONG.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused20) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.FLOAT.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused21) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.DOUBLE.ordinal()] = 4;
|
||||
} catch (NoSuchFieldError unused22) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.BOOLEAN.ordinal()] = 5;
|
||||
} catch (NoSuchFieldError unused23) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.STRING.ordinal()] = 6;
|
||||
} catch (NoSuchFieldError unused24) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.BYTE_STRING.ordinal()] = 7;
|
||||
} catch (NoSuchFieldError unused25) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.ENUM.ordinal()] = 8;
|
||||
} catch (NoSuchFieldError unused26) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.MESSAGE.ordinal()] = 9;
|
||||
} catch (NoSuchFieldError unused27) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface FieldDescriptorLite<T extends FieldDescriptorLite<T>> extends Comparable<T> {
|
||||
WireFormat.JavaType getLiteJavaType();
|
||||
|
||||
WireFormat.FieldType getLiteType();
|
||||
|
||||
int getNumber();
|
||||
|
||||
MessageLite.Builder internalMergeFrom(MessageLite.Builder builder, MessageLite messageLite);
|
||||
|
||||
boolean isPacked();
|
||||
|
||||
boolean isRepeated();
|
||||
}
|
||||
|
||||
private FieldSet() {
|
||||
}
|
||||
|
||||
private Object cloneIfMutable(Object obj) {
|
||||
if (!(obj instanceof byte[])) {
|
||||
return obj;
|
||||
}
|
||||
byte[] bArr = (byte[]) obj;
|
||||
byte[] bArr2 = new byte[bArr.length];
|
||||
System.arraycopy(bArr, 0, bArr2, 0, bArr.length);
|
||||
return bArr2;
|
||||
}
|
||||
|
||||
private static int computeElementSize(WireFormat.FieldType fieldType, int i, Object obj) {
|
||||
int computeTagSize = CodedOutputStream.computeTagSize(i);
|
||||
if (fieldType == WireFormat.FieldType.GROUP) {
|
||||
computeTagSize *= 2;
|
||||
}
|
||||
return computeTagSize + computeElementSizeNoTag(fieldType, obj);
|
||||
}
|
||||
|
||||
private static int computeElementSizeNoTag(WireFormat.FieldType fieldType, Object obj) {
|
||||
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[fieldType.ordinal()]) {
|
||||
case 1:
|
||||
return CodedOutputStream.computeDoubleSizeNoTag(((Double) obj).doubleValue());
|
||||
case 2:
|
||||
return CodedOutputStream.computeFloatSizeNoTag(((Float) obj).floatValue());
|
||||
case 3:
|
||||
return CodedOutputStream.computeInt64SizeNoTag(((Long) obj).longValue());
|
||||
case 4:
|
||||
return CodedOutputStream.computeUInt64SizeNoTag(((Long) obj).longValue());
|
||||
case 5:
|
||||
return CodedOutputStream.computeInt32SizeNoTag(((Integer) obj).intValue());
|
||||
case 6:
|
||||
return CodedOutputStream.computeFixed64SizeNoTag(((Long) obj).longValue());
|
||||
case 7:
|
||||
return CodedOutputStream.computeFixed32SizeNoTag(((Integer) obj).intValue());
|
||||
case 8:
|
||||
return CodedOutputStream.computeBoolSizeNoTag(((Boolean) obj).booleanValue());
|
||||
case 9:
|
||||
return CodedOutputStream.computeStringSizeNoTag((String) obj);
|
||||
case 10:
|
||||
return obj instanceof ByteString ? CodedOutputStream.computeBytesSizeNoTag((ByteString) obj) : CodedOutputStream.computeByteArraySizeNoTag((byte[]) obj);
|
||||
case 11:
|
||||
return CodedOutputStream.computeUInt32SizeNoTag(((Integer) obj).intValue());
|
||||
case 12:
|
||||
return CodedOutputStream.computeSFixed32SizeNoTag(((Integer) obj).intValue());
|
||||
case 13:
|
||||
return CodedOutputStream.computeSFixed64SizeNoTag(((Long) obj).longValue());
|
||||
case 14:
|
||||
return CodedOutputStream.computeSInt32SizeNoTag(((Integer) obj).intValue());
|
||||
case 15:
|
||||
return CodedOutputStream.computeSInt64SizeNoTag(((Long) obj).longValue());
|
||||
case 16:
|
||||
return CodedOutputStream.computeGroupSizeNoTag((MessageLite) obj);
|
||||
case 17:
|
||||
return obj instanceof LazyField ? CodedOutputStream.computeLazyFieldSizeNoTag((LazyField) obj) : CodedOutputStream.computeMessageSizeNoTag((MessageLite) obj);
|
||||
case 18:
|
||||
return obj instanceof Internal.EnumLite ? CodedOutputStream.computeEnumSizeNoTag(((Internal.EnumLite) obj).getNumber()) : CodedOutputStream.computeEnumSizeNoTag(((Integer) obj).intValue());
|
||||
default:
|
||||
throw new RuntimeException("There is no way to get here, but the compiler thinks otherwise.");
|
||||
}
|
||||
}
|
||||
|
||||
public static int computeFieldSize(FieldDescriptorLite<?> fieldDescriptorLite, Object obj) {
|
||||
WireFormat.FieldType liteType = fieldDescriptorLite.getLiteType();
|
||||
int number = fieldDescriptorLite.getNumber();
|
||||
if (!fieldDescriptorLite.isRepeated()) {
|
||||
return computeElementSize(liteType, number, obj);
|
||||
}
|
||||
int i = 0;
|
||||
if (!fieldDescriptorLite.isPacked()) {
|
||||
Iterator it = ((List) obj).iterator();
|
||||
while (it.hasNext()) {
|
||||
i += computeElementSize(liteType, number, it.next());
|
||||
}
|
||||
return i;
|
||||
}
|
||||
Iterator it2 = ((List) obj).iterator();
|
||||
while (it2.hasNext()) {
|
||||
i += computeElementSizeNoTag(liteType, it2.next());
|
||||
}
|
||||
return CodedOutputStream.computeRawVarint32Size(i) + CodedOutputStream.computeTagSize(number) + i;
|
||||
}
|
||||
|
||||
public static <T extends FieldDescriptorLite<T>> FieldSet<T> emptySet() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
public static int getWireFormatForFieldType(WireFormat.FieldType fieldType, boolean z3) {
|
||||
if (z3) {
|
||||
return 2;
|
||||
}
|
||||
return fieldType.getWireType();
|
||||
}
|
||||
|
||||
private void mergeFromField(Map.Entry<FieldDescriptorType, Object> entry) {
|
||||
FieldDescriptorType key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof LazyField) {
|
||||
value = ((LazyField) value).getValue();
|
||||
}
|
||||
if (key.isRepeated()) {
|
||||
Object field = getField(key);
|
||||
if (field == null) {
|
||||
field = new ArrayList();
|
||||
}
|
||||
Iterator it = ((List) value).iterator();
|
||||
while (it.hasNext()) {
|
||||
((List) field).add(cloneIfMutable(it.next()));
|
||||
}
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) key, (FieldDescriptorType) field);
|
||||
return;
|
||||
}
|
||||
if (key.getLiteJavaType() != WireFormat.JavaType.MESSAGE) {
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) key, (FieldDescriptorType) cloneIfMutable(value));
|
||||
return;
|
||||
}
|
||||
Object field2 = getField(key);
|
||||
if (field2 == null) {
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) key, (FieldDescriptorType) cloneIfMutable(value));
|
||||
} else {
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) key, (FieldDescriptorType) key.internalMergeFrom(((MessageLite) field2).toBuilder(), (MessageLite) value).build());
|
||||
}
|
||||
}
|
||||
|
||||
public static <T extends FieldDescriptorLite<T>> FieldSet<T> newFieldSet() {
|
||||
return new FieldSet<>();
|
||||
}
|
||||
|
||||
public static Object readPrimitiveField(CodedInputStream codedInputStream, WireFormat.FieldType fieldType, boolean z3) throws IOException {
|
||||
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[fieldType.ordinal()]) {
|
||||
case 1:
|
||||
return Double.valueOf(codedInputStream.readDouble());
|
||||
case 2:
|
||||
return Float.valueOf(codedInputStream.readFloat());
|
||||
case 3:
|
||||
return Long.valueOf(codedInputStream.readInt64());
|
||||
case 4:
|
||||
return Long.valueOf(codedInputStream.readUInt64());
|
||||
case 5:
|
||||
return Integer.valueOf(codedInputStream.readInt32());
|
||||
case 6:
|
||||
return Long.valueOf(codedInputStream.readFixed64());
|
||||
case 7:
|
||||
return Integer.valueOf(codedInputStream.readFixed32());
|
||||
case 8:
|
||||
return Boolean.valueOf(codedInputStream.readBool());
|
||||
case 9:
|
||||
return z3 ? codedInputStream.readStringRequireUtf8() : codedInputStream.readString();
|
||||
case 10:
|
||||
return codedInputStream.readBytes();
|
||||
case 11:
|
||||
return Integer.valueOf(codedInputStream.readUInt32());
|
||||
case 12:
|
||||
return Integer.valueOf(codedInputStream.readSFixed32());
|
||||
case 13:
|
||||
return Long.valueOf(codedInputStream.readSFixed64());
|
||||
case 14:
|
||||
return Integer.valueOf(codedInputStream.readSInt32());
|
||||
case 15:
|
||||
return Long.valueOf(codedInputStream.readSInt64());
|
||||
case 16:
|
||||
throw new IllegalArgumentException("readPrimitiveField() cannot handle nested groups.");
|
||||
case 17:
|
||||
throw new IllegalArgumentException("readPrimitiveField() cannot handle embedded messages.");
|
||||
case 18:
|
||||
throw new IllegalArgumentException("readPrimitiveField() cannot handle enums.");
|
||||
default:
|
||||
throw new RuntimeException("There is no way to get here, but the compiler thinks otherwise.");
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:12:0x0027, code lost:
|
||||
|
||||
if ((r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.Internal.EnumLite) == false) goto L10;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:16:0x0030, code lost:
|
||||
|
||||
if ((r3 instanceof byte[]) == false) goto L10;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:6:0x001b, code lost:
|
||||
|
||||
if ((r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.LazyField) == false) goto L10;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:7:0x001e, code lost:
|
||||
|
||||
r0 = false;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
private static void verifyType(kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType r2, java.lang.Object r3) {
|
||||
/*
|
||||
r3.getClass()
|
||||
int[] r0 = kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$JavaType
|
||||
kotlin.reflect.jvm.internal.impl.protobuf.WireFormat$JavaType r2 = r2.getJavaType()
|
||||
int r2 = r2.ordinal()
|
||||
r2 = r0[r2]
|
||||
r0 = 1
|
||||
r1 = 0
|
||||
switch(r2) {
|
||||
case 1: goto L42;
|
||||
case 2: goto L3f;
|
||||
case 3: goto L3c;
|
||||
case 4: goto L39;
|
||||
case 5: goto L36;
|
||||
case 6: goto L33;
|
||||
case 7: goto L2a;
|
||||
case 8: goto L21;
|
||||
case 9: goto L15;
|
||||
default: goto L14;
|
||||
}
|
||||
L14:
|
||||
goto L44
|
||||
L15:
|
||||
boolean r2 = r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.MessageLite
|
||||
if (r2 != 0) goto L1f
|
||||
boolean r2 = r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.LazyField
|
||||
if (r2 == 0) goto L1e
|
||||
goto L1f
|
||||
L1e:
|
||||
r0 = r1
|
||||
L1f:
|
||||
r1 = r0
|
||||
goto L44
|
||||
L21:
|
||||
boolean r2 = r3 instanceof java.lang.Integer
|
||||
if (r2 != 0) goto L1f
|
||||
boolean r2 = r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.Internal.EnumLite
|
||||
if (r2 == 0) goto L1e
|
||||
goto L1f
|
||||
L2a:
|
||||
boolean r2 = r3 instanceof kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
if (r2 != 0) goto L1f
|
||||
boolean r2 = r3 instanceof byte[]
|
||||
if (r2 == 0) goto L1e
|
||||
goto L1f
|
||||
L33:
|
||||
boolean r1 = r3 instanceof java.lang.String
|
||||
goto L44
|
||||
L36:
|
||||
boolean r1 = r3 instanceof java.lang.Boolean
|
||||
goto L44
|
||||
L39:
|
||||
boolean r1 = r3 instanceof java.lang.Double
|
||||
goto L44
|
||||
L3c:
|
||||
boolean r1 = r3 instanceof java.lang.Float
|
||||
goto L44
|
||||
L3f:
|
||||
boolean r1 = r3 instanceof java.lang.Long
|
||||
goto L44
|
||||
L42:
|
||||
boolean r1 = r3 instanceof java.lang.Integer
|
||||
L44:
|
||||
if (r1 == 0) goto L47
|
||||
return
|
||||
L47:
|
||||
java.lang.IllegalArgumentException r2 = new java.lang.IllegalArgumentException
|
||||
java.lang.String r3 = "Wrong object type used with protocol message reflection."
|
||||
r2.<init>(r3)
|
||||
throw r2
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.verifyType(kotlin.reflect.jvm.internal.impl.protobuf.WireFormat$FieldType, java.lang.Object):void");
|
||||
}
|
||||
|
||||
private static void writeElement(CodedOutputStream codedOutputStream, WireFormat.FieldType fieldType, int i, Object obj) throws IOException {
|
||||
if (fieldType == WireFormat.FieldType.GROUP) {
|
||||
codedOutputStream.writeGroup(i, (MessageLite) obj);
|
||||
} else {
|
||||
codedOutputStream.writeTag(i, getWireFormatForFieldType(fieldType, false));
|
||||
writeElementNoTag(codedOutputStream, fieldType, obj);
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeElementNoTag(CodedOutputStream codedOutputStream, WireFormat.FieldType fieldType, Object obj) throws IOException {
|
||||
switch (AnonymousClass1.$SwitchMap$com$google$protobuf$WireFormat$FieldType[fieldType.ordinal()]) {
|
||||
case 1:
|
||||
codedOutputStream.writeDoubleNoTag(((Double) obj).doubleValue());
|
||||
return;
|
||||
case 2:
|
||||
codedOutputStream.writeFloatNoTag(((Float) obj).floatValue());
|
||||
return;
|
||||
case 3:
|
||||
codedOutputStream.writeInt64NoTag(((Long) obj).longValue());
|
||||
return;
|
||||
case 4:
|
||||
codedOutputStream.writeUInt64NoTag(((Long) obj).longValue());
|
||||
return;
|
||||
case 5:
|
||||
codedOutputStream.writeInt32NoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
case 6:
|
||||
codedOutputStream.writeFixed64NoTag(((Long) obj).longValue());
|
||||
return;
|
||||
case 7:
|
||||
codedOutputStream.writeFixed32NoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
case 8:
|
||||
codedOutputStream.writeBoolNoTag(((Boolean) obj).booleanValue());
|
||||
return;
|
||||
case 9:
|
||||
codedOutputStream.writeStringNoTag((String) obj);
|
||||
return;
|
||||
case 10:
|
||||
if (obj instanceof ByteString) {
|
||||
codedOutputStream.writeBytesNoTag((ByteString) obj);
|
||||
return;
|
||||
} else {
|
||||
codedOutputStream.writeByteArrayNoTag((byte[]) obj);
|
||||
return;
|
||||
}
|
||||
case 11:
|
||||
codedOutputStream.writeUInt32NoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
case 12:
|
||||
codedOutputStream.writeSFixed32NoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
case 13:
|
||||
codedOutputStream.writeSFixed64NoTag(((Long) obj).longValue());
|
||||
return;
|
||||
case 14:
|
||||
codedOutputStream.writeSInt32NoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
case 15:
|
||||
codedOutputStream.writeSInt64NoTag(((Long) obj).longValue());
|
||||
return;
|
||||
case 16:
|
||||
codedOutputStream.writeGroupNoTag((MessageLite) obj);
|
||||
return;
|
||||
case 17:
|
||||
codedOutputStream.writeMessageNoTag((MessageLite) obj);
|
||||
return;
|
||||
case 18:
|
||||
if (obj instanceof Internal.EnumLite) {
|
||||
codedOutputStream.writeEnumNoTag(((Internal.EnumLite) obj).getNumber());
|
||||
return;
|
||||
} else {
|
||||
codedOutputStream.writeEnumNoTag(((Integer) obj).intValue());
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeField(FieldDescriptorLite<?> fieldDescriptorLite, Object obj, CodedOutputStream codedOutputStream) throws IOException {
|
||||
WireFormat.FieldType liteType = fieldDescriptorLite.getLiteType();
|
||||
int number = fieldDescriptorLite.getNumber();
|
||||
if (!fieldDescriptorLite.isRepeated()) {
|
||||
if (obj instanceof LazyField) {
|
||||
writeElement(codedOutputStream, liteType, number, ((LazyField) obj).getValue());
|
||||
return;
|
||||
} else {
|
||||
writeElement(codedOutputStream, liteType, number, obj);
|
||||
return;
|
||||
}
|
||||
}
|
||||
List list = (List) obj;
|
||||
if (!fieldDescriptorLite.isPacked()) {
|
||||
Iterator it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
writeElement(codedOutputStream, liteType, number, it.next());
|
||||
}
|
||||
return;
|
||||
}
|
||||
codedOutputStream.writeTag(number, 2);
|
||||
Iterator it2 = list.iterator();
|
||||
int i = 0;
|
||||
while (it2.hasNext()) {
|
||||
i += computeElementSizeNoTag(liteType, it2.next());
|
||||
}
|
||||
codedOutputStream.writeRawVarint32(i);
|
||||
Iterator it3 = list.iterator();
|
||||
while (it3.hasNext()) {
|
||||
writeElementNoTag(codedOutputStream, liteType, it3.next());
|
||||
}
|
||||
}
|
||||
|
||||
public void addRepeatedField(FieldDescriptorType fielddescriptortype, Object obj) {
|
||||
List list;
|
||||
if (!fielddescriptortype.isRepeated()) {
|
||||
throw new IllegalArgumentException("addRepeatedField() can only be called on repeated fields.");
|
||||
}
|
||||
verifyType(fielddescriptortype.getLiteType(), obj);
|
||||
Object field = getField(fielddescriptortype);
|
||||
if (field == null) {
|
||||
list = new ArrayList();
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) fielddescriptortype, (FieldDescriptorType) list);
|
||||
} else {
|
||||
list = (List) field;
|
||||
}
|
||||
list.add(obj);
|
||||
}
|
||||
|
||||
public Object getField(FieldDescriptorType fielddescriptortype) {
|
||||
Object obj = this.fields.get(fielddescriptortype);
|
||||
return obj instanceof LazyField ? ((LazyField) obj).getValue() : obj;
|
||||
}
|
||||
|
||||
public Object getRepeatedField(FieldDescriptorType fielddescriptortype, int i) {
|
||||
if (!fielddescriptortype.isRepeated()) {
|
||||
throw new IllegalArgumentException("getRepeatedField() can only be called on repeated fields.");
|
||||
}
|
||||
Object field = getField(fielddescriptortype);
|
||||
if (field != null) {
|
||||
return ((List) field).get(i);
|
||||
}
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
|
||||
public int getRepeatedFieldCount(FieldDescriptorType fielddescriptortype) {
|
||||
if (!fielddescriptortype.isRepeated()) {
|
||||
throw new IllegalArgumentException("getRepeatedField() can only be called on repeated fields.");
|
||||
}
|
||||
Object field = getField(fielddescriptortype);
|
||||
if (field == null) {
|
||||
return 0;
|
||||
}
|
||||
return ((List) field).size();
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int i = 0;
|
||||
for (int i4 = 0; i4 < this.fields.getNumArrayEntries(); i4++) {
|
||||
Map.Entry<FieldDescriptorType, Object> arrayEntryAt = this.fields.getArrayEntryAt(i4);
|
||||
i += computeFieldSize(arrayEntryAt.getKey(), arrayEntryAt.getValue());
|
||||
}
|
||||
for (Map.Entry<FieldDescriptorType, Object> entry : this.fields.getOverflowEntries()) {
|
||||
i += computeFieldSize(entry.getKey(), entry.getValue());
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public boolean hasField(FieldDescriptorType fielddescriptortype) {
|
||||
if (fielddescriptortype.isRepeated()) {
|
||||
throw new IllegalArgumentException("hasField() can only be called on non-repeated fields.");
|
||||
}
|
||||
return this.fields.get(fielddescriptortype) != null;
|
||||
}
|
||||
|
||||
public boolean isInitialized() {
|
||||
for (int i = 0; i < this.fields.getNumArrayEntries(); i++) {
|
||||
if (!isInitialized(this.fields.getArrayEntryAt(i))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Iterator<Map.Entry<FieldDescriptorType, Object>> it = this.fields.getOverflowEntries().iterator();
|
||||
while (it.hasNext()) {
|
||||
if (!isInitialized(it.next())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public Iterator<Map.Entry<FieldDescriptorType, Object>> iterator() {
|
||||
return this.hasLazyField ? new LazyField.LazyIterator(this.fields.entrySet().iterator()) : this.fields.entrySet().iterator();
|
||||
}
|
||||
|
||||
public void makeImmutable() {
|
||||
if (this.isImmutable) {
|
||||
return;
|
||||
}
|
||||
this.fields.makeImmutable();
|
||||
this.isImmutable = true;
|
||||
}
|
||||
|
||||
public void mergeFrom(FieldSet<FieldDescriptorType> fieldSet) {
|
||||
for (int i = 0; i < fieldSet.fields.getNumArrayEntries(); i++) {
|
||||
mergeFromField(fieldSet.fields.getArrayEntryAt(i));
|
||||
}
|
||||
Iterator<Map.Entry<FieldDescriptorType, Object>> it = fieldSet.fields.getOverflowEntries().iterator();
|
||||
while (it.hasNext()) {
|
||||
mergeFromField(it.next());
|
||||
}
|
||||
}
|
||||
|
||||
public void setField(FieldDescriptorType fielddescriptortype, Object obj) {
|
||||
if (!fielddescriptortype.isRepeated()) {
|
||||
verifyType(fielddescriptortype.getLiteType(), obj);
|
||||
} else {
|
||||
if (!(obj instanceof List)) {
|
||||
throw new IllegalArgumentException("Wrong object type used with protocol message reflection.");
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
arrayList.addAll((List) obj);
|
||||
Iterator it = arrayList.iterator();
|
||||
while (it.hasNext()) {
|
||||
verifyType(fielddescriptortype.getLiteType(), it.next());
|
||||
}
|
||||
obj = arrayList;
|
||||
}
|
||||
if (obj instanceof LazyField) {
|
||||
this.hasLazyField = true;
|
||||
}
|
||||
this.fields.put((SmallSortedMap<FieldDescriptorType, Object>) fielddescriptortype, (FieldDescriptorType) obj);
|
||||
}
|
||||
|
||||
public FieldSet<FieldDescriptorType> clone() {
|
||||
FieldSet<FieldDescriptorType> newFieldSet = newFieldSet();
|
||||
for (int i = 0; i < this.fields.getNumArrayEntries(); i++) {
|
||||
Map.Entry<FieldDescriptorType, Object> arrayEntryAt = this.fields.getArrayEntryAt(i);
|
||||
newFieldSet.setField(arrayEntryAt.getKey(), arrayEntryAt.getValue());
|
||||
}
|
||||
for (Map.Entry<FieldDescriptorType, Object> entry : this.fields.getOverflowEntries()) {
|
||||
newFieldSet.setField(entry.getKey(), entry.getValue());
|
||||
}
|
||||
newFieldSet.hasLazyField = this.hasLazyField;
|
||||
return newFieldSet;
|
||||
}
|
||||
|
||||
private FieldSet(boolean z3) {
|
||||
makeImmutable();
|
||||
}
|
||||
|
||||
private boolean isInitialized(Map.Entry<FieldDescriptorType, Object> entry) {
|
||||
FieldDescriptorType key = entry.getKey();
|
||||
if (key.getLiteJavaType() == WireFormat.JavaType.MESSAGE) {
|
||||
if (key.isRepeated()) {
|
||||
Iterator it = ((List) entry.getValue()).iterator();
|
||||
while (it.hasNext()) {
|
||||
if (!((MessageLite) it.next()).isInitialized()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Object value = entry.getValue();
|
||||
if (value instanceof MessageLite) {
|
||||
if (!((MessageLite) value).isInitialized()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (value instanceof LazyField) {
|
||||
return true;
|
||||
}
|
||||
throw new IllegalArgumentException("Wrong object type used with protocol message reflection.");
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.AbstractMessageLite;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.FieldSet;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.Internal;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.MessageLite;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.WireFormat;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public abstract class GeneratedMessageLite extends AbstractMessageLite implements Serializable {
|
||||
|
||||
/* renamed from: kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite$1, reason: invalid class name */
|
||||
/* loaded from: classes3.dex */
|
||||
public static /* synthetic */ class AnonymousClass1 {
|
||||
static final /* synthetic */ int[] $SwitchMap$com$google$protobuf$WireFormat$JavaType;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[WireFormat.JavaType.values().length];
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType = iArr;
|
||||
try {
|
||||
iArr[WireFormat.JavaType.MESSAGE.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
$SwitchMap$com$google$protobuf$WireFormat$JavaType[WireFormat.JavaType.ENUM.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ExtendableMessageOrBuilder<MessageType extends ExtendableMessage> extends MessageLiteOrBuilder {
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static final class ExtensionDescriptor implements FieldSet.FieldDescriptorLite<ExtensionDescriptor> {
|
||||
final Internal.EnumLiteMap<?> enumTypeMap;
|
||||
final boolean isPacked;
|
||||
final boolean isRepeated;
|
||||
final int number;
|
||||
final WireFormat.FieldType type;
|
||||
|
||||
public ExtensionDescriptor(Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, boolean z3, boolean z4) {
|
||||
this.enumTypeMap = enumLiteMap;
|
||||
this.number = i;
|
||||
this.type = fieldType;
|
||||
this.isRepeated = z3;
|
||||
this.isPacked = z4;
|
||||
}
|
||||
|
||||
public Internal.EnumLiteMap<?> getEnumType() {
|
||||
return this.enumTypeMap;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public WireFormat.JavaType getLiteJavaType() {
|
||||
return this.type.getJavaType();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public WireFormat.FieldType getLiteType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public int getNumber() {
|
||||
return this.number;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public MessageLite.Builder internalMergeFrom(MessageLite.Builder builder, MessageLite messageLite) {
|
||||
return ((Builder) builder).mergeFrom((GeneratedMessageLite) messageLite);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public boolean isPacked() {
|
||||
return this.isPacked;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.FieldSet.FieldDescriptorLite
|
||||
public boolean isRepeated() {
|
||||
return this.isRepeated;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(ExtensionDescriptor extensionDescriptor) {
|
||||
return this.number - extensionDescriptor.number;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class GeneratedExtension<ContainingType extends MessageLite, Type> {
|
||||
final ContainingType containingTypeDefaultInstance;
|
||||
final Type defaultValue;
|
||||
final ExtensionDescriptor descriptor;
|
||||
final Method enumValueOf;
|
||||
final MessageLite messageDefaultInstance;
|
||||
final Class singularType;
|
||||
|
||||
public GeneratedExtension(ContainingType containingtype, Type type, MessageLite messageLite, ExtensionDescriptor extensionDescriptor, Class cls) {
|
||||
if (containingtype == null) {
|
||||
throw new IllegalArgumentException("Null containingTypeDefaultInstance");
|
||||
}
|
||||
if (extensionDescriptor.getLiteType() == WireFormat.FieldType.MESSAGE && messageLite == null) {
|
||||
throw new IllegalArgumentException("Null messageDefaultInstance");
|
||||
}
|
||||
this.containingTypeDefaultInstance = containingtype;
|
||||
this.defaultValue = type;
|
||||
this.messageDefaultInstance = messageLite;
|
||||
this.descriptor = extensionDescriptor;
|
||||
this.singularType = cls;
|
||||
if (Internal.EnumLite.class.isAssignableFrom(cls)) {
|
||||
this.enumValueOf = GeneratedMessageLite.getMethodOrDie(cls, "valueOf", Integer.TYPE);
|
||||
} else {
|
||||
this.enumValueOf = null;
|
||||
}
|
||||
}
|
||||
|
||||
public Object fromFieldSetType(Object obj) {
|
||||
if (!this.descriptor.isRepeated()) {
|
||||
return singularFromFieldSetType(obj);
|
||||
}
|
||||
if (this.descriptor.getLiteJavaType() != WireFormat.JavaType.ENUM) {
|
||||
return obj;
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator it = ((List) obj).iterator();
|
||||
while (it.hasNext()) {
|
||||
arrayList.add(singularFromFieldSetType(it.next()));
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public ContainingType getContainingTypeDefaultInstance() {
|
||||
return this.containingTypeDefaultInstance;
|
||||
}
|
||||
|
||||
public MessageLite getMessageDefaultInstance() {
|
||||
return this.messageDefaultInstance;
|
||||
}
|
||||
|
||||
public int getNumber() {
|
||||
return this.descriptor.getNumber();
|
||||
}
|
||||
|
||||
public Object singularFromFieldSetType(Object obj) {
|
||||
return this.descriptor.getLiteJavaType() == WireFormat.JavaType.ENUM ? GeneratedMessageLite.invokeOrDie(this.enumValueOf, null, (Integer) obj) : obj;
|
||||
}
|
||||
|
||||
public Object singularToFieldSetType(Object obj) {
|
||||
return this.descriptor.getLiteJavaType() == WireFormat.JavaType.ENUM ? Integer.valueOf(((Internal.EnumLite) obj).getNumber()) : obj;
|
||||
}
|
||||
}
|
||||
|
||||
public GeneratedMessageLite() {
|
||||
}
|
||||
|
||||
public static Method getMethodOrDie(Class cls, String str, Class... clsArr) {
|
||||
try {
|
||||
return cls.getMethod(str, clsArr);
|
||||
} catch (NoSuchMethodException e4) {
|
||||
String name = cls.getName();
|
||||
String valueOf = String.valueOf(str);
|
||||
StringBuilder sb = new StringBuilder(valueOf.length() + name.length() + 45);
|
||||
sb.append("Generated message class \"");
|
||||
sb.append(name);
|
||||
sb.append("\" missing method \"");
|
||||
sb.append(valueOf);
|
||||
sb.append("\".");
|
||||
throw new RuntimeException(sb.toString(), e4);
|
||||
}
|
||||
}
|
||||
|
||||
public static Object invokeOrDie(Method method, Object obj, Object... objArr) {
|
||||
try {
|
||||
return method.invoke(obj, objArr);
|
||||
} catch (IllegalAccessException e4) {
|
||||
throw new RuntimeException("Couldn't use Java reflection to implement protocol message reflection.", e4);
|
||||
} catch (InvocationTargetException e5) {
|
||||
Throwable cause = e5.getCause();
|
||||
if (cause instanceof RuntimeException) {
|
||||
throw ((RuntimeException) cause);
|
||||
}
|
||||
if (cause instanceof Error) {
|
||||
throw ((Error) cause);
|
||||
}
|
||||
throw new RuntimeException("Unexpected exception thrown by generated accessor method.", cause);
|
||||
}
|
||||
}
|
||||
|
||||
public static <ContainingType extends MessageLite, Type> GeneratedExtension<ContainingType, Type> newRepeatedGeneratedExtension(ContainingType containingtype, MessageLite messageLite, Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, boolean z3, Class cls) {
|
||||
return new GeneratedExtension<>(containingtype, Collections.EMPTY_LIST, messageLite, new ExtensionDescriptor(enumLiteMap, i, fieldType, true, z3), cls);
|
||||
}
|
||||
|
||||
public static <ContainingType extends MessageLite, Type> GeneratedExtension<ContainingType, Type> newSingularGeneratedExtension(ContainingType containingtype, Type type, MessageLite messageLite, Internal.EnumLiteMap<?> enumLiteMap, int i, WireFormat.FieldType fieldType, Class cls) {
|
||||
return new GeneratedExtension<>(containingtype, type, messageLite, new ExtensionDescriptor(enumLiteMap, i, fieldType, false, false), cls);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.MessageLite
|
||||
public Parser<? extends MessageLite> getParserForType() {
|
||||
throw new UnsupportedOperationException("This is supposed to be overridden by subclasses.");
|
||||
}
|
||||
|
||||
public void makeExtensionsImmutable() {
|
||||
}
|
||||
|
||||
public boolean parseUnknownField(CodedInputStream codedInputStream, CodedOutputStream codedOutputStream, ExtensionRegistryLite extensionRegistryLite, int i) throws IOException {
|
||||
return codedInputStream.skipField(i, codedOutputStream);
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class Builder<MessageType extends GeneratedMessageLite, BuilderType extends Builder> extends AbstractMessageLite.Builder<BuilderType> {
|
||||
private ByteString unknownFields = ByteString.EMPTY;
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.MessageLiteOrBuilder
|
||||
public abstract MessageType getDefaultInstanceForType();
|
||||
|
||||
public final ByteString getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
|
||||
public abstract BuilderType mergeFrom(MessageType messagetype);
|
||||
|
||||
public final BuilderType setUnknownFields(ByteString byteString) {
|
||||
this.unknownFields = byteString;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.AbstractMessageLite.Builder
|
||||
/* renamed from: clone */
|
||||
public BuilderType mo1392clone() {
|
||||
throw new UnsupportedOperationException("This is supposed to be overridden by subclasses.");
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class ExtendableMessage<MessageType extends ExtendableMessage<MessageType>> extends GeneratedMessageLite implements ExtendableMessageOrBuilder<MessageType> {
|
||||
private final FieldSet<ExtensionDescriptor> extensions;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class ExtensionWriter {
|
||||
private final Iterator<Map.Entry<ExtensionDescriptor, Object>> iter;
|
||||
private final boolean messageSetWireFormat;
|
||||
private Map.Entry<ExtensionDescriptor, Object> next;
|
||||
|
||||
public /* synthetic */ ExtensionWriter(ExtendableMessage extendableMessage, boolean z3, AnonymousClass1 anonymousClass1) {
|
||||
this(z3);
|
||||
}
|
||||
|
||||
public void writeUntil(int i, CodedOutputStream codedOutputStream) throws IOException {
|
||||
while (true) {
|
||||
Map.Entry<ExtensionDescriptor, Object> entry = this.next;
|
||||
if (entry == null || entry.getKey().getNumber() >= i) {
|
||||
return;
|
||||
}
|
||||
ExtensionDescriptor key = this.next.getKey();
|
||||
if (this.messageSetWireFormat && key.getLiteJavaType() == WireFormat.JavaType.MESSAGE && !key.isRepeated()) {
|
||||
codedOutputStream.writeMessageSetExtension(key.getNumber(), (MessageLite) this.next.getValue());
|
||||
} else {
|
||||
FieldSet.writeField(key, this.next.getValue(), codedOutputStream);
|
||||
}
|
||||
if (this.iter.hasNext()) {
|
||||
this.next = this.iter.next();
|
||||
} else {
|
||||
this.next = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private ExtensionWriter(boolean z3) {
|
||||
Iterator<Map.Entry<ExtensionDescriptor, Object>> it = ExtendableMessage.this.extensions.iterator();
|
||||
this.iter = it;
|
||||
if (it.hasNext()) {
|
||||
this.next = it.next();
|
||||
}
|
||||
this.messageSetWireFormat = z3;
|
||||
}
|
||||
}
|
||||
|
||||
public ExtendableMessage() {
|
||||
this.extensions = FieldSet.newFieldSet();
|
||||
}
|
||||
|
||||
private void verifyExtensionContainingType(GeneratedExtension<MessageType, ?> generatedExtension) {
|
||||
if (generatedExtension.getContainingTypeDefaultInstance() != getDefaultInstanceForType()) {
|
||||
throw new IllegalArgumentException("This extension is for a different message type. Please make sure that you are not suppressing any generics type warnings.");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean extensionsAreInitialized() {
|
||||
return this.extensions.isInitialized();
|
||||
}
|
||||
|
||||
public int extensionsSerializedSize() {
|
||||
return this.extensions.getSerializedSize();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final <Type> Type getExtension(GeneratedExtension<MessageType, Type> generatedExtension) {
|
||||
verifyExtensionContainingType(generatedExtension);
|
||||
Object field = this.extensions.getField(generatedExtension.descriptor);
|
||||
if (field == null) {
|
||||
return generatedExtension.defaultValue;
|
||||
}
|
||||
return (Type) generatedExtension.fromFieldSetType(field);
|
||||
}
|
||||
|
||||
public final <Type> int getExtensionCount(GeneratedExtension<MessageType, List<Type>> generatedExtension) {
|
||||
verifyExtensionContainingType(generatedExtension);
|
||||
return this.extensions.getRepeatedFieldCount(generatedExtension.descriptor);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public final <Type> boolean hasExtension(GeneratedExtension<MessageType, Type> generatedExtension) {
|
||||
verifyExtensionContainingType(generatedExtension);
|
||||
return this.extensions.hasField(generatedExtension.descriptor);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite
|
||||
public void makeExtensionsImmutable() {
|
||||
this.extensions.makeImmutable();
|
||||
}
|
||||
|
||||
public ExtendableMessage<MessageType>.ExtensionWriter newExtensionWriter() {
|
||||
return new ExtensionWriter(this, false, null);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite
|
||||
public boolean parseUnknownField(CodedInputStream codedInputStream, CodedOutputStream codedOutputStream, ExtensionRegistryLite extensionRegistryLite, int i) throws IOException {
|
||||
return GeneratedMessageLite.parseUnknownField(this.extensions, getDefaultInstanceForType(), codedInputStream, codedOutputStream, extensionRegistryLite, i);
|
||||
}
|
||||
|
||||
public ExtendableMessage(ExtendableBuilder<MessageType, ?> extendableBuilder) {
|
||||
this.extensions = extendableBuilder.buildExtensions();
|
||||
}
|
||||
|
||||
public final <Type> Type getExtension(GeneratedExtension<MessageType, List<Type>> generatedExtension, int i) {
|
||||
verifyExtensionContainingType(generatedExtension);
|
||||
return (Type) generatedExtension.singularFromFieldSetType(this.extensions.getRepeatedField(generatedExtension.descriptor, i));
|
||||
}
|
||||
}
|
||||
|
||||
public GeneratedMessageLite(Builder builder) {
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:5:0x0040 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0045 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static <MessageType extends kotlin.reflect.jvm.internal.impl.protobuf.MessageLite> boolean parseUnknownField(kotlin.reflect.jvm.internal.impl.protobuf.FieldSet<kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite.ExtensionDescriptor> r5, MessageType r6, kotlin.reflect.jvm.internal.impl.protobuf.CodedInputStream r7, kotlin.reflect.jvm.internal.impl.protobuf.CodedOutputStream r8, kotlin.reflect.jvm.internal.impl.protobuf.ExtensionRegistryLite r9, int r10) throws java.io.IOException {
|
||||
/*
|
||||
Method dump skipped, instructions count: 291
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite.parseUnknownField(kotlin.reflect.jvm.internal.impl.protobuf.FieldSet, kotlin.reflect.jvm.internal.impl.protobuf.MessageLite, kotlin.reflect.jvm.internal.impl.protobuf.CodedInputStream, kotlin.reflect.jvm.internal.impl.protobuf.CodedOutputStream, kotlin.reflect.jvm.internal.impl.protobuf.ExtensionRegistryLite, int):boolean");
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static abstract class ExtendableBuilder<MessageType extends ExtendableMessage<MessageType>, BuilderType extends ExtendableBuilder<MessageType, BuilderType>> extends Builder<MessageType, BuilderType> implements ExtendableMessageOrBuilder<MessageType> {
|
||||
private FieldSet<ExtensionDescriptor> extensions = FieldSet.emptySet();
|
||||
private boolean extensionsIsMutable;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public FieldSet<ExtensionDescriptor> buildExtensions() {
|
||||
this.extensions.makeImmutable();
|
||||
this.extensionsIsMutable = false;
|
||||
return this.extensions;
|
||||
}
|
||||
|
||||
private void ensureExtensionsIsMutable() {
|
||||
if (this.extensionsIsMutable) {
|
||||
return;
|
||||
}
|
||||
this.extensions = this.extensions.clone();
|
||||
this.extensionsIsMutable = true;
|
||||
}
|
||||
|
||||
public boolean extensionsAreInitialized() {
|
||||
return this.extensions.isInitialized();
|
||||
}
|
||||
|
||||
public final void mergeExtensionFields(MessageType messagetype) {
|
||||
ensureExtensionsIsMutable();
|
||||
this.extensions.mergeFrom(((ExtendableMessage) messagetype).extensions);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.GeneratedMessageLite.Builder, kotlin.reflect.jvm.internal.impl.protobuf.AbstractMessageLite.Builder
|
||||
/* renamed from: clone */
|
||||
public BuilderType mo1392clone() {
|
||||
throw new UnsupportedOperationException("This is supposed to be overridden by subclasses.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Internal {
|
||||
public static final byte[] EMPTY_BYTE_ARRAY;
|
||||
public static final ByteBuffer EMPTY_BYTE_BUFFER;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface EnumLite {
|
||||
int getNumber();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface EnumLiteMap<T extends EnumLite> {
|
||||
T findValueByNumber(int i);
|
||||
}
|
||||
|
||||
static {
|
||||
byte[] bArr = new byte[0];
|
||||
EMPTY_BYTE_ARRAY = bArr;
|
||||
EMPTY_BYTE_BUFFER = ByteBuffer.wrap(bArr);
|
||||
}
|
||||
|
||||
public static boolean isValidUtf8(byte[] bArr) {
|
||||
return Utf8.isValidUtf8(bArr);
|
||||
}
|
||||
|
||||
public static String toStringUtf8(byte[] bArr) {
|
||||
try {
|
||||
return new String(bArr, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e4) {
|
||||
throw new RuntimeException("UTF-8 not supported?", e4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class InvalidProtocolBufferException extends IOException {
|
||||
private MessageLite unfinishedMessage;
|
||||
|
||||
public InvalidProtocolBufferException(String str) {
|
||||
super(str);
|
||||
this.unfinishedMessage = null;
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException invalidEndTag() {
|
||||
return new InvalidProtocolBufferException("Protocol message end-group tag did not match expected tag.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException invalidTag() {
|
||||
return new InvalidProtocolBufferException("Protocol message contained an invalid tag (zero).");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException invalidUtf8() {
|
||||
return new InvalidProtocolBufferException("Protocol message had invalid UTF-8.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException invalidWireType() {
|
||||
return new InvalidProtocolBufferException("Protocol message tag had invalid wire type.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException malformedVarint() {
|
||||
return new InvalidProtocolBufferException("CodedInputStream encountered a malformed varint.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException negativeSize() {
|
||||
return new InvalidProtocolBufferException("CodedInputStream encountered an embedded string or message which claimed to have negative size.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException recursionLimitExceeded() {
|
||||
return new InvalidProtocolBufferException("Protocol message had too many levels of nesting. May be malicious. Use CodedInputStream.setRecursionLimit() to increase the depth limit.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException sizeLimitExceeded() {
|
||||
return new InvalidProtocolBufferException("Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.");
|
||||
}
|
||||
|
||||
public static InvalidProtocolBufferException truncatedMessage() {
|
||||
return new InvalidProtocolBufferException("While parsing a protocol message, the input ended unexpectedly in the middle of a field. This could mean either than the input has been truncated or that an embedded message misreported its own length.");
|
||||
}
|
||||
|
||||
public MessageLite getUnfinishedMessage() {
|
||||
return this.unfinishedMessage;
|
||||
}
|
||||
|
||||
public InvalidProtocolBufferException setUnfinishedMessage(MessageLite messageLite) {
|
||||
this.unfinishedMessage = messageLite;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class LazyField extends LazyFieldLite {
|
||||
private final MessageLite defaultInstance;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class LazyEntry<K> implements Map.Entry<K, Object> {
|
||||
private Map.Entry<K, LazyField> entry;
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public K getKey() {
|
||||
return this.entry.getKey();
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public Object getValue() {
|
||||
LazyField value = this.entry.getValue();
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return value.getValue();
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public Object setValue(Object obj) {
|
||||
if (obj instanceof MessageLite) {
|
||||
return this.entry.getValue().setValue((MessageLite) obj);
|
||||
}
|
||||
throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite");
|
||||
}
|
||||
|
||||
private LazyEntry(Map.Entry<K, LazyField> entry) {
|
||||
this.entry = entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class LazyIterator<K> implements Iterator<Map.Entry<K, Object>> {
|
||||
private Iterator<Map.Entry<K, Object>> iterator;
|
||||
|
||||
public LazyIterator(Iterator<Map.Entry<K, Object>> it) {
|
||||
this.iterator = it;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.iterator.hasNext();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
this.iterator.remove();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public Map.Entry<K, Object> next() {
|
||||
Map.Entry<K, Object> next = this.iterator.next();
|
||||
return next.getValue() instanceof LazyField ? new LazyEntry(next) : next;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
return getValue().equals(obj);
|
||||
}
|
||||
|
||||
public MessageLite getValue() {
|
||||
return getValue(this.defaultInstance);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return getValue().hashCode();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getValue().toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class LazyFieldLite {
|
||||
private ByteString bytes;
|
||||
private ExtensionRegistryLite extensionRegistry;
|
||||
private volatile boolean isDirty;
|
||||
protected volatile MessageLite value;
|
||||
|
||||
public void ensureInitialized(MessageLite messageLite) {
|
||||
if (this.value != null) {
|
||||
return;
|
||||
}
|
||||
synchronized (this) {
|
||||
if (this.value != null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (this.bytes != null) {
|
||||
this.value = messageLite.getParserForType().parseFrom(this.bytes, this.extensionRegistry);
|
||||
} else {
|
||||
this.value = messageLite;
|
||||
}
|
||||
} catch (IOException unused) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
return this.isDirty ? this.value.getSerializedSize() : this.bytes.size();
|
||||
}
|
||||
|
||||
public MessageLite getValue(MessageLite messageLite) {
|
||||
ensureInitialized(messageLite);
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public MessageLite setValue(MessageLite messageLite) {
|
||||
MessageLite messageLite2 = this.value;
|
||||
this.value = messageLite;
|
||||
this.bytes = null;
|
||||
this.isDirty = true;
|
||||
return messageLite2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.RandomAccess;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class LazyStringArrayList extends AbstractList<String> implements RandomAccess, LazyStringList {
|
||||
public static final LazyStringList EMPTY = new LazyStringArrayList().getUnmodifiableView();
|
||||
private final List<Object> list;
|
||||
|
||||
public LazyStringArrayList() {
|
||||
this.list = new ArrayList();
|
||||
}
|
||||
|
||||
private static ByteString asByteString(Object obj) {
|
||||
return obj instanceof ByteString ? (ByteString) obj : obj instanceof String ? ByteString.copyFromUtf8((String) obj) : ByteString.copyFrom((byte[]) obj);
|
||||
}
|
||||
|
||||
private static String asString(Object obj) {
|
||||
return obj instanceof String ? (String) obj : obj instanceof ByteString ? ((ByteString) obj).toStringUtf8() : Internal.toStringUtf8((byte[]) obj);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
||||
public boolean addAll(Collection<? extends String> collection) {
|
||||
return addAll(size(), collection);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.util.List
|
||||
public void clear() {
|
||||
this.list.clear();
|
||||
((AbstractList) this).modCount++;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public ByteString getByteString(int i) {
|
||||
Object obj = this.list.get(i);
|
||||
ByteString asByteString = asByteString(obj);
|
||||
if (asByteString != obj) {
|
||||
this.list.set(i, asByteString);
|
||||
}
|
||||
return asByteString;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public List<?> getUnderlyingElements() {
|
||||
return Collections.unmodifiableList(this.list);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public LazyStringList getUnmodifiableView() {
|
||||
return new UnmodifiableLazyStringList(this);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
||||
public int size() {
|
||||
return this.list.size();
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public void add(int i, String str) {
|
||||
this.list.add(i, str);
|
||||
((AbstractList) this).modCount++;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public boolean addAll(int i, Collection<? extends String> collection) {
|
||||
if (collection instanceof LazyStringList) {
|
||||
collection = ((LazyStringList) collection).getUnderlyingElements();
|
||||
}
|
||||
boolean addAll = this.list.addAll(i, collection);
|
||||
((AbstractList) this).modCount++;
|
||||
return addAll;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public String get(int i) {
|
||||
Object obj = this.list.get(i);
|
||||
if (obj instanceof String) {
|
||||
return (String) obj;
|
||||
}
|
||||
if (obj instanceof ByteString) {
|
||||
ByteString byteString = (ByteString) obj;
|
||||
String stringUtf8 = byteString.toStringUtf8();
|
||||
if (byteString.isValidUtf8()) {
|
||||
this.list.set(i, stringUtf8);
|
||||
}
|
||||
return stringUtf8;
|
||||
}
|
||||
byte[] bArr = (byte[]) obj;
|
||||
String stringUtf82 = Internal.toStringUtf8(bArr);
|
||||
if (Internal.isValidUtf8(bArr)) {
|
||||
this.list.set(i, stringUtf82);
|
||||
}
|
||||
return stringUtf82;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public String remove(int i) {
|
||||
Object remove = this.list.remove(i);
|
||||
((AbstractList) this).modCount++;
|
||||
return asString(remove);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public String set(int i, String str) {
|
||||
return asString(this.list.set(i, str));
|
||||
}
|
||||
|
||||
public LazyStringArrayList(LazyStringList lazyStringList) {
|
||||
this.list = new ArrayList(lazyStringList.size());
|
||||
addAll(lazyStringList);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public void add(ByteString byteString) {
|
||||
this.list.add(byteString);
|
||||
((AbstractList) this).modCount++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface LazyStringList extends ProtocolStringList {
|
||||
void add(ByteString byteString);
|
||||
|
||||
ByteString getByteString(int i);
|
||||
|
||||
List<?> getUnderlyingElements();
|
||||
|
||||
LazyStringList getUnmodifiableView();
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import C.w;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.ByteString;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class LiteralByteString extends ByteString {
|
||||
protected final byte[] bytes;
|
||||
private int hash = 0;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class LiteralByteIterator implements ByteString.ByteIterator {
|
||||
private final int limit;
|
||||
private int position;
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.position < this.limit;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString.ByteIterator
|
||||
public byte nextByte() {
|
||||
try {
|
||||
byte[] bArr = LiteralByteString.this.bytes;
|
||||
int i = this.position;
|
||||
this.position = i + 1;
|
||||
return bArr[i];
|
||||
} catch (ArrayIndexOutOfBoundsException e4) {
|
||||
throw new NoSuchElementException(e4.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private LiteralByteIterator() {
|
||||
this.position = 0;
|
||||
this.limit = LiteralByteString.this.size();
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // java.util.Iterator
|
||||
public Byte next() {
|
||||
return Byte.valueOf(nextByte());
|
||||
}
|
||||
}
|
||||
|
||||
public LiteralByteString(byte[] bArr) {
|
||||
this.bytes = bArr;
|
||||
}
|
||||
|
||||
public byte byteAt(int i) {
|
||||
return this.bytes[i];
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public void copyToInternal(byte[] bArr, int i, int i4, int i5) {
|
||||
System.arraycopy(this.bytes, i, bArr, i4, i5);
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ByteString) || size() != ((ByteString) obj).size()) {
|
||||
return false;
|
||||
}
|
||||
if (size() == 0) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof LiteralByteString) {
|
||||
return equalsRange((LiteralByteString) obj, 0, size());
|
||||
}
|
||||
if (obj instanceof RopeByteString) {
|
||||
return obj.equals(this);
|
||||
}
|
||||
String valueOf = String.valueOf(obj.getClass());
|
||||
throw new IllegalArgumentException(w.r(new StringBuilder(valueOf.length() + 49), "Has a new type of ByteString been created? Found ", valueOf));
|
||||
}
|
||||
|
||||
public boolean equalsRange(LiteralByteString literalByteString, int i, int i4) {
|
||||
if (i4 > literalByteString.size()) {
|
||||
int size = size();
|
||||
StringBuilder sb = new StringBuilder(40);
|
||||
sb.append("Length too large: ");
|
||||
sb.append(i4);
|
||||
sb.append(size);
|
||||
throw new IllegalArgumentException(sb.toString());
|
||||
}
|
||||
if (i + i4 > literalByteString.size()) {
|
||||
int size2 = literalByteString.size();
|
||||
StringBuilder sb2 = new StringBuilder(59);
|
||||
sb2.append("Ran off end of other: ");
|
||||
sb2.append(i);
|
||||
sb2.append(", ");
|
||||
sb2.append(i4);
|
||||
sb2.append(", ");
|
||||
sb2.append(size2);
|
||||
throw new IllegalArgumentException(sb2.toString());
|
||||
}
|
||||
byte[] bArr = this.bytes;
|
||||
byte[] bArr2 = literalByteString.bytes;
|
||||
int offsetIntoBytes = getOffsetIntoBytes() + i4;
|
||||
int offsetIntoBytes2 = getOffsetIntoBytes();
|
||||
int offsetIntoBytes3 = literalByteString.getOffsetIntoBytes() + i;
|
||||
while (offsetIntoBytes2 < offsetIntoBytes) {
|
||||
if (bArr[offsetIntoBytes2] != bArr2[offsetIntoBytes3]) {
|
||||
return false;
|
||||
}
|
||||
offsetIntoBytes2++;
|
||||
offsetIntoBytes3++;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getOffsetIntoBytes() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int getTreeDepth() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int i = this.hash;
|
||||
if (i == 0) {
|
||||
int size = size();
|
||||
i = partialHash(size, 0, size);
|
||||
if (i == 0) {
|
||||
i = 1;
|
||||
}
|
||||
this.hash = i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public boolean isBalanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public boolean isValidUtf8() {
|
||||
int offsetIntoBytes = getOffsetIntoBytes();
|
||||
return Utf8.isValidUtf8(this.bytes, offsetIntoBytes, size() + offsetIntoBytes);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public CodedInputStream newCodedInput() {
|
||||
return CodedInputStream.newInstance(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int partialHash(int i, int i4, int i5) {
|
||||
return hashCode(i, this.bytes, getOffsetIntoBytes() + i4, i5);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int partialIsValidUtf8(int i, int i4, int i5) {
|
||||
int offsetIntoBytes = getOffsetIntoBytes() + i4;
|
||||
return Utf8.partialIsValidUtf8(i, this.bytes, offsetIntoBytes, i5 + offsetIntoBytes);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int peekCachedHashCode() {
|
||||
return this.hash;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int size() {
|
||||
return this.bytes.length;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public String toString(String str) throws UnsupportedEncodingException {
|
||||
return new String(this.bytes, getOffsetIntoBytes(), size(), str);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public void writeToInternal(OutputStream outputStream, int i, int i4) throws IOException {
|
||||
outputStream.write(this.bytes, getOffsetIntoBytes() + i, i4);
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString, java.lang.Iterable
|
||||
public Iterator<Byte> iterator() {
|
||||
return new LiteralByteIterator();
|
||||
}
|
||||
|
||||
public static int hashCode(int i, byte[] bArr, int i4, int i5) {
|
||||
for (int i6 = i4; i6 < i4 + i5; i6++) {
|
||||
i = (i * 31) + bArr[i6];
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface MessageLite extends MessageLiteOrBuilder {
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Builder extends Cloneable, MessageLiteOrBuilder {
|
||||
MessageLite build();
|
||||
|
||||
Builder mergeFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws IOException;
|
||||
}
|
||||
|
||||
Parser<? extends MessageLite> getParserForType();
|
||||
|
||||
int getSerializedSize();
|
||||
|
||||
Builder newBuilderForType();
|
||||
|
||||
Builder toBuilder();
|
||||
|
||||
void writeTo(CodedOutputStream codedOutputStream) throws IOException;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface MessageLiteOrBuilder {
|
||||
MessageLite getDefaultInstanceForType();
|
||||
|
||||
boolean isInitialized();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface Parser<MessageType> {
|
||||
MessageType parseDelimitedFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException;
|
||||
|
||||
MessageType parseFrom(InputStream inputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException;
|
||||
|
||||
MessageType parseFrom(ByteString byteString, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException;
|
||||
|
||||
MessageType parsePartialFrom(CodedInputStream codedInputStream, ExtensionRegistryLite extensionRegistryLite) throws InvalidProtocolBufferException;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public interface ProtocolStringList extends List<String> {
|
||||
}
|
||||
@@ -0,0 +1,542 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import C.w;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Stack;
|
||||
import kotlin.UByte;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.ByteString;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class RopeByteString extends ByteString {
|
||||
private static final int[] minLengthByDepth;
|
||||
private int hash;
|
||||
private final ByteString left;
|
||||
private final int leftLength;
|
||||
private final ByteString right;
|
||||
private final int totalLength;
|
||||
private final int treeDepth;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class Balancer {
|
||||
private final Stack<ByteString> prefixesStack;
|
||||
|
||||
private Balancer() {
|
||||
this.prefixesStack = new Stack<>();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public ByteString balance(ByteString byteString, ByteString byteString2) {
|
||||
doBalance(byteString);
|
||||
doBalance(byteString2);
|
||||
ByteString pop = this.prefixesStack.pop();
|
||||
while (!this.prefixesStack.isEmpty()) {
|
||||
pop = new RopeByteString(this.prefixesStack.pop(), pop);
|
||||
}
|
||||
return pop;
|
||||
}
|
||||
|
||||
private void doBalance(ByteString byteString) {
|
||||
if (byteString.isBalanced()) {
|
||||
insert(byteString);
|
||||
} else {
|
||||
if (!(byteString instanceof RopeByteString)) {
|
||||
String valueOf = String.valueOf(byteString.getClass());
|
||||
throw new IllegalArgumentException(w.r(new StringBuilder(valueOf.length() + 49), "Has a new type of ByteString been created? Found ", valueOf));
|
||||
}
|
||||
RopeByteString ropeByteString = (RopeByteString) byteString;
|
||||
doBalance(ropeByteString.left);
|
||||
doBalance(ropeByteString.right);
|
||||
}
|
||||
}
|
||||
|
||||
private int getDepthBinForLength(int i) {
|
||||
int binarySearch = Arrays.binarySearch(RopeByteString.minLengthByDepth, i);
|
||||
return binarySearch < 0 ? (-(binarySearch + 1)) - 1 : binarySearch;
|
||||
}
|
||||
|
||||
private void insert(ByteString byteString) {
|
||||
int depthBinForLength = getDepthBinForLength(byteString.size());
|
||||
int i = RopeByteString.minLengthByDepth[depthBinForLength + 1];
|
||||
if (this.prefixesStack.isEmpty() || this.prefixesStack.peek().size() >= i) {
|
||||
this.prefixesStack.push(byteString);
|
||||
return;
|
||||
}
|
||||
int i4 = RopeByteString.minLengthByDepth[depthBinForLength];
|
||||
ByteString pop = this.prefixesStack.pop();
|
||||
while (true) {
|
||||
if (this.prefixesStack.isEmpty() || this.prefixesStack.peek().size() >= i4) {
|
||||
break;
|
||||
} else {
|
||||
pop = new RopeByteString(this.prefixesStack.pop(), pop);
|
||||
}
|
||||
}
|
||||
RopeByteString ropeByteString = new RopeByteString(pop, byteString);
|
||||
while (!this.prefixesStack.isEmpty()) {
|
||||
if (this.prefixesStack.peek().size() >= RopeByteString.minLengthByDepth[getDepthBinForLength(ropeByteString.size()) + 1]) {
|
||||
break;
|
||||
} else {
|
||||
ropeByteString = new RopeByteString(this.prefixesStack.pop(), ropeByteString);
|
||||
}
|
||||
}
|
||||
this.prefixesStack.push(ropeByteString);
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class PieceIterator implements Iterator<LiteralByteString> {
|
||||
private final Stack<RopeByteString> breadCrumbs;
|
||||
private LiteralByteString next;
|
||||
|
||||
private LiteralByteString getLeafByLeft(ByteString byteString) {
|
||||
while (byteString instanceof RopeByteString) {
|
||||
RopeByteString ropeByteString = (RopeByteString) byteString;
|
||||
this.breadCrumbs.push(ropeByteString);
|
||||
byteString = ropeByteString.left;
|
||||
}
|
||||
return (LiteralByteString) byteString;
|
||||
}
|
||||
|
||||
private LiteralByteString getNextNonEmptyLeaf() {
|
||||
while (!this.breadCrumbs.isEmpty()) {
|
||||
LiteralByteString leafByLeft = getLeafByLeft(this.breadCrumbs.pop().right);
|
||||
if (!leafByLeft.isEmpty()) {
|
||||
return leafByLeft;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.next != null;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private PieceIterator(ByteString byteString) {
|
||||
this.breadCrumbs = new Stack<>();
|
||||
this.next = getLeafByLeft(byteString);
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public LiteralByteString next() {
|
||||
LiteralByteString literalByteString = this.next;
|
||||
if (literalByteString != null) {
|
||||
this.next = getNextNonEmptyLeaf();
|
||||
return literalByteString;
|
||||
}
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class RopeByteIterator implements ByteString.ByteIterator {
|
||||
private ByteString.ByteIterator bytes;
|
||||
int bytesRemaining;
|
||||
private final PieceIterator pieces;
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.bytesRemaining > 0;
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r0v6, types: [kotlin.reflect.jvm.internal.impl.protobuf.ByteString$ByteIterator] */
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString.ByteIterator
|
||||
public byte nextByte() {
|
||||
if (!this.bytes.hasNext()) {
|
||||
this.bytes = this.pieces.next().iterator();
|
||||
}
|
||||
this.bytesRemaining--;
|
||||
return this.bytes.nextByte();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
/* JADX WARN: Type inference failed for: r0v2, types: [kotlin.reflect.jvm.internal.impl.protobuf.ByteString$ByteIterator] */
|
||||
private RopeByteIterator() {
|
||||
PieceIterator pieceIterator = new PieceIterator(RopeByteString.this);
|
||||
this.pieces = pieceIterator;
|
||||
this.bytes = pieceIterator.next().iterator();
|
||||
this.bytesRemaining = RopeByteString.this.size();
|
||||
}
|
||||
|
||||
/* JADX WARN: Can't rename method to resolve collision */
|
||||
@Override // java.util.Iterator
|
||||
public Byte next() {
|
||||
return Byte.valueOf(nextByte());
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
ArrayList arrayList = new ArrayList();
|
||||
int i = 1;
|
||||
int i4 = 1;
|
||||
while (i > 0) {
|
||||
arrayList.add(Integer.valueOf(i));
|
||||
int i5 = i4 + i;
|
||||
i4 = i;
|
||||
i = i5;
|
||||
}
|
||||
arrayList.add(Integer.MAX_VALUE);
|
||||
minLengthByDepth = new int[arrayList.size()];
|
||||
int i6 = 0;
|
||||
while (true) {
|
||||
int[] iArr = minLengthByDepth;
|
||||
if (i6 >= iArr.length) {
|
||||
return;
|
||||
}
|
||||
iArr[i6] = ((Integer) arrayList.get(i6)).intValue();
|
||||
i6++;
|
||||
}
|
||||
}
|
||||
|
||||
public static ByteString concatenate(ByteString byteString, ByteString byteString2) {
|
||||
RopeByteString ropeByteString = byteString instanceof RopeByteString ? (RopeByteString) byteString : null;
|
||||
if (byteString2.size() == 0) {
|
||||
return byteString;
|
||||
}
|
||||
if (byteString.size() == 0) {
|
||||
return byteString2;
|
||||
}
|
||||
int size = byteString2.size() + byteString.size();
|
||||
if (size < 128) {
|
||||
return concatenateBytes(byteString, byteString2);
|
||||
}
|
||||
if (ropeByteString != null) {
|
||||
if (byteString2.size() + ropeByteString.right.size() < 128) {
|
||||
return new RopeByteString(ropeByteString.left, concatenateBytes(ropeByteString.right, byteString2));
|
||||
}
|
||||
}
|
||||
if (ropeByteString == null || ropeByteString.left.getTreeDepth() <= ropeByteString.right.getTreeDepth() || ropeByteString.getTreeDepth() <= byteString2.getTreeDepth()) {
|
||||
return size >= minLengthByDepth[Math.max(byteString.getTreeDepth(), byteString2.getTreeDepth()) + 1] ? new RopeByteString(byteString, byteString2) : new Balancer().balance(byteString, byteString2);
|
||||
}
|
||||
return new RopeByteString(ropeByteString.left, new RopeByteString(ropeByteString.right, byteString2));
|
||||
}
|
||||
|
||||
private static LiteralByteString concatenateBytes(ByteString byteString, ByteString byteString2) {
|
||||
int size = byteString.size();
|
||||
int size2 = byteString2.size();
|
||||
byte[] bArr = new byte[size + size2];
|
||||
byteString.copyTo(bArr, 0, 0, size);
|
||||
byteString2.copyTo(bArr, 0, size, size2);
|
||||
return new LiteralByteString(bArr);
|
||||
}
|
||||
|
||||
private boolean equalsFragments(ByteString byteString) {
|
||||
PieceIterator pieceIterator = new PieceIterator(this);
|
||||
LiteralByteString next = pieceIterator.next();
|
||||
PieceIterator pieceIterator2 = new PieceIterator(byteString);
|
||||
LiteralByteString next2 = pieceIterator2.next();
|
||||
int i = 0;
|
||||
int i4 = 0;
|
||||
int i5 = 0;
|
||||
while (true) {
|
||||
int size = next.size() - i;
|
||||
int size2 = next2.size() - i4;
|
||||
int min = Math.min(size, size2);
|
||||
if (!(i == 0 ? next.equalsRange(next2, i4, min) : next2.equalsRange(next, i, min))) {
|
||||
return false;
|
||||
}
|
||||
i5 += min;
|
||||
int i6 = this.totalLength;
|
||||
if (i5 >= i6) {
|
||||
if (i5 == i6) {
|
||||
return true;
|
||||
}
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
if (min == size) {
|
||||
next = pieceIterator.next();
|
||||
i = 0;
|
||||
} else {
|
||||
i += min;
|
||||
}
|
||||
if (min == size2) {
|
||||
next2 = pieceIterator2.next();
|
||||
i4 = 0;
|
||||
} else {
|
||||
i4 += min;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public void copyToInternal(byte[] bArr, int i, int i4, int i5) {
|
||||
int i6 = i + i5;
|
||||
int i7 = this.leftLength;
|
||||
if (i6 <= i7) {
|
||||
this.left.copyToInternal(bArr, i, i4, i5);
|
||||
} else {
|
||||
if (i >= i7) {
|
||||
this.right.copyToInternal(bArr, i - i7, i4, i5);
|
||||
return;
|
||||
}
|
||||
int i8 = i7 - i;
|
||||
this.left.copyToInternal(bArr, i, i4, i8);
|
||||
this.right.copyToInternal(bArr, 0, i4 + i8, i5 - i8);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
int peekCachedHashCode;
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof ByteString)) {
|
||||
return false;
|
||||
}
|
||||
ByteString byteString = (ByteString) obj;
|
||||
if (this.totalLength != byteString.size()) {
|
||||
return false;
|
||||
}
|
||||
if (this.totalLength == 0) {
|
||||
return true;
|
||||
}
|
||||
if (this.hash == 0 || (peekCachedHashCode = byteString.peekCachedHashCode()) == 0 || this.hash == peekCachedHashCode) {
|
||||
return equalsFragments(byteString);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int getTreeDepth() {
|
||||
return this.treeDepth;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
int i = this.hash;
|
||||
if (i == 0) {
|
||||
int i4 = this.totalLength;
|
||||
i = partialHash(i4, 0, i4);
|
||||
if (i == 0) {
|
||||
i = 1;
|
||||
}
|
||||
this.hash = i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public boolean isBalanced() {
|
||||
return this.totalLength >= minLengthByDepth[this.treeDepth];
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public boolean isValidUtf8() {
|
||||
int partialIsValidUtf8 = this.left.partialIsValidUtf8(0, 0, this.leftLength);
|
||||
ByteString byteString = this.right;
|
||||
return byteString.partialIsValidUtf8(partialIsValidUtf8, 0, byteString.size()) == 0;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public CodedInputStream newCodedInput() {
|
||||
return CodedInputStream.newInstance(new RopeInputStream());
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int partialHash(int i, int i4, int i5) {
|
||||
int i6 = i4 + i5;
|
||||
int i7 = this.leftLength;
|
||||
if (i6 <= i7) {
|
||||
return this.left.partialHash(i, i4, i5);
|
||||
}
|
||||
if (i4 >= i7) {
|
||||
return this.right.partialHash(i, i4 - i7, i5);
|
||||
}
|
||||
int i8 = i7 - i4;
|
||||
return this.right.partialHash(this.left.partialHash(i, i4, i8), 0, i5 - i8);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int partialIsValidUtf8(int i, int i4, int i5) {
|
||||
int i6 = i4 + i5;
|
||||
int i7 = this.leftLength;
|
||||
if (i6 <= i7) {
|
||||
return this.left.partialIsValidUtf8(i, i4, i5);
|
||||
}
|
||||
if (i4 >= i7) {
|
||||
return this.right.partialIsValidUtf8(i, i4 - i7, i5);
|
||||
}
|
||||
int i8 = i7 - i4;
|
||||
return this.right.partialIsValidUtf8(this.left.partialIsValidUtf8(i, i4, i8), 0, i5 - i8);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int peekCachedHashCode() {
|
||||
return this.hash;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public int size() {
|
||||
return this.totalLength;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public String toString(String str) throws UnsupportedEncodingException {
|
||||
return new String(toByteArray(), str);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString
|
||||
public void writeToInternal(OutputStream outputStream, int i, int i4) throws IOException {
|
||||
int i5 = i + i4;
|
||||
int i6 = this.leftLength;
|
||||
if (i5 <= i6) {
|
||||
this.left.writeToInternal(outputStream, i, i4);
|
||||
} else {
|
||||
if (i >= i6) {
|
||||
this.right.writeToInternal(outputStream, i - i6, i4);
|
||||
return;
|
||||
}
|
||||
int i7 = i6 - i;
|
||||
this.left.writeToInternal(outputStream, i, i7);
|
||||
this.right.writeToInternal(outputStream, 0, i4 - i7);
|
||||
}
|
||||
}
|
||||
|
||||
private RopeByteString(ByteString byteString, ByteString byteString2) {
|
||||
this.hash = 0;
|
||||
this.left = byteString;
|
||||
this.right = byteString2;
|
||||
int size = byteString.size();
|
||||
this.leftLength = size;
|
||||
this.totalLength = byteString2.size() + size;
|
||||
this.treeDepth = Math.max(byteString.getTreeDepth(), byteString2.getTreeDepth()) + 1;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.ByteString, java.lang.Iterable
|
||||
public Iterator<Byte> iterator() {
|
||||
return new RopeByteIterator();
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class RopeInputStream extends InputStream {
|
||||
private LiteralByteString currentPiece;
|
||||
private int currentPieceIndex;
|
||||
private int currentPieceOffsetInRope;
|
||||
private int currentPieceSize;
|
||||
private int mark;
|
||||
private PieceIterator pieceIterator;
|
||||
|
||||
public RopeInputStream() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
private void advanceIfCurrentPieceFullyRead() {
|
||||
if (this.currentPiece != null) {
|
||||
int i = this.currentPieceIndex;
|
||||
int i4 = this.currentPieceSize;
|
||||
if (i == i4) {
|
||||
this.currentPieceOffsetInRope += i4;
|
||||
this.currentPieceIndex = 0;
|
||||
if (!this.pieceIterator.hasNext()) {
|
||||
this.currentPiece = null;
|
||||
this.currentPieceSize = 0;
|
||||
} else {
|
||||
LiteralByteString next = this.pieceIterator.next();
|
||||
this.currentPiece = next;
|
||||
this.currentPieceSize = next.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
PieceIterator pieceIterator = new PieceIterator(RopeByteString.this);
|
||||
this.pieceIterator = pieceIterator;
|
||||
LiteralByteString next = pieceIterator.next();
|
||||
this.currentPiece = next;
|
||||
this.currentPieceSize = next.size();
|
||||
this.currentPieceIndex = 0;
|
||||
this.currentPieceOffsetInRope = 0;
|
||||
}
|
||||
|
||||
private int readSkipInternal(byte[] bArr, int i, int i4) {
|
||||
int i5 = i4;
|
||||
while (true) {
|
||||
if (i5 <= 0) {
|
||||
break;
|
||||
}
|
||||
advanceIfCurrentPieceFullyRead();
|
||||
if (this.currentPiece != null) {
|
||||
int min = Math.min(this.currentPieceSize - this.currentPieceIndex, i5);
|
||||
if (bArr != null) {
|
||||
this.currentPiece.copyTo(bArr, this.currentPieceIndex, i, min);
|
||||
i += min;
|
||||
}
|
||||
this.currentPieceIndex += min;
|
||||
i5 -= min;
|
||||
} else if (i5 == i4) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return i4 - i5;
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public int available() throws IOException {
|
||||
return RopeByteString.this.size() - (this.currentPieceOffsetInRope + this.currentPieceIndex);
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public void mark(int i) {
|
||||
this.mark = this.currentPieceOffsetInRope + this.currentPieceIndex;
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public boolean markSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public int read(byte[] bArr, int i, int i4) {
|
||||
bArr.getClass();
|
||||
if (i >= 0 && i4 >= 0 && i4 <= bArr.length - i) {
|
||||
return readSkipInternal(bArr, i, i4);
|
||||
}
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public synchronized void reset() {
|
||||
initialize();
|
||||
readSkipInternal(null, 0, this.mark);
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public long skip(long j4) {
|
||||
if (j4 < 0) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
}
|
||||
if (j4 > 2147483647L) {
|
||||
j4 = 2147483647L;
|
||||
}
|
||||
return readSkipInternal(null, 0, (int) j4);
|
||||
}
|
||||
|
||||
@Override // java.io.InputStream
|
||||
public int read() throws IOException {
|
||||
advanceIfCurrentPieceFullyRead();
|
||||
LiteralByteString literalByteString = this.currentPiece;
|
||||
if (literalByteString == null) {
|
||||
return -1;
|
||||
}
|
||||
int i = this.currentPieceIndex;
|
||||
this.currentPieceIndex = i + 1;
|
||||
return literalByteString.byteAt(i) & UByte.MAX_VALUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,437 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.lang.Comparable;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.AbstractSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
import kotlin.reflect.jvm.internal.impl.protobuf.FieldSet;
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: package-private */
|
||||
/* loaded from: classes3.dex */
|
||||
public class SmallSortedMap<K extends Comparable<K>, V> extends AbstractMap<K, V> {
|
||||
private List<SmallSortedMap<K, V>.Entry> entryList;
|
||||
private boolean isImmutable;
|
||||
private volatile SmallSortedMap<K, V>.EntrySet lazyEntrySet;
|
||||
private final int maxArraySize;
|
||||
private Map<K, V> overflowEntries;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public static class EmptySet {
|
||||
private static final Iterator<Object> ITERATOR = new Iterator<Object>() { // from class: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap.EmptySet.1
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public Object next() {
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
private static final Iterable<Object> ITERABLE = new Iterable<Object>() { // from class: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap.EmptySet.2
|
||||
@Override // java.lang.Iterable
|
||||
public Iterator<Object> iterator() {
|
||||
return EmptySet.ITERATOR;
|
||||
}
|
||||
};
|
||||
|
||||
public static <T> Iterable<T> iterable() {
|
||||
return (Iterable<T>) ITERABLE;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class Entry implements Comparable<SmallSortedMap<K, V>.Entry>, Map.Entry<K, V> {
|
||||
private final K key;
|
||||
private V value;
|
||||
|
||||
public Entry(SmallSortedMap smallSortedMap, Map.Entry<K, V> entry) {
|
||||
this(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof Map.Entry)) {
|
||||
return false;
|
||||
}
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
return equals(this.key, entry.getKey()) && equals(this.value, entry.getValue());
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public V getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public int hashCode() {
|
||||
K k4 = this.key;
|
||||
int hashCode = k4 == null ? 0 : k4.hashCode();
|
||||
V v3 = this.value;
|
||||
return hashCode ^ (v3 != null ? v3.hashCode() : 0);
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public V setValue(V v3) {
|
||||
SmallSortedMap.this.checkMutable();
|
||||
V v4 = this.value;
|
||||
this.value = v3;
|
||||
return v4;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String valueOf = String.valueOf(this.key);
|
||||
String valueOf2 = String.valueOf(this.value);
|
||||
StringBuilder sb = new StringBuilder(valueOf2.length() + valueOf.length() + 1);
|
||||
sb.append(valueOf);
|
||||
sb.append("=");
|
||||
sb.append(valueOf2);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public Entry(K k4, V v3) {
|
||||
this.key = k4;
|
||||
this.value = v3;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(SmallSortedMap<K, V>.Entry entry) {
|
||||
return getKey().compareTo(entry.getKey());
|
||||
}
|
||||
|
||||
@Override // java.util.Map.Entry
|
||||
public K getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
private boolean equals(Object obj, Object obj2) {
|
||||
if (obj == null) {
|
||||
return obj2 == null;
|
||||
}
|
||||
return obj.equals(obj2);
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class EntryIterator implements Iterator<Map.Entry<K, V>> {
|
||||
private Iterator<Map.Entry<K, V>> lazyOverflowIterator;
|
||||
private boolean nextCalledBeforeRemove;
|
||||
private int pos;
|
||||
|
||||
private EntryIterator() {
|
||||
this.pos = -1;
|
||||
}
|
||||
|
||||
private Iterator<Map.Entry<K, V>> getOverflowIterator() {
|
||||
if (this.lazyOverflowIterator == null) {
|
||||
this.lazyOverflowIterator = SmallSortedMap.this.overflowEntries.entrySet().iterator();
|
||||
}
|
||||
return this.lazyOverflowIterator;
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.pos + 1 < SmallSortedMap.this.entryList.size() || getOverflowIterator().hasNext();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
if (!this.nextCalledBeforeRemove) {
|
||||
throw new IllegalStateException("remove() was called before next()");
|
||||
}
|
||||
this.nextCalledBeforeRemove = false;
|
||||
SmallSortedMap.this.checkMutable();
|
||||
if (this.pos >= SmallSortedMap.this.entryList.size()) {
|
||||
getOverflowIterator().remove();
|
||||
return;
|
||||
}
|
||||
SmallSortedMap smallSortedMap = SmallSortedMap.this;
|
||||
int i = this.pos;
|
||||
this.pos = i - 1;
|
||||
smallSortedMap.removeArrayEntryAt(i);
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public Map.Entry<K, V> next() {
|
||||
this.nextCalledBeforeRemove = true;
|
||||
int i = this.pos + 1;
|
||||
this.pos = i;
|
||||
if (i < SmallSortedMap.this.entryList.size()) {
|
||||
return (Map.Entry) SmallSortedMap.this.entryList.get(this.pos);
|
||||
}
|
||||
return getOverflowIterator().next();
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class EntrySet extends AbstractSet<Map.Entry<K, V>> {
|
||||
private EntrySet() {
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
||||
public void clear() {
|
||||
SmallSortedMap.this.clear();
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
||||
public boolean contains(Object obj) {
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
Object obj2 = SmallSortedMap.this.get(entry.getKey());
|
||||
Object value = entry.getValue();
|
||||
if (obj2 != value) {
|
||||
return obj2 != null && obj2.equals(value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
|
||||
public Iterator<Map.Entry<K, V>> iterator() {
|
||||
return new EntryIterator();
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
||||
public boolean remove(Object obj) {
|
||||
Map.Entry entry = (Map.Entry) obj;
|
||||
if (!contains(entry)) {
|
||||
return false;
|
||||
}
|
||||
SmallSortedMap.this.remove(entry.getKey());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
||||
public int size() {
|
||||
return SmallSortedMap.this.size();
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.Set
|
||||
public boolean add(Map.Entry<K, V> entry) {
|
||||
if (contains(entry)) {
|
||||
return false;
|
||||
}
|
||||
SmallSortedMap.this.put((SmallSortedMap) entry.getKey(), (K) entry.getValue());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private int binarySearchInArray(K k4) {
|
||||
int i;
|
||||
int size = this.entryList.size();
|
||||
int i4 = size - 1;
|
||||
if (i4 >= 0) {
|
||||
int compareTo = k4.compareTo(this.entryList.get(i4).getKey());
|
||||
if (compareTo > 0) {
|
||||
i = size + 1;
|
||||
return -i;
|
||||
}
|
||||
if (compareTo == 0) {
|
||||
return i4;
|
||||
}
|
||||
}
|
||||
int i5 = 0;
|
||||
while (i5 <= i4) {
|
||||
int i6 = (i5 + i4) / 2;
|
||||
int compareTo2 = k4.compareTo(this.entryList.get(i6).getKey());
|
||||
if (compareTo2 < 0) {
|
||||
i4 = i6 - 1;
|
||||
} else {
|
||||
if (compareTo2 <= 0) {
|
||||
return i6;
|
||||
}
|
||||
i5 = i6 + 1;
|
||||
}
|
||||
}
|
||||
i = i5 + 1;
|
||||
return -i;
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public void checkMutable() {
|
||||
if (this.isImmutable) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
private void ensureEntryArrayMutable() {
|
||||
checkMutable();
|
||||
if (!this.entryList.isEmpty() || (this.entryList instanceof ArrayList)) {
|
||||
return;
|
||||
}
|
||||
this.entryList = new ArrayList(this.maxArraySize);
|
||||
}
|
||||
|
||||
private SortedMap<K, V> getOverflowEntriesMutable() {
|
||||
checkMutable();
|
||||
if (this.overflowEntries.isEmpty() && !(this.overflowEntries instanceof TreeMap)) {
|
||||
this.overflowEntries = new TreeMap();
|
||||
}
|
||||
return (SortedMap) this.overflowEntries;
|
||||
}
|
||||
|
||||
public static <FieldDescriptorType extends FieldSet.FieldDescriptorLite<FieldDescriptorType>> SmallSortedMap<FieldDescriptorType, Object> newFieldMap(int i) {
|
||||
return (SmallSortedMap<FieldDescriptorType, Object>) new SmallSortedMap<FieldDescriptorType, Object>(i) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap.1
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap
|
||||
public void makeImmutable() {
|
||||
if (!isImmutable()) {
|
||||
for (int i4 = 0; i4 < getNumArrayEntries(); i4++) {
|
||||
Map.Entry<FieldDescriptorType, Object> arrayEntryAt = getArrayEntryAt(i4);
|
||||
if (((FieldSet.FieldDescriptorLite) arrayEntryAt.getKey()).isRepeated()) {
|
||||
arrayEntryAt.setValue(Collections.unmodifiableList((List) arrayEntryAt.getValue()));
|
||||
}
|
||||
}
|
||||
for (Map.Entry<FieldDescriptorType, Object> entry : getOverflowEntries()) {
|
||||
if (((FieldSet.FieldDescriptorLite) entry.getKey()).isRepeated()) {
|
||||
entry.setValue(Collections.unmodifiableList((List) entry.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
super.makeImmutable();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.SmallSortedMap, java.util.AbstractMap, java.util.Map
|
||||
public /* bridge */ /* synthetic */ Object put(Object obj, Object obj2) {
|
||||
return super.put((AnonymousClass1<FieldDescriptorType>) obj, (FieldSet.FieldDescriptorLite) obj2);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public V removeArrayEntryAt(int i) {
|
||||
checkMutable();
|
||||
V value = this.entryList.remove(i).getValue();
|
||||
if (!this.overflowEntries.isEmpty()) {
|
||||
Iterator<Map.Entry<K, V>> it = getOverflowEntriesMutable().entrySet().iterator();
|
||||
this.entryList.add(new Entry(this, it.next()));
|
||||
it.remove();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public void clear() {
|
||||
checkMutable();
|
||||
if (!this.entryList.isEmpty()) {
|
||||
this.entryList.clear();
|
||||
}
|
||||
if (this.overflowEntries.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
this.overflowEntries.clear();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public boolean containsKey(Object obj) {
|
||||
Comparable comparable = (Comparable) obj;
|
||||
return binarySearchInArray(comparable) >= 0 || this.overflowEntries.containsKey(comparable);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public Set<Map.Entry<K, V>> entrySet() {
|
||||
if (this.lazyEntrySet == null) {
|
||||
this.lazyEntrySet = new EntrySet();
|
||||
}
|
||||
return this.lazyEntrySet;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public V get(Object obj) {
|
||||
Comparable comparable = (Comparable) obj;
|
||||
int binarySearchInArray = binarySearchInArray(comparable);
|
||||
return binarySearchInArray >= 0 ? this.entryList.get(binarySearchInArray).getValue() : this.overflowEntries.get(comparable);
|
||||
}
|
||||
|
||||
public Map.Entry<K, V> getArrayEntryAt(int i) {
|
||||
return this.entryList.get(i);
|
||||
}
|
||||
|
||||
public int getNumArrayEntries() {
|
||||
return this.entryList.size();
|
||||
}
|
||||
|
||||
public Iterable<Map.Entry<K, V>> getOverflowEntries() {
|
||||
return this.overflowEntries.isEmpty() ? EmptySet.iterable() : this.overflowEntries.entrySet();
|
||||
}
|
||||
|
||||
public boolean isImmutable() {
|
||||
return this.isImmutable;
|
||||
}
|
||||
|
||||
public void makeImmutable() {
|
||||
if (this.isImmutable) {
|
||||
return;
|
||||
}
|
||||
this.overflowEntries = this.overflowEntries.isEmpty() ? Collections.EMPTY_MAP : Collections.unmodifiableMap(this.overflowEntries);
|
||||
this.isImmutable = true;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public /* bridge */ /* synthetic */ Object put(Object obj, Object obj2) {
|
||||
return put((SmallSortedMap<K, V>) obj, (Comparable) obj2);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public V remove(Object obj) {
|
||||
checkMutable();
|
||||
Comparable comparable = (Comparable) obj;
|
||||
int binarySearchInArray = binarySearchInArray(comparable);
|
||||
if (binarySearchInArray >= 0) {
|
||||
return (V) removeArrayEntryAt(binarySearchInArray);
|
||||
}
|
||||
if (this.overflowEntries.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return this.overflowEntries.remove(comparable);
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractMap, java.util.Map
|
||||
public int size() {
|
||||
return this.overflowEntries.size() + this.entryList.size();
|
||||
}
|
||||
|
||||
private SmallSortedMap(int i) {
|
||||
this.maxArraySize = i;
|
||||
this.entryList = Collections.EMPTY_LIST;
|
||||
this.overflowEntries = Collections.EMPTY_MAP;
|
||||
}
|
||||
|
||||
public V put(K k4, V v3) {
|
||||
checkMutable();
|
||||
int binarySearchInArray = binarySearchInArray(k4);
|
||||
if (binarySearchInArray >= 0) {
|
||||
return this.entryList.get(binarySearchInArray).setValue(v3);
|
||||
}
|
||||
ensureEntryArrayMutable();
|
||||
int i = -(binarySearchInArray + 1);
|
||||
if (i >= this.maxArraySize) {
|
||||
return getOverflowEntriesMutable().put(k4, v3);
|
||||
}
|
||||
int size = this.entryList.size();
|
||||
int i4 = this.maxArraySize;
|
||||
if (size == i4) {
|
||||
SmallSortedMap<K, V>.Entry remove = this.entryList.remove(i4 - 1);
|
||||
getOverflowEntriesMutable().put(remove.getKey(), remove.getValue());
|
||||
}
|
||||
this.entryList.add(i, new Entry(k4, v3));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class UninitializedMessageException extends RuntimeException {
|
||||
private final List<String> missingFields;
|
||||
|
||||
public UninitializedMessageException(MessageLite messageLite) {
|
||||
super("Message was missing required fields. (Lite runtime could not determine which fields were missing).");
|
||||
this.missingFields = null;
|
||||
}
|
||||
|
||||
public InvalidProtocolBufferException asInvalidProtocolBufferException() {
|
||||
return new InvalidProtocolBufferException(getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.RandomAccess;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class UnmodifiableLazyStringList extends AbstractList<String> implements RandomAccess, LazyStringList {
|
||||
private final LazyStringList list;
|
||||
|
||||
public UnmodifiableLazyStringList(LazyStringList lazyStringList) {
|
||||
this.list = lazyStringList;
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public void add(ByteString byteString) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public ByteString getByteString(int i) {
|
||||
return this.list.getByteString(i);
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public List<?> getUnderlyingElements() {
|
||||
return this.list.getUnderlyingElements();
|
||||
}
|
||||
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.LazyStringList
|
||||
public LazyStringList getUnmodifiableView() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.List
|
||||
public Iterator<String> iterator() {
|
||||
return new Iterator<String>() { // from class: kotlin.reflect.jvm.internal.impl.protobuf.UnmodifiableLazyStringList.2
|
||||
Iterator<String> iter;
|
||||
|
||||
{
|
||||
this.iter = UnmodifiableLazyStringList.this.list.iterator();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.iter.hasNext();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // java.util.Iterator
|
||||
public String next() {
|
||||
return this.iter.next();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public ListIterator<String> listIterator(int i) {
|
||||
return new ListIterator<String>(i) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.UnmodifiableLazyStringList.1
|
||||
ListIterator<String> iter;
|
||||
final /* synthetic */ int val$index;
|
||||
|
||||
{
|
||||
this.val$index = i;
|
||||
this.iter = UnmodifiableLazyStringList.this.list.listIterator(i);
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator, java.util.Iterator
|
||||
public boolean hasNext() {
|
||||
return this.iter.hasNext();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public boolean hasPrevious() {
|
||||
return this.iter.hasPrevious();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public int nextIndex() {
|
||||
return this.iter.nextIndex();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public int previousIndex() {
|
||||
return this.iter.previousIndex();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator, java.util.Iterator
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public void add(String str) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator, java.util.Iterator
|
||||
public String next() {
|
||||
return this.iter.next();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public String previous() {
|
||||
return this.iter.previous();
|
||||
}
|
||||
|
||||
@Override // java.util.ListIterator
|
||||
public void set(String str) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
|
||||
public int size() {
|
||||
return this.list.size();
|
||||
}
|
||||
|
||||
@Override // java.util.AbstractList, java.util.List
|
||||
public String get(int i) {
|
||||
return this.list.get(i);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
final class Utf8 {
|
||||
private static int incompleteStateFor(int i) {
|
||||
if (i > -12) {
|
||||
return -1;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public static boolean isValidUtf8(byte[] bArr) {
|
||||
return isValidUtf8(bArr, 0, bArr.length);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:10:0x0015, code lost:
|
||||
|
||||
if (r7[r8] > (-65)) goto L13;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:30:0x0046, code lost:
|
||||
|
||||
if (r7[r8] > (-65)) goto L32;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:50:0x0083, code lost:
|
||||
|
||||
if (r7[r6] > (-65)) goto L53;
|
||||
*/
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static int partialIsValidUtf8(int r6, byte[] r7, int r8, int r9) {
|
||||
/*
|
||||
if (r6 == 0) goto L86
|
||||
if (r8 < r9) goto L5
|
||||
return r6
|
||||
L5:
|
||||
byte r0 = (byte) r6
|
||||
r1 = -32
|
||||
r2 = -1
|
||||
r3 = -65
|
||||
if (r0 >= r1) goto L1c
|
||||
r6 = -62
|
||||
if (r0 < r6) goto L1b
|
||||
int r6 = r8 + 1
|
||||
r8 = r7[r8]
|
||||
if (r8 <= r3) goto L18
|
||||
goto L1b
|
||||
L18:
|
||||
r8 = r6
|
||||
goto L86
|
||||
L1b:
|
||||
return r2
|
||||
L1c:
|
||||
r4 = -16
|
||||
if (r0 >= r4) goto L49
|
||||
int r6 = r6 >> 8
|
||||
int r6 = ~r6
|
||||
byte r6 = (byte) r6
|
||||
if (r6 != 0) goto L34
|
||||
int r6 = r8 + 1
|
||||
r8 = r7[r8]
|
||||
if (r6 < r9) goto L31
|
||||
int r6 = incompleteStateFor(r0, r8)
|
||||
return r6
|
||||
L31:
|
||||
r5 = r8
|
||||
r8 = r6
|
||||
r6 = r5
|
||||
L34:
|
||||
if (r6 > r3) goto L48
|
||||
r4 = -96
|
||||
if (r0 != r1) goto L3c
|
||||
if (r6 < r4) goto L48
|
||||
L3c:
|
||||
r1 = -19
|
||||
if (r0 != r1) goto L42
|
||||
if (r6 >= r4) goto L48
|
||||
L42:
|
||||
int r6 = r8 + 1
|
||||
r8 = r7[r8]
|
||||
if (r8 <= r3) goto L18
|
||||
L48:
|
||||
return r2
|
||||
L49:
|
||||
int r1 = r6 >> 8
|
||||
int r1 = ~r1
|
||||
byte r1 = (byte) r1
|
||||
if (r1 != 0) goto L5c
|
||||
int r6 = r8 + 1
|
||||
r1 = r7[r8]
|
||||
if (r6 < r9) goto L5a
|
||||
int r6 = incompleteStateFor(r0, r1)
|
||||
return r6
|
||||
L5a:
|
||||
r8 = 0
|
||||
goto L62
|
||||
L5c:
|
||||
int r6 = r6 >> 16
|
||||
byte r6 = (byte) r6
|
||||
r5 = r8
|
||||
r8 = r6
|
||||
r6 = r5
|
||||
L62:
|
||||
if (r8 != 0) goto L72
|
||||
int r8 = r6 + 1
|
||||
r6 = r7[r6]
|
||||
if (r8 < r9) goto L6f
|
||||
int r6 = incompleteStateFor(r0, r1, r6)
|
||||
return r6
|
||||
L6f:
|
||||
r5 = r8
|
||||
r8 = r6
|
||||
r6 = r5
|
||||
L72:
|
||||
if (r1 > r3) goto L85
|
||||
int r0 = r0 << 28
|
||||
int r1 = r1 + 112
|
||||
int r1 = r1 + r0
|
||||
int r0 = r1 >> 30
|
||||
if (r0 != 0) goto L85
|
||||
if (r8 > r3) goto L85
|
||||
int r8 = r6 + 1
|
||||
r6 = r7[r6]
|
||||
if (r6 <= r3) goto L86
|
||||
L85:
|
||||
return r2
|
||||
L86:
|
||||
int r6 = partialIsValidUtf8(r7, r8, r9)
|
||||
return r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlin.reflect.jvm.internal.impl.protobuf.Utf8.partialIsValidUtf8(int, byte[], int, int):int");
|
||||
}
|
||||
|
||||
private static int partialIsValidUtf8NonAscii(byte[] bArr, int i, int i4) {
|
||||
while (i < i4) {
|
||||
int i5 = i + 1;
|
||||
byte b4 = bArr[i];
|
||||
if (b4 < 0) {
|
||||
if (b4 < -32) {
|
||||
if (i5 >= i4) {
|
||||
return b4;
|
||||
}
|
||||
if (b4 >= -62) {
|
||||
i += 2;
|
||||
if (bArr[i5] > -65) {
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (b4 < -16) {
|
||||
if (i5 >= i4 - 1) {
|
||||
return incompleteStateFor(bArr, i5, i4);
|
||||
}
|
||||
int i6 = i + 2;
|
||||
byte b5 = bArr[i5];
|
||||
if (b5 <= -65 && ((b4 != -32 || b5 >= -96) && (b4 != -19 || b5 < -96))) {
|
||||
i += 3;
|
||||
if (bArr[i6] > -65) {
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (i5 >= i4 - 2) {
|
||||
return incompleteStateFor(bArr, i5, i4);
|
||||
}
|
||||
int i7 = i + 2;
|
||||
byte b6 = bArr[i5];
|
||||
if (b6 <= -65) {
|
||||
if ((((b6 + 112) + (b4 << 28)) >> 30) == 0) {
|
||||
int i8 = i + 3;
|
||||
if (bArr[i7] <= -65) {
|
||||
i += 4;
|
||||
if (bArr[i8] > -65) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
i = i5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static int incompleteStateFor(int i, int i4) {
|
||||
if (i > -12 || i4 > -65) {
|
||||
return -1;
|
||||
}
|
||||
return i ^ (i4 << 8);
|
||||
}
|
||||
|
||||
public static boolean isValidUtf8(byte[] bArr, int i, int i4) {
|
||||
return partialIsValidUtf8(bArr, i, i4) == 0;
|
||||
}
|
||||
|
||||
private static int incompleteStateFor(int i, int i4, int i5) {
|
||||
if (i > -12 || i4 > -65 || i5 > -65) {
|
||||
return -1;
|
||||
}
|
||||
return (i ^ (i4 << 8)) ^ (i5 << 16);
|
||||
}
|
||||
|
||||
private static int incompleteStateFor(byte[] bArr, int i, int i4) {
|
||||
byte b4 = bArr[i - 1];
|
||||
int i5 = i4 - i;
|
||||
if (i5 == 0) {
|
||||
return incompleteStateFor(b4);
|
||||
}
|
||||
if (i5 == 1) {
|
||||
return incompleteStateFor(b4, bArr[i]);
|
||||
}
|
||||
if (i5 == 2) {
|
||||
return incompleteStateFor(b4, bArr[i], bArr[i + 1]);
|
||||
}
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
public static int partialIsValidUtf8(byte[] bArr, int i, int i4) {
|
||||
while (i < i4 && bArr[i] >= 0) {
|
||||
i++;
|
||||
}
|
||||
if (i >= i4) {
|
||||
return 0;
|
||||
}
|
||||
return partialIsValidUtf8NonAscii(bArr, i, i4);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
package kotlin.reflect.jvm.internal.impl.protobuf;
|
||||
|
||||
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public final class WireFormat {
|
||||
static final int MESSAGE_SET_ITEM_TAG = makeTag(1, 3);
|
||||
static final int MESSAGE_SET_ITEM_END_TAG = makeTag(1, 4);
|
||||
static final int MESSAGE_SET_TYPE_ID_TAG = makeTag(2, 0);
|
||||
static final int MESSAGE_SET_MESSAGE_TAG = makeTag(3, 2);
|
||||
|
||||
/* JADX WARN: Enum visitor error
|
||||
jadx.core.utils.exceptions.JadxRuntimeException: Init of enum field 'INT64' uses external variables
|
||||
at jadx.core.dex.visitors.EnumVisitor.createEnumFieldByConstructor(EnumVisitor.java:451)
|
||||
at jadx.core.dex.visitors.EnumVisitor.processEnumFieldByRegister(EnumVisitor.java:395)
|
||||
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromFilledArray(EnumVisitor.java:324)
|
||||
at jadx.core.dex.visitors.EnumVisitor.extractEnumFieldsFromInsn(EnumVisitor.java:262)
|
||||
at jadx.core.dex.visitors.EnumVisitor.convertToEnum(EnumVisitor.java:151)
|
||||
at jadx.core.dex.visitors.EnumVisitor.visit(EnumVisitor.java:100)
|
||||
*/
|
||||
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
|
||||
/* loaded from: classes3.dex */
|
||||
public static class FieldType {
|
||||
private static final /* synthetic */ FieldType[] $VALUES;
|
||||
public static final FieldType BOOL;
|
||||
public static final FieldType BYTES;
|
||||
public static final FieldType DOUBLE;
|
||||
public static final FieldType ENUM;
|
||||
public static final FieldType FIXED32;
|
||||
public static final FieldType FIXED64;
|
||||
public static final FieldType FLOAT;
|
||||
public static final FieldType GROUP;
|
||||
public static final FieldType INT32;
|
||||
public static final FieldType INT64;
|
||||
public static final FieldType MESSAGE;
|
||||
public static final FieldType SFIXED32;
|
||||
public static final FieldType SFIXED64;
|
||||
public static final FieldType SINT32;
|
||||
public static final FieldType SINT64;
|
||||
public static final FieldType STRING;
|
||||
public static final FieldType UINT32;
|
||||
public static final FieldType UINT64;
|
||||
private final JavaType javaType;
|
||||
private final int wireType;
|
||||
|
||||
static {
|
||||
FieldType fieldType = new FieldType("DOUBLE", 0, JavaType.DOUBLE, 1);
|
||||
DOUBLE = fieldType;
|
||||
FieldType fieldType2 = new FieldType("FLOAT", 1, JavaType.FLOAT, 5);
|
||||
FLOAT = fieldType2;
|
||||
JavaType javaType = JavaType.LONG;
|
||||
FieldType fieldType3 = new FieldType("INT64", 2, javaType, 0);
|
||||
INT64 = fieldType3;
|
||||
FieldType fieldType4 = new FieldType("UINT64", 3, javaType, 0);
|
||||
UINT64 = fieldType4;
|
||||
JavaType javaType2 = JavaType.INT;
|
||||
FieldType fieldType5 = new FieldType("INT32", 4, javaType2, 0);
|
||||
INT32 = fieldType5;
|
||||
FieldType fieldType6 = new FieldType("FIXED64", 5, javaType, 1);
|
||||
FIXED64 = fieldType6;
|
||||
FieldType fieldType7 = new FieldType("FIXED32", 6, javaType2, 5);
|
||||
FIXED32 = fieldType7;
|
||||
FieldType fieldType8 = new FieldType("BOOL", 7, JavaType.BOOLEAN, 0);
|
||||
BOOL = fieldType8;
|
||||
FieldType fieldType9 = new FieldType("STRING", 8, JavaType.STRING, 2) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType.1
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType
|
||||
public boolean isPackable() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
STRING = fieldType9;
|
||||
JavaType javaType3 = JavaType.MESSAGE;
|
||||
FieldType fieldType10 = new FieldType("GROUP", 9, javaType3, 3) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType.2
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType
|
||||
public boolean isPackable() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
GROUP = fieldType10;
|
||||
int i = 2;
|
||||
FieldType fieldType11 = new FieldType("MESSAGE", 10, javaType3, i) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType.3
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType
|
||||
public boolean isPackable() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
MESSAGE = fieldType11;
|
||||
FieldType fieldType12 = new FieldType("BYTES", 11, JavaType.BYTE_STRING, i) { // from class: kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType.4
|
||||
@Override // kotlin.reflect.jvm.internal.impl.protobuf.WireFormat.FieldType
|
||||
public boolean isPackable() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
BYTES = fieldType12;
|
||||
FieldType fieldType13 = new FieldType("UINT32", 12, javaType2, 0);
|
||||
UINT32 = fieldType13;
|
||||
FieldType fieldType14 = new FieldType("ENUM", 13, JavaType.ENUM, 0);
|
||||
ENUM = fieldType14;
|
||||
FieldType fieldType15 = new FieldType("SFIXED32", 14, javaType2, 5);
|
||||
SFIXED32 = fieldType15;
|
||||
FieldType fieldType16 = new FieldType("SFIXED64", 15, javaType, 1);
|
||||
SFIXED64 = fieldType16;
|
||||
FieldType fieldType17 = new FieldType("SINT32", 16, javaType2, 0);
|
||||
SINT32 = fieldType17;
|
||||
FieldType fieldType18 = new FieldType("SINT64", 17, javaType, 0);
|
||||
SINT64 = fieldType18;
|
||||
$VALUES = new FieldType[]{fieldType, fieldType2, fieldType3, fieldType4, fieldType5, fieldType6, fieldType7, fieldType8, fieldType9, fieldType10, fieldType11, fieldType12, fieldType13, fieldType14, fieldType15, fieldType16, fieldType17, fieldType18};
|
||||
}
|
||||
|
||||
public static FieldType valueOf(String str) {
|
||||
return (FieldType) Enum.valueOf(FieldType.class, str);
|
||||
}
|
||||
|
||||
public static FieldType[] values() {
|
||||
return (FieldType[]) $VALUES.clone();
|
||||
}
|
||||
|
||||
public JavaType getJavaType() {
|
||||
return this.javaType;
|
||||
}
|
||||
|
||||
public int getWireType() {
|
||||
return this.wireType;
|
||||
}
|
||||
|
||||
public boolean isPackable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private FieldType(String str, int i, JavaType javaType, int i4) {
|
||||
this.javaType = javaType;
|
||||
this.wireType = i4;
|
||||
}
|
||||
}
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public enum JavaType {
|
||||
INT(0),
|
||||
LONG(0L),
|
||||
FLOAT(Float.valueOf(BitmapDescriptorFactory.HUE_RED)),
|
||||
DOUBLE(Double.valueOf(FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE)),
|
||||
BOOLEAN(Boolean.FALSE),
|
||||
STRING(""),
|
||||
BYTE_STRING(ByteString.EMPTY),
|
||||
ENUM(null),
|
||||
MESSAGE(null);
|
||||
|
||||
private final Object defaultDefault;
|
||||
|
||||
JavaType(Object obj) {
|
||||
this.defaultDefault = obj;
|
||||
}
|
||||
}
|
||||
|
||||
public static int getTagFieldNumber(int i) {
|
||||
return i >>> 3;
|
||||
}
|
||||
|
||||
public static int getTagWireType(int i) {
|
||||
return i & 7;
|
||||
}
|
||||
|
||||
public static int makeTag(int i, int i4) {
|
||||
return (i << 3) | i4;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user