492 lines
11 KiB
Smali
492 lines
11 KiB
Smali
.class public Landroidx/room/util/TableInfo$Column;
|
|
.super Ljava/lang/Object;
|
|
.source "TableInfo.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/room/util/TableInfo;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "Column"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final affinity:I
|
|
.annotation build Landroidx/room/ColumnInfo$SQLiteTypeAffinity;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final defaultValue:Ljava/lang/String;
|
|
|
|
.field public final mCreatedFrom:I
|
|
|
|
.field public final name:Ljava/lang/String;
|
|
|
|
.field public final notNull:Z
|
|
|
|
.field public final primaryKeyPosition:I
|
|
|
|
.field public final type:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;ZI)V
|
|
.locals 7
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
.end annotation
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move v3, p3
|
|
|
|
move v4, p4
|
|
|
|
invoke-direct/range {v0 .. v6}, Landroidx/room/util/TableInfo$Column;-><init>(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/String;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/String;I)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/room/util/TableInfo$Column;->name:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Landroidx/room/util/TableInfo$Column;->type:Ljava/lang/String;
|
|
|
|
iput-boolean p3, p0, Landroidx/room/util/TableInfo$Column;->notNull:Z
|
|
|
|
iput p4, p0, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
invoke-static {p2}, Landroidx/room/util/TableInfo$Column;->findAffinity(Ljava/lang/String;)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Landroidx/room/util/TableInfo$Column;->affinity:I
|
|
|
|
iput-object p5, p0, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
iput p6, p0, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static findAffinity(Ljava/lang/String;)I
|
|
.locals 2
|
|
.param p0 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/room/ColumnInfo$SQLiteTypeAffinity;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x5
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "INT"
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 p0, 0x3
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
const-string v1, "CHAR"
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
const-string v1, "CLOB"
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
const-string v1, "TEXT"
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const-string v1, "BLOB"
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
return v0
|
|
|
|
:cond_3
|
|
const-string v0, "REAL"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
const-string v0, "FLOA"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
const-string v0, "DOUB"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_5
|
|
:goto_0
|
|
const/4 p0, 0x4
|
|
|
|
return p0
|
|
|
|
:cond_6
|
|
:goto_1
|
|
const/4 p0, 0x2
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p0, p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
const-class v2, Landroidx/room/util/TableInfo$Column;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
goto/16 :goto_2
|
|
|
|
:cond_1
|
|
check-cast p1, Landroidx/room/util/TableInfo$Column;
|
|
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
iget v3, p1, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
if-eq v2, v3, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Landroidx/room/util/TableInfo$Column;->name:Ljava/lang/String;
|
|
|
|
iget-object v3, p1, Landroidx/room/util/TableInfo$Column;->name:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
iget-boolean v2, p0, Landroidx/room/util/TableInfo$Column;->notNull:Z
|
|
|
|
iget-boolean v3, p1, Landroidx/room/util/TableInfo$Column;->notNull:Z
|
|
|
|
if-eq v2, v3, :cond_4
|
|
|
|
return v1
|
|
|
|
:cond_4
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
const/4 v3, 0x2
|
|
|
|
if-ne v2, v0, :cond_5
|
|
|
|
iget v2, p1, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
if-ne v2, v3, :cond_5
|
|
|
|
iget-object v2, p0, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-object v4, p1, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
return v1
|
|
|
|
:cond_5
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
if-ne v2, v3, :cond_6
|
|
|
|
iget v2, p1, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
if-ne v2, v0, :cond_6
|
|
|
|
iget-object v2, p1, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
iget-object v3, p0, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
return v1
|
|
|
|
:cond_6
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
iget v3, p1, Landroidx/room/util/TableInfo$Column;->mCreatedFrom:I
|
|
|
|
if-ne v2, v3, :cond_8
|
|
|
|
iget-object v2, p0, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
iget-object v3, p1, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_8
|
|
|
|
goto :goto_0
|
|
|
|
:cond_7
|
|
iget-object v2, p1, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
:goto_0
|
|
return v1
|
|
|
|
:cond_8
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->affinity:I
|
|
|
|
iget p1, p1, Landroidx/room/util/TableInfo$Column;->affinity:I
|
|
|
|
if-ne v2, p1, :cond_9
|
|
|
|
goto :goto_1
|
|
|
|
:cond_9
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
return v0
|
|
|
|
:cond_a
|
|
:goto_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/room/util/TableInfo$Column;->name:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget v1, p0, Landroidx/room/util/TableInfo$Column;->affinity:I
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget-boolean v1, p0, Landroidx/room/util/TableInfo$Column;->notNull:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/16 v1, 0x4cf
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v1, 0x4d5
|
|
|
|
:goto_0
|
|
add-int/2addr v0, v1
|
|
|
|
mul-int/lit8 v0, v0, 0x1f
|
|
|
|
iget v1, p0, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isPrimaryKey()Z
|
|
.locals 1
|
|
|
|
iget v0, p0, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-string v0, "Column{name=\'"
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Landroidx/room/util/TableInfo$Column;->name:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x27
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", type=\'"
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p0, Landroidx/room/util/TableInfo$Column;->type:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", affinity=\'"
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->affinity:I
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", notNull="
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-boolean v2, p0, Landroidx/room/util/TableInfo$Column;->notNull:Z
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", primaryKeyPosition="
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget v2, p0, Landroidx/room/util/TableInfo$Column;->primaryKeyPosition:I
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ", defaultValue=\'"
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p0, Landroidx/room/util/TableInfo$Column;->defaultValue:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x7d
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|