apkfuckery/com.discord/smali_classes2/okhttp3/MultipartBody$a.smali
2019-12-21 02:41:59 +01:00

187 lines
4.3 KiB
Smali

.class public final Lokhttp3/MultipartBody$a;
.super Ljava/lang/Object;
.source "MultipartBody.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/MultipartBody;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# instance fields
.field public final a:Lokio/ByteString;
.field public b:Lokhttp3/MediaType;
.field public final c:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lokhttp3/MultipartBody$Part;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 2
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
move-result-object v0
invoke-virtual {v0}, Ljava/util/UUID;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "UUID.randomUUID().toString()"
invoke-static {v0, v1}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
if-eqz v0, :cond_0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
sget-object v1, Lokio/ByteString;->g:Lokio/ByteString$a;
invoke-virtual {v1, v0}, Lokio/ByteString$a;->b(Ljava/lang/String;)Lokio/ByteString;
move-result-object v0
iput-object v0, p0, Lokhttp3/MultipartBody$a;->a:Lokio/ByteString;
sget-object v0, Lokhttp3/MultipartBody;->f:Lokhttp3/MediaType;
iput-object v0, p0, Lokhttp3/MultipartBody$a;->b:Lokhttp3/MediaType;
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lokhttp3/MultipartBody$a;->c:Ljava/util/List;
return-void
:cond_0
const-string v0, "boundary"
invoke-static {v0}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 v0, 0x0
throw v0
.end method
# virtual methods
.method public final a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$a;
.locals 1
if-eqz p2, :cond_0
sget-object v0, Lokhttp3/MultipartBody$Part;->c:Lokhttp3/MultipartBody$Part$a;
invoke-virtual {v0, p1, p2}, Lokhttp3/MultipartBody$Part$a;->a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
move-result-object p1
iget-object p2, p0, Lokhttp3/MultipartBody$a;->c:Ljava/util/List;
invoke-interface {p2, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
return-object p0
:cond_0
const-string p1, "body"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final a(Lokhttp3/MediaType;)Lokhttp3/MultipartBody$a;
.locals 2
if-eqz p1, :cond_1
invoke-virtual {p1}, Lokhttp3/MediaType;->b()Ljava/lang/String;
move-result-object v0
const-string v1, "multipart"
invoke-static {v0, v1}, Lt/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iput-object p1, p0, Lokhttp3/MultipartBody$a;->b:Lokhttp3/MediaType;
return-object p0
:cond_0
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "multipart != "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
const-string p1, "type"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final a(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$a;
.locals 1
if-eqz p1, :cond_0
iget-object v0, p0, Lokhttp3/MultipartBody$a;->c:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
return-object p0
:cond_0
const-string p1, "part"
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method