apkfuckery/com.discord/smali/androidx/sqlite/db/SimpleSQLiteQuery.smali
2019-12-06 04:29:40 +01:00

299 lines
6.7 KiB
Smali

.class public final Landroidx/sqlite/db/SimpleSQLiteQuery;
.super Ljava/lang/Object;
.source "SimpleSQLiteQuery.java"
# interfaces
.implements Landroidx/sqlite/db/SupportSQLiteQuery;
# instance fields
.field public final mBindArgs:[Ljava/lang/Object;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
.field public final mQuery:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;)V
.locals 1
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Landroidx/sqlite/db/SimpleSQLiteQuery;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
.param p2 # [Ljava/lang/Object;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mQuery:Ljava/lang/String;
iput-object p2, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mBindArgs:[Ljava/lang/Object;
return-void
.end method
.method public static bind(Landroidx/sqlite/db/SupportSQLiteProgram;ILjava/lang/Object;)V
.locals 2
if-nez p2, :cond_0
invoke-interface {p0, p1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindNull(I)V
goto/16 :goto_1
:cond_0
instance-of v0, p2, [B
if-eqz v0, :cond_1
check-cast p2, [B
invoke-interface {p0, p1, p2}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindBlob(I[B)V
goto/16 :goto_1
:cond_1
instance-of v0, p2, Ljava/lang/Float;
if-eqz v0, :cond_2
check-cast p2, Ljava/lang/Float;
invoke-virtual {p2}, Ljava/lang/Float;->floatValue()F
move-result p2
float-to-double v0, p2
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindDouble(ID)V
goto/16 :goto_1
:cond_2
instance-of v0, p2, Ljava/lang/Double;
if-eqz v0, :cond_3
check-cast p2, Ljava/lang/Double;
invoke-virtual {p2}, Ljava/lang/Double;->doubleValue()D
move-result-wide v0
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindDouble(ID)V
goto :goto_1
:cond_3
instance-of v0, p2, Ljava/lang/Long;
if-eqz v0, :cond_4
check-cast p2, Ljava/lang/Long;
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
move-result-wide v0
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindLong(IJ)V
goto :goto_1
:cond_4
instance-of v0, p2, Ljava/lang/Integer;
if-eqz v0, :cond_5
check-cast p2, Ljava/lang/Integer;
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
move-result p2
int-to-long v0, p2
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindLong(IJ)V
goto :goto_1
:cond_5
instance-of v0, p2, Ljava/lang/Short;
if-eqz v0, :cond_6
check-cast p2, Ljava/lang/Short;
invoke-virtual {p2}, Ljava/lang/Short;->shortValue()S
move-result p2
int-to-long v0, p2
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindLong(IJ)V
goto :goto_1
:cond_6
instance-of v0, p2, Ljava/lang/Byte;
if-eqz v0, :cond_7
check-cast p2, Ljava/lang/Byte;
invoke-virtual {p2}, Ljava/lang/Byte;->byteValue()B
move-result p2
int-to-long v0, p2
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindLong(IJ)V
goto :goto_1
:cond_7
instance-of v0, p2, Ljava/lang/String;
if-eqz v0, :cond_8
check-cast p2, Ljava/lang/String;
invoke-interface {p0, p1, p2}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindString(ILjava/lang/String;)V
goto :goto_1
:cond_8
instance-of v0, p2, Ljava/lang/Boolean;
if-eqz v0, :cond_a
check-cast p2, Ljava/lang/Boolean;
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
move-result p2
if-eqz p2, :cond_9
const-wide/16 v0, 0x1
goto :goto_0
:cond_9
const-wide/16 v0, 0x0
:goto_0
invoke-interface {p0, p1, v0, v1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindLong(IJ)V
:goto_1
return-void
:cond_a
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Cannot bind "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p2, " at index "
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " Supported types: null, byte[], float, double, long, int, short, byte,"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " string"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static bind(Landroidx/sqlite/db/SupportSQLiteProgram;[Ljava/lang/Object;)V
.locals 3
if-nez p1, :cond_0
return-void
:cond_0
array-length v0, p1
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_1
aget-object v2, p1, v1
add-int/lit8 v1, v1, 0x1
invoke-static {p0, v1, v2}, Landroidx/sqlite/db/SimpleSQLiteQuery;->bind(Landroidx/sqlite/db/SupportSQLiteProgram;ILjava/lang/Object;)V
goto :goto_0
:cond_1
return-void
.end method
# virtual methods
.method public bindTo(Landroidx/sqlite/db/SupportSQLiteProgram;)V
.locals 1
iget-object v0, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mBindArgs:[Ljava/lang/Object;
invoke-static {p1, v0}, Landroidx/sqlite/db/SimpleSQLiteQuery;->bind(Landroidx/sqlite/db/SupportSQLiteProgram;[Ljava/lang/Object;)V
return-void
.end method
.method public getArgCount()I
.locals 1
iget-object v0, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mBindArgs:[Ljava/lang/Object;
if-nez v0, :cond_0
const/4 v0, 0x0
goto :goto_0
:cond_0
array-length v0, v0
:goto_0
return v0
.end method
.method public getSql()Ljava/lang/String;
.locals 1
iget-object v0, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mQuery:Ljava/lang/String;
return-object v0
.end method