apkfuckery/com.discord/smali/androidx/sqlite/db/SimpleSQLiteQuery.smali

300 lines
6.7 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Landroidx/sqlite/db/SimpleSQLiteQuery;
.super Ljava/lang/Object;
.source "SimpleSQLiteQuery.java"
# interfaces
.implements Landroidx/sqlite/db/SupportSQLiteQuery;
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mBindArgs:[Ljava/lang/Object;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end field
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mQuery:Ljava/lang/String;
2019-07-24 11:27:29 +00:00
# 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
2019-12-06 03:29:40 +00:00
.param p2 # [Ljava/lang/Object;
.annotation build Landroidx/annotation/Nullable;
.end annotation
.end param
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
.method public static bind(Landroidx/sqlite/db/SupportSQLiteProgram;ILjava/lang/Object;)V
2019-07-24 11:27:29 +00:00
.locals 2
if-nez p2, :cond_0
invoke-interface {p0, p1}, Landroidx/sqlite/db/SupportSQLiteProgram;->bindNull(I)V
2019-12-06 03:29:40 +00:00
goto/16 :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto/16 :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto/16 :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
: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
2019-12-06 03:29:40 +00:00
:goto_1
2019-07-24 11:27:29 +00:00
return-void
:cond_a
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance v0, Ljava/lang/StringBuilder;
2019-12-06 03:29:40 +00:00
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
2019-07-24 11:27:29 +00:00
const-string v1, "Cannot bind "
2019-12-06 03:29:40 +00:00
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
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;
2019-12-06 03:29:40 +00:00
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"
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
.method public bindTo(Landroidx/sqlite/db/SupportSQLiteProgram;)V
2019-07-24 11:27:29 +00:00
.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
2019-12-06 03:29:40 +00:00
.method public getArgCount()I
2019-07-24 11:27:29 +00:00
.locals 1
iget-object v0, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mBindArgs:[Ljava/lang/Object;
if-nez v0, :cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
array-length v0, v0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public getSql()Ljava/lang/String;
2019-07-24 11:27:29 +00:00
.locals 1
iget-object v0, p0, Landroidx/sqlite/db/SimpleSQLiteQuery;->mQuery:Ljava/lang/String;
return-object v0
.end method