You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
263 lines
6.1 KiB
263 lines
6.1 KiB
2 years ago
|
.class Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Suppliers.java"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lcom/google/common/base/Supplier;
|
||
|
.implements Ljava/io/Serializable;
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation build Lcom/google/common/annotations/VisibleForTesting;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Lcom/google/common/base/Suppliers;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x8
|
||
|
name = "ExpiringMemoizingSupplier"
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<T:",
|
||
|
"Ljava/lang/Object;",
|
||
|
">",
|
||
|
"Ljava/lang/Object;",
|
||
|
"Lcom/google/common/base/Supplier",
|
||
|
"<TT;>;",
|
||
|
"Ljava/io/Serializable;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field private static final serialVersionUID:J
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field final delegate:Lcom/google/common/base/Supplier;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lcom/google/common/base/Supplier",
|
||
|
"<TT;>;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field final durationNanos:J
|
||
|
|
||
|
.field volatile transient expirationNanos:J
|
||
|
|
||
|
.field volatile transient value:Ljava/lang/Object;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method constructor <init>(Lcom/google/common/base/Supplier;JLjava/util/concurrent/TimeUnit;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lcom/google/common/base/Supplier",
|
||
|
"<TT;>;J",
|
||
|
"Ljava/util/concurrent/TimeUnit;",
|
||
|
")V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 174
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
.line 175
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Lcom/google/common/base/Supplier;
|
||
|
|
||
|
iput-object v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->delegate:Lcom/google/common/base/Supplier;
|
||
|
|
||
|
.line 176
|
||
|
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
iput-wide v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->durationNanos:J
|
||
|
|
||
|
.line 177
|
||
|
const-wide/16 v0, 0x0
|
||
|
|
||
|
cmp-long v0, p2, v0
|
||
|
|
||
|
if-lez v0, :cond_0
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
:goto_0
|
||
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
||
|
|
||
|
.line 178
|
||
|
return-void
|
||
|
|
||
|
.line 177
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public get()Ljava/lang/Object;
|
||
|
.locals 8
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
const-wide/16 v6, 0x0
|
||
|
|
||
|
.line 187
|
||
|
iget-wide v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->expirationNanos:J
|
||
|
|
||
|
.line 188
|
||
|
invoke-static {}, Lcom/google/common/base/Platform;->systemNanoTime()J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
.line 189
|
||
|
cmp-long v4, v0, v6
|
||
|
|
||
|
if-eqz v4, :cond_0
|
||
|
|
||
|
sub-long v4, v2, v0
|
||
|
|
||
|
cmp-long v4, v4, v6
|
||
|
|
||
|
if-ltz v4, :cond_3
|
||
|
|
||
|
.line 190
|
||
|
:cond_0
|
||
|
monitor-enter p0
|
||
|
|
||
|
.line 191
|
||
|
:try_start_0
|
||
|
iget-wide v4, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->expirationNanos:J
|
||
|
|
||
|
cmp-long v0, v0, v4
|
||
|
|
||
|
if-nez v0, :cond_2
|
||
|
|
||
|
.line 192
|
||
|
iget-object v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->delegate:Lcom/google/common/base/Supplier;
|
||
|
|
||
|
invoke-interface {v0}, Lcom/google/common/base/Supplier;->get()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 193
|
||
|
iput-object v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->value:Ljava/lang/Object;
|
||
|
|
||
|
.line 194
|
||
|
iget-wide v4, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->durationNanos:J
|
||
|
|
||
|
add-long/2addr v2, v4
|
||
|
|
||
|
.line 197
|
||
|
cmp-long v1, v2, v6
|
||
|
|
||
|
if-nez v1, :cond_1
|
||
|
|
||
|
const-wide/16 v2, 0x1
|
||
|
|
||
|
:cond_1
|
||
|
iput-wide v2, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->expirationNanos:J
|
||
|
|
||
|
.line 198
|
||
|
monitor-exit p0
|
||
|
|
||
|
.line 202
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
.line 200
|
||
|
:cond_2
|
||
|
monitor-exit p0
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
.line 202
|
||
|
:cond_3
|
||
|
iget-object v0, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->value:Ljava/lang/Object;
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 200
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
:try_start_1
|
||
|
monitor-exit p0
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public toString()Ljava/lang/String;
|
||
|
.locals 4
|
||
|
|
||
|
.prologue
|
||
|
.line 208
|
||
|
new-instance v0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v1, "Suppliers.memoizeWithExpiration("
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-object v1, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->delegate:Lcom/google/common/base/Supplier;
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, ", "
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-wide v2, p0, Lcom/google/common/base/Suppliers$ExpiringMemoizingSupplier;->durationNanos:J
|
||
|
|
||
|
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, ", NANOS)"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|