LifetimeAssert$WrappedReference.smali
.class Laegon/chrome/base/LifetimeAssert$WrappedReference;
.super Ljava/lang/ref/PhantomReference;
# annotations
.annotation build Landroid/support/annotation/VisibleForTesting;
.end annotation
.annotation system Ldalvik/annotation/EnclosingClass;
value = Laegon/chrome/base/LifetimeAssert;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "WrappedReference"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/PhantomReference",
"<",
"Ljava/lang/Object;",
">;"
}
.end annotation
# static fields
.field private static sActiveWrappers:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set",
"<",
"Laegon/chrome/base/LifetimeAssert$WrappedReference;",
">;"
}
.end annotation
.end field
.field private static sReferenceQueue:Ljava/lang/ref/ReferenceQueue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ref/ReferenceQueue",
"<",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
# instance fields
.field final mCreationException:Laegon/chrome/base/LifetimeAssert$CreationException;
.field mSafeToGc:Z
.field final mTargetClass:Ljava/lang/Class;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Class",
"<*>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 2
new-instance v0, Ljava/lang/ref/ReferenceQueue;
invoke-direct {v0}, Ljava/lang/ref/ReferenceQueue;-><init>()V
sput-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sReferenceQueue:Ljava/lang/ref/ReferenceQueue;
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
invoke-static {v0}, Ljava/util/Collections;->synchronizedSet(Ljava/util/Set;)Ljava/util/Set;
move-result-object v0
sput-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sActiveWrappers:Ljava/util/Set;
new-instance v0, Laegon/chrome/base/LifetimeAssert$WrappedReference$1;
const-string v1, "GcStateAssertQueue"
invoke-direct {v0, v1}, Laegon/chrome/base/LifetimeAssert$WrappedReference$1;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Object;Laegon/chrome/base/LifetimeAssert$CreationException;Z)V
.registers 5
sget-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sReferenceQueue:Ljava/lang/ref/ReferenceQueue;
invoke-direct {p0, p1, v0}, Ljava/lang/ref/PhantomReference;-><init>(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V
iput-object p2, p0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->mCreationException:Laegon/chrome/base/LifetimeAssert$CreationException;
iput-boolean p3, p0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->mSafeToGc:Z
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
iput-object v0, p0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->mTargetClass:Ljava/lang/Class;
sget-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sActiveWrappers:Ljava/util/Set;
invoke-interface {v0, p0}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
return-void
.end method
.method static synthetic access$000()Ljava/lang/ref/ReferenceQueue;
.registers 1
sget-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sReferenceQueue:Ljava/lang/ref/ReferenceQueue;
return-object v0
.end method
.method static synthetic access$100()Ljava/util/Set;
.registers 1
sget-object v0, Laegon/chrome/base/LifetimeAssert$WrappedReference;->sActiveWrappers:Ljava/util/Set;
return-object v0
.end method