.class public Landroidx/room/RoomDatabase$MigrationContainer; .super Ljava/lang/Object; .source "RoomDatabase.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Landroidx/room/RoomDatabase; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x9 name = "MigrationContainer" .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nRoomDatabase.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RoomDatabase.kt\nandroidx/room/RoomDatabase$MigrationContainer\n+ 2 _Arrays.kt\nkotlin/collections/ArraysKt___ArraysKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,1545:1\n13543#2,2:1546\n1851#3,2:1548\n359#4,7:1550\n*S KotlinDebug\n*F\n+ 1 RoomDatabase.kt\nandroidx/room/RoomDatabase$MigrationContainer\n*L\n1367#1:1546,2\n1377#1:1548,2\n1383#1:1550,7\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; d1 = { "\u0000H\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010%\n\u0002\u0010\u0008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0011\n\u0000\n\u0002\u0010 \n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0007\n\u0002\u0010!\n\u0002\u0008\u0002\n\u0002\u0010$\n\u0000\u0008\u0016\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J\u0010\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u0007H\u0002J!\u0010\u000b\u001a\u00020\t2\u0012\u0010\u0003\u001a\n\u0012\u0006\u0008\u0001\u0012\u00020\u00070\u000c\"\u00020\u0007H\u0016\u00a2\u0006\u0002\u0010\rJ\u0016\u0010\u000b\u001a\u00020\t2\u000c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u00020\u00070\u000eH\u0016J\u0016\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00052\u0006\u0010\u0012\u001a\u00020\u0005J \u0010\u0013\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u000e2\u0006\u0010\u0014\u001a\u00020\u00052\u0006\u0010\u0015\u001a\u00020\u0005H\u0016J6\u0010\u0016\u001a\n\u0012\u0004\u0012\u00020\u0007\u0018\u00010\u000e2\u000c\u0010\u0017\u001a\u0008\u0012\u0004\u0012\u00020\u00070\u00182\u0006\u0010\u0019\u001a\u00020\u00102\u0006\u0010\u0014\u001a\u00020\u00052\u0006\u0010\u0015\u001a\u00020\u0005H\u0002J \u0010\u001a\u001a\u001a\u0012\u0004\u0012\u00020\u0005\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00070\u001b0\u001bH\u0016R&\u0010\u0003\u001a\u001a\u0012\u0004\u0012\u00020\u0005\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00070\u00060\u0004X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001c" } d2 = { "Landroidx/room/RoomDatabase$MigrationContainer;", "", "()V", "migrations", "", "", "Ljava/util/TreeMap;", "Landroidx/room/migration/Migration;", "addMigration", "", "migration", "addMigrations", "", "([Landroidx/room/migration/Migration;)V", "", "contains", "", "startVersion", "endVersion", "findMigrationPath", "start", "end", "findUpMigrationPath", "result", "", "upgrade", "getMigrations", "", "room-runtime_release" } k = 0x1 mv = { 0x1, 0x7, 0x1 } xi = 0x30 .end annotation # instance fields .field private final migrations:Ljava/util/Map; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Map<", "Ljava/lang/Integer;", "Ljava/util/TreeMap<", "Ljava/lang/Integer;", "Landroidx/room/migration/Migration;", ">;>;" } .end annotation .end field # direct methods .method public constructor ()V .locals 1 .line 1357 invoke-direct {p0}, Ljava/lang/Object;->()V .line 1358 new-instance v0, Ljava/util/LinkedHashMap; invoke-direct {v0}, Ljava/util/LinkedHashMap;->()V check-cast v0, Ljava/util/Map; iput-object v0, p0, Landroidx/room/RoomDatabase$MigrationContainer;->migrations:Ljava/util/Map; return-void .end method .method private final addMigration(Landroidx/room/migration/Migration;)V .locals 4 .line 1381 iget v0, p1, Landroidx/room/migration/Migration;->startVersion:I .line 1382 iget v1, p1, Landroidx/room/migration/Migration;->endVersion:I iget-object p0, p0, Landroidx/room/RoomDatabase$MigrationContainer;->migrations:Ljava/util/Map; .line 1383 invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v0 .line 1550 invoke-interface {p0, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v2 if-nez v2, :cond_0 .line 1383 new-instance v2, Ljava/util/TreeMap; invoke-direct {v2}, Ljava/util/TreeMap;->()V .line 1553 invoke-interface {p0, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 1383 :cond_0 check-cast v2, Ljava/util/TreeMap; .line 1385 invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object p0 move-object v0, v2 check-cast v0, Ljava/util/Map; invoke-interface {v0, p0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z move-result p0 if-eqz p0, :cond_1 .line 1386 new-instance p0, Ljava/lang/StringBuilder; const-string v3, "Overriding migration " invoke-direct {p0, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v3 invoke-virtual {v2, v3}, Ljava/util/TreeMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v2 invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p0 const-string v2, " with " invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 const-string v2, "ROOM" invoke-static {v2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I :cond_1 invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object p0 .line 1388 invoke-interface {v0, p0, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; return-void .end method .method private final findUpMigrationPath(Ljava/util/List;ZII)Ljava/util/List; .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "Landroidx/room/migration/Migration;", ">;ZII)", "Ljava/util/List<", "Landroidx/room/migration/Migration;", ">;" } .end annotation :cond_0 if-eqz p2, :cond_1 if-ge p3, p4, :cond_7 goto :goto_0 :cond_1 if-le p3, p4, :cond_7 :goto_0 iget-object v0, p0, Landroidx/room/RoomDatabase$MigrationContainer;->migrations:Ljava/util/Map; .line 1427 invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v1 invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/TreeMap; const/4 v1, 0x0 if-nez v0, :cond_2 return-object v1 :cond_2 if-eqz p2, :cond_3 .line 1430 invoke-virtual {v0}, Ljava/util/TreeMap;->descendingKeySet()Ljava/util/NavigableSet; move-result-object v2 check-cast v2, Ljava/util/Set; goto :goto_1 .line 1432 :cond_3 invoke-virtual {v0}, Ljava/util/TreeMap;->keySet()Ljava/util/Set; move-result-object v2 .line 1435 :goto_1 invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_4 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_6 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/Integer; const-string v4, "targetVersion" if-eqz p2, :cond_5 add-int/lit8 v5, p3, 0x1 .line 1437 invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I move-result v4 if-gt v5, v4, :cond_4 if-gt v4, p4, :cond_4 goto :goto_2 .line 1439 :cond_5 invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I move-result v4 if-gt p4, v4, :cond_4 if-ge v4, p3, :cond_4 .line 1444 :goto_2 invoke-virtual {v0, v3}, Ljava/util/TreeMap;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p3 invoke-static {p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-interface {p1, p3}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 1445 invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I move-result p3 const/4 v0, 0x1 goto :goto_3 :cond_6 const/4 v0, 0x0 :goto_3 if-nez v0, :cond_0 return-object v1 :cond_7 return-object p1 .end method # virtual methods .method public addMigrations(Ljava/util/List;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Landroidx/room/migration/Migration;", ">;)V" } .end annotation const-string v0, "migrations" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 1377 check-cast p1, Ljava/lang/Iterable; .line 1548 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p1 :goto_0 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/room/migration/Migration; .line 1377 invoke-direct {p0, v0}, Landroidx/room/RoomDatabase$MigrationContainer;->addMigration(Landroidx/room/migration/Migration;)V goto :goto_0 :cond_0 return-void .end method .method public varargs addMigrations([Landroidx/room/migration/Migration;)V .locals 3 const-string v0, "migrations" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 1546 array-length v0, p1 const/4 v1, 0x0 :goto_0 if-ge v1, v0, :cond_0 aget-object v2, p1, v1 .line 1367 invoke-direct {p0, v2}, Landroidx/room/RoomDatabase$MigrationContainer;->addMigration(Landroidx/room/migration/Migration;)V add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_0 return-void .end method .method public final contains(II)Z .locals 1 .line 1466 invoke-virtual {p0}, Landroidx/room/RoomDatabase$MigrationContainer;->getMigrations()Ljava/util/Map; move-result-object p0 .line 1467 invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v0 invoke-interface {p0, v0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_1 .line 1468 invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object p1 invoke-interface {p0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p0 check-cast p0, Ljava/util/Map; if-nez p0, :cond_0 invoke-static {}, Lkotlin/collections/MapsKt;->emptyMap()Ljava/util/Map; move-result-object p0 .line 1469 :cond_0 invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object p1 invoke-interface {p0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z move-result p0 return p0 :cond_1 const/4 p0, 0x0 return p0 .end method .method public findMigrationPath(II)Ljava/util/List; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(II)", "Ljava/util/List<", "Landroidx/room/migration/Migration;", ">;" } .end annotation if-ne p1, p2, :cond_0 .line 1412 invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List; move-result-object p0 return-object p0 :cond_0 if-le p2, p1, :cond_1 const/4 v0, 0x1 goto :goto_0 :cond_1 const/4 v0, 0x0 .line 1415 :goto_0 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V check-cast v1, Ljava/util/List; .line 1416 invoke-direct {p0, v1, v0, p1, p2}, Landroidx/room/RoomDatabase$MigrationContainer;->findUpMigrationPath(Ljava/util/List;ZII)Ljava/util/List; move-result-object p0 return-object p0 .end method .method public getMigrations()Ljava/util/Map; .locals 0 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/Map<", "Ljava/lang/Integer;", "Ljava/util/Map<", "Ljava/lang/Integer;", "Landroidx/room/migration/Migration;", ">;>;" } .end annotation iget-object p0, p0, Landroidx/room/RoomDatabase$MigrationContainer;->migrations:Ljava/util/Map; return-object p0 .end method