public final class jdk.nashorn.internal.WeakValueCache<K, V>
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.internal.WeakValueCache
super_class: java.lang.Object
{
private final java.util.HashMap<K, jdk.nashorn.internal.WeakValueCache$KeyValueReference<K, V>> map;
descriptor: Ljava/util/HashMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/HashMap<TK;Ljdk/nashorn/internal/WeakValueCache$KeyValueReference<TK;TV;>;>;
private final java.lang.ref.ReferenceQueue<V> refQueue;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/lang/ref/ReferenceQueue<TV;>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.HashMap
dup
invokespecial java.util.HashMap.<init>:()V
putfield jdk.nashorn.internal.WeakValueCache.map:Ljava/util/HashMap;
2: aload 0
new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putfield jdk.nashorn.internal.WeakValueCache.refQueue:Ljava/lang/ref/ReferenceQueue;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljdk/nashorn/internal/WeakValueCache<TK;TV;>;
public V get();
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.WeakValueCache.refQueue:Ljava/lang/ref/ReferenceQueue;
invokevirtual java.lang.ref.ReferenceQueue.poll:()Ljava/lang/ref/Reference;
checkcast jdk.nashorn.internal.WeakValueCache$KeyValueReference
astore 2
start local 2 1: aload 2
ifnonnull 3
2: goto 5
3: StackMap locals: jdk.nashorn.internal.WeakValueCache$KeyValueReference
StackMap stack:
aload 0
getfield jdk.nashorn.internal.WeakValueCache.map:Ljava/util/HashMap;
aload 2
getfield jdk.nashorn.internal.WeakValueCache$KeyValueReference.key:Ljava/lang/Object;
aload 2
invokevirtual java.util.HashMap.remove:(Ljava/lang/Object;Ljava/lang/Object;)Z
pop
end local 2 4: goto 0
5: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.WeakValueCache.map:Ljava/util/HashMap;
aload 1
invokevirtual java.util.HashMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast jdk.nashorn.internal.WeakValueCache$KeyValueReference
astore 2
start local 2 6: aload 2
ifnull 8
7: aload 2
invokevirtual jdk.nashorn.internal.WeakValueCache$KeyValueReference.get:()Ljava/lang/Object;
areturn
8: StackMap locals: jdk.nashorn.internal.WeakValueCache$KeyValueReference
StackMap stack:
aconst_null
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Ljdk/nashorn/internal/WeakValueCache<TK;TV;>;
0 9 1 key TK;
1 4 2 ref Ljdk/nashorn/internal/WeakValueCache$KeyValueReference<**>;
6 9 2 ref Ljdk/nashorn/internal/WeakValueCache$KeyValueReference<TK;TV;>;
Signature: (TK;)TV;
MethodParameters:
Name Flags
key final
public V getOrCreate(K, java.util.function.Function<? super K, ? extends V>);
descriptor: (Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual jdk.nashorn.internal.WeakValueCache.get:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
start local 3 1: aload 3
ifnonnull 4
2: aload 2
aload 1
invokeinterface java.util.function.Function.apply:(Ljava/lang/Object;)Ljava/lang/Object;
astore 3
3: aload 0
getfield jdk.nashorn.internal.WeakValueCache.map:Ljava/util/HashMap;
aload 1
new jdk.nashorn.internal.WeakValueCache$KeyValueReference
dup
aload 1
aload 3
invokespecial jdk.nashorn.internal.WeakValueCache$KeyValueReference.<init>:(Ljava/lang/Object;Ljava/lang/Object;)V
invokevirtual java.util.HashMap.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: StackMap locals: java.lang.Object
StackMap stack:
aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljdk/nashorn/internal/WeakValueCache<TK;TV;>;
0 5 1 key TK;
0 5 2 creator Ljava/util/function/Function<-TK;+TV;>;
1 5 3 value TV;
Signature: (TK;Ljava/util/function/Function<-TK;+TV;>;)TV;
MethodParameters:
Name Flags
key final
creator final
}
Signature: <K:Ljava/lang/Object;V:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "WeakValueCache.java"
NestMembers:
jdk.nashorn.internal.WeakValueCache$KeyValueReference
InnerClasses:
private KeyValueReference = jdk.nashorn.internal.WeakValueCache$KeyValueReference of jdk.nashorn.internal.WeakValueCache