public class com.sun.org.apache.xml.internal.utils.SafeThread extends java.lang.Thread
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.sun.org.apache.xml.internal.utils.SafeThread
super_class: java.lang.Thread
{
private static final jdk.internal.misc.Unsafe UNSAFE;
descriptor: Ljdk/internal/misc/Unsafe;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long THREAD_LOCALS;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final long INHERITABLE_THREAD_LOCALS;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private volatile boolean ran;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=2, args_size=0
0: invokestatic jdk.internal.misc.Unsafe.getUnsafe:()Ljdk/internal/misc/Unsafe;
putstatic com.sun.org.apache.xml.internal.utils.SafeThread.UNSAFE:Ljdk/internal/misc/Unsafe;
1: ldc Ljava/lang/Thread;
astore 0
start local 0 2: getstatic com.sun.org.apache.xml.internal.utils.SafeThread.UNSAFE:Ljdk/internal/misc/Unsafe;
aload 0
ldc "threadLocals"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
invokevirtual jdk.internal.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic com.sun.org.apache.xml.internal.utils.SafeThread.THREAD_LOCALS:J
3: getstatic com.sun.org.apache.xml.internal.utils.SafeThread.UNSAFE:Ljdk/internal/misc/Unsafe;
aload 0
ldc "inheritableThreadLocals"
invokevirtual java.lang.Class.getDeclaredField:(Ljava/lang/String;)Ljava/lang/reflect/Field;
invokevirtual jdk.internal.misc.Unsafe.objectFieldOffset:(Ljava/lang/reflect/Field;)J
putstatic com.sun.org.apache.xml.internal.utils.SafeThread.INHERITABLE_THREAD_LOCALS:J
4: goto 7
StackMap locals: java.lang.Class
StackMap stack: java.lang.Exception
5: astore 1
start local 1 6: new java.lang.Error
dup
aload 1
invokespecial java.lang.Error.<init>:(Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 7: StackMap locals:
StackMap stack:
return
LocalVariableTable:
Start End Slot Name Signature
2 7 0 t Ljava/lang/Class<*>;
6 7 1 e Ljava/lang/Exception;
Exception table:
from to target type
2 4 5 Class java.lang.Exception
public void <init>(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
1: aload 0
iconst_0
putfield com.sun.org.apache.xml.internal.utils.SafeThread.ran:Z
2: aload 0
invokevirtual com.sun.org.apache.xml.internal.utils.SafeThread.eraseThreadLocals:()V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/org/apache/xml/internal/utils/SafeThread;
0 4 1 target Ljava/lang/Runnable;
MethodParameters:
Name Flags
target
public void <init>(java.lang.Runnable, java.lang.String);
descriptor: (Ljava/lang/Runnable;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;Ljava/lang/String;)V
1: aload 0
iconst_0
putfield com.sun.org.apache.xml.internal.utils.SafeThread.ran:Z
2: aload 0
invokevirtual com.sun.org.apache.xml.internal.utils.SafeThread.eraseThreadLocals:()V
3: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/org/apache/xml/internal/utils/SafeThread;
0 4 1 target Ljava/lang/Runnable;
0 4 2 name Ljava/lang/String;
MethodParameters:
Name Flags
target
name
public void <init>(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String);
descriptor: (Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
aload 2
aload 3
invokespecial java.lang.Thread.<init>:(Ljava/lang/ThreadGroup;Ljava/lang/Runnable;Ljava/lang/String;)V
1: aload 0
iconst_0
putfield com.sun.org.apache.xml.internal.utils.SafeThread.ran:Z
2: aload 0
invokevirtual com.sun.org.apache.xml.internal.utils.SafeThread.eraseThreadLocals:()V
3: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lcom/sun/org/apache/xml/internal/utils/SafeThread;
0 4 1 group Ljava/lang/ThreadGroup;
0 4 2 target Ljava/lang/Runnable;
0 4 3 name Ljava/lang/String;
MethodParameters:
Name Flags
group
target
name
public final void run();
descriptor: ()V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=3, locals=2, args_size=1
start local 0 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
aload 0
if_acmpeq 2
1: new java.lang.IllegalStateException
dup
ldc "The run() method in a SafeThread cannot be called from another thread."
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
dup
astore 1
monitorenter
3: aload 0
getfield com.sun.org.apache.xml.internal.utils.SafeThread.ran:Z
ifne 6
4: aload 0
iconst_1
putfield com.sun.org.apache.xml.internal.utils.SafeThread.ran:Z
5: goto 7
6: StackMap locals: com.sun.org.apache.xml.internal.utils.SafeThread
StackMap stack:
new java.lang.IllegalStateException
dup
ldc "The run() method in a SafeThread cannot be called more than once."
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 1
monitorexit
8: goto 11
StackMap locals:
StackMap stack: java.lang.Throwable
9: aload 1
monitorexit
10: athrow
11: StackMap locals:
StackMap stack:
aload 0
invokespecial java.lang.Thread.run:()V
12: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lcom/sun/org/apache/xml/internal/utils/SafeThread;
Exception table:
from to target type
3 8 9 any
9 10 9 any
public final void eraseThreadLocals();
descriptor: ()V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=5, locals=1, args_size=1
start local 0 0: getstatic com.sun.org.apache.xml.internal.utils.SafeThread.UNSAFE:Ljdk/internal/misc/Unsafe;
aload 0
getstatic com.sun.org.apache.xml.internal.utils.SafeThread.THREAD_LOCALS:J
aconst_null
invokevirtual jdk.internal.misc.Unsafe.putReference:(Ljava/lang/Object;JLjava/lang/Object;)V
1: getstatic com.sun.org.apache.xml.internal.utils.SafeThread.UNSAFE:Ljdk/internal/misc/Unsafe;
aload 0
getstatic com.sun.org.apache.xml.internal.utils.SafeThread.INHERITABLE_THREAD_LOCALS:J
aconst_null
invokevirtual jdk.internal.misc.Unsafe.putReference:(Ljava/lang/Object;JLjava/lang/Object;)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/sun/org/apache/xml/internal/utils/SafeThread;
}
SourceFile: "SafeThread.java"