public class com.google.common.base.FinalizableReferenceQueue implements java.io.Closeable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.google.common.base.FinalizableReferenceQueue
super_class: java.lang.Object
{
private static final java.util.logging.Logger logger;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String FINALIZER_CLASS_NAME;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "com.google.common.base.internal.Finalizer"
private static final java.lang.reflect.Method startFinalizer;
descriptor: Ljava/lang/reflect/Method;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
final java.lang.ref.ReferenceQueue<java.lang.Object> queue;
descriptor: Ljava/lang/ref/ReferenceQueue;
flags: (0x0010) ACC_FINAL
Signature: Ljava/lang/ref/ReferenceQueue<Ljava/lang/Object;>;
final java.lang.ref.PhantomReference<java.lang.Object> frqRef;
descriptor: Ljava/lang/ref/PhantomReference;
flags: (0x0010) ACC_FINAL
Signature: Ljava/lang/ref/PhantomReference<Ljava/lang/Object;>;
final boolean threadStarted;
descriptor: Z
flags: (0x0010) ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=5, locals=1, args_size=0
0: ldc Lcom/google/common/base/FinalizableReferenceQueue;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic java.util.logging.Logger.getLogger:(Ljava/lang/String;)Ljava/util/logging/Logger;
putstatic com.google.common.base.FinalizableReferenceQueue.logger:Ljava/util/logging/Logger;
1: iconst_3
anewarray com.google.common.base.FinalizableReferenceQueue$FinalizerLoader
dup
iconst_0
2: new com.google.common.base.FinalizableReferenceQueue$SystemLoader
dup
invokespecial com.google.common.base.FinalizableReferenceQueue$SystemLoader.<init>:()V
aastore
dup
iconst_1
new com.google.common.base.FinalizableReferenceQueue$DecoupledLoader
dup
invokespecial com.google.common.base.FinalizableReferenceQueue$DecoupledLoader.<init>:()V
aastore
dup
iconst_2
new com.google.common.base.FinalizableReferenceQueue$DirectLoader
dup
invokespecial com.google.common.base.FinalizableReferenceQueue$DirectLoader.<init>:()V
aastore
invokestatic com.google.common.base.FinalizableReferenceQueue.loadFinalizer:([Lcom/google/common/base/FinalizableReferenceQueue$FinalizerLoader;)Ljava/lang/Class;
astore 0
start local 0 3: aload 0
invokestatic com.google.common.base.FinalizableReferenceQueue.getStartFinalizer:(Ljava/lang/Class;)Ljava/lang/reflect/Method;
putstatic com.google.common.base.FinalizableReferenceQueue.startFinalizer:Ljava/lang/reflect/Method;
end local 0 4: return
LocalVariableTable:
Start End Slot Name Signature
3 4 0 finalizer Ljava/lang/Class<*>;
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.ref.ReferenceQueue
dup
invokespecial java.lang.ref.ReferenceQueue.<init>:()V
putfield com.google.common.base.FinalizableReferenceQueue.queue:Ljava/lang/ref/ReferenceQueue;
2: aload 0
new java.lang.ref.PhantomReference
dup
aload 0
aload 0
getfield com.google.common.base.FinalizableReferenceQueue.queue:Ljava/lang/ref/ReferenceQueue;
invokespecial java.lang.ref.PhantomReference.<init>:(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V
putfield com.google.common.base.FinalizableReferenceQueue.frqRef:Ljava/lang/ref/PhantomReference;
3: iconst_0
istore 1
start local 1 4: getstatic com.google.common.base.FinalizableReferenceQueue.startFinalizer:Ljava/lang/reflect/Method;
aconst_null
iconst_3
anewarray java.lang.Object
dup
iconst_0
ldc Lcom/google/common/base/FinalizableReference;
aastore
dup
iconst_1
aload 0
getfield com.google.common.base.FinalizableReferenceQueue.queue:Ljava/lang/ref/ReferenceQueue;
aastore
dup
iconst_2
aload 0
getfield com.google.common.base.FinalizableReferenceQueue.frqRef:Ljava/lang/ref/PhantomReference;
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
5: iconst_1
istore 1
6: goto 15
StackMap locals: com.google.common.base.FinalizableReferenceQueue int
StackMap stack: java.lang.IllegalAccessException
7: astore 2
start local 2 8: new java.lang.AssertionError
dup
aload 2
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 2 9: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
start local 2 10: getstatic com.google.common.base.FinalizableReferenceQueue.logger:Ljava/util/logging/Logger;
11: getstatic java.util.logging.Level.INFO:Ljava/util/logging/Level;
12: ldc "Failed to start reference finalizer thread. Reference cleanup will only occur when new references are created."
13: aload 2
14: invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 15: StackMap locals:
StackMap stack:
aload 0
iload 1
putfield com.google.common.base.FinalizableReferenceQueue.threadStarted:Z
16: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lcom/google/common/base/FinalizableReferenceQueue;
4 17 1 threadStarted Z
8 9 2 impossible Ljava/lang/IllegalAccessException;
10 15 2 t Ljava/lang/Throwable;
Exception table:
from to target type
4 6 7 Class java.lang.IllegalAccessException
4 6 9 Class java.lang.Throwable
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.FinalizableReferenceQueue.frqRef:Ljava/lang/ref/PhantomReference;
invokevirtual java.lang.ref.PhantomReference.enqueue:()Z
pop
1: aload 0
invokevirtual com.google.common.base.FinalizableReferenceQueue.cleanUp:()V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/base/FinalizableReferenceQueue;
void cleanUp();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield com.google.common.base.FinalizableReferenceQueue.threadStarted:Z
ifeq 7
1: return
start local 1 2: StackMap locals: java.lang.ref.Reference
StackMap stack:
aload 1
invokevirtual java.lang.ref.Reference.clear:()V
3: aload 1
checkcast com.google.common.base.FinalizableReference
invokeinterface com.google.common.base.FinalizableReference.finalizeReferent:()V
4: goto 7
StackMap locals:
StackMap stack: java.lang.Throwable
5: astore 2
start local 2 6: getstatic com.google.common.base.FinalizableReferenceQueue.logger:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.SEVERE:Ljava/util/logging/Level;
ldc "Error cleaning up after reference."
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 end local 1 7: StackMap locals:
StackMap stack:
aload 0
getfield com.google.common.base.FinalizableReferenceQueue.queue:Ljava/lang/ref/ReferenceQueue;
invokevirtual java.lang.ref.ReferenceQueue.poll:()Ljava/lang/ref/Reference;
dup
astore 1
start local 1 8: ifnonnull 2
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lcom/google/common/base/FinalizableReferenceQueue;
2 7 1 reference Ljava/lang/ref/Reference<*>;
8 10 1 reference Ljava/lang/ref/Reference<*>;
6 7 2 t Ljava/lang/Throwable;
Exception table:
from to target type
3 4 5 Class java.lang.Throwable
private static java.lang.Class<?> loadFinalizer(com.google.common.base.FinalizableReferenceQueue$FinalizerLoader[]);
descriptor: ([Lcom/google/common/base/FinalizableReferenceQueue$FinalizerLoader;)Ljava/lang/Class;
flags: (0x008a) ACC_PRIVATE, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=6, args_size=1
start local 0 0: aload 0
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 6
StackMap locals: com.google.common.base.FinalizableReferenceQueue$FinalizerLoader[] top int int com.google.common.base.FinalizableReferenceQueue$FinalizerLoader[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aload 1
invokeinterface com.google.common.base.FinalizableReferenceQueue$FinalizerLoader.loadFinalizer:()Ljava/lang/Class;
astore 5
start local 5 3: aload 5
ifnull 5
4: aload 5
areturn
end local 5 end local 1 5: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
6: iload 2
iload 3
if_icmplt 1
7: new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 loaders [Lcom/google/common/base/FinalizableReferenceQueue$FinalizerLoader;
2 5 1 loader Lcom/google/common/base/FinalizableReferenceQueue$FinalizerLoader;
3 5 5 finalizer Ljava/lang/Class<*>;
Signature: ([Lcom/google/common/base/FinalizableReferenceQueue$FinalizerLoader;)Ljava/lang/Class<*>;
MethodParameters:
Name Flags
loaders
static java.lang.reflect.Method getStartFinalizer(java.lang.Class<?>);
descriptor: (Ljava/lang/Class;)Ljava/lang/reflect/Method;
flags: (0x0008) ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 0: aload 0
1: ldc "startFinalizer"
iconst_3
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/lang/Class;
aastore
dup
iconst_1
ldc Ljava/lang/ref/ReferenceQueue;
aastore
dup
iconst_2
ldc Ljava/lang/ref/PhantomReference;
aastore
2: invokevirtual java.lang.Class.getMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
3: areturn
4: StackMap locals:
StackMap stack: java.lang.NoSuchMethodException
astore 1
start local 1 5: new java.lang.AssertionError
dup
aload 1
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 finalizer Ljava/lang/Class<*>;
5 6 1 e Ljava/lang/NoSuchMethodException;
Exception table:
from to target type
0 3 4 Class java.lang.NoSuchMethodException
Signature: (Ljava/lang/Class<*>;)Ljava/lang/reflect/Method;
MethodParameters:
Name Flags
finalizer
}
SourceFile: "FinalizableReferenceQueue.java"
NestMembers:
com.google.common.base.FinalizableReferenceQueue$DecoupledLoader com.google.common.base.FinalizableReferenceQueue$DirectLoader com.google.common.base.FinalizableReferenceQueue$FinalizerLoader com.google.common.base.FinalizableReferenceQueue$SystemLoader
InnerClasses:
DecoupledLoader = com.google.common.base.FinalizableReferenceQueue$DecoupledLoader of com.google.common.base.FinalizableReferenceQueue
DirectLoader = com.google.common.base.FinalizableReferenceQueue$DirectLoader of com.google.common.base.FinalizableReferenceQueue
abstract FinalizerLoader = com.google.common.base.FinalizableReferenceQueue$FinalizerLoader of com.google.common.base.FinalizableReferenceQueue
SystemLoader = com.google.common.base.FinalizableReferenceQueue$SystemLoader of com.google.common.base.FinalizableReferenceQueue
RuntimeInvisibleAnnotations:
com.google.common.annotations.GwtIncompatible()