public class java.lang.ThreadLocal<T>
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: java.lang.ThreadLocal
super_class: java.lang.Object
{
private final int threadLocalHashCode;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static java.util.concurrent.atomic.AtomicInteger nextHashCode;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private static final int HASH_INCREMENT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1640531527
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
1: putstatic java.lang.ThreadLocal.nextHashCode:Ljava/util/concurrent/atomic/AtomicInteger;
2: return
LocalVariableTable:
Start End Slot Name Signature
private static int nextHashCode();
descriptor: ()I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic java.lang.ThreadLocal.nextHashCode:Ljava/util/concurrent/atomic/AtomicInteger;
ldc 1640531527
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndAdd:(I)I
ireturn
LocalVariableTable:
Start End Slot Name Signature
protected T initialValue();
descriptor: ()Ljava/lang/Object;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/lang/ThreadLocal<TT;>;
Signature: ()TT;
public static <S> java.lang.ThreadLocal<S> withInitial(java.util.function.Supplier<? extends S>);
descriptor: (Ljava/util/function/Supplier;)Ljava/lang/ThreadLocal;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.ThreadLocal$SuppliedThreadLocal
dup
aload 0
invokespecial java.lang.ThreadLocal$SuppliedThreadLocal.<init>:(Ljava/util/function/Supplier;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 supplier Ljava/util/function/Supplier<+TS;>;
Signature: <S:Ljava/lang/Object;>(Ljava/util/function/Supplier<+TS;>;)Ljava/lang/ThreadLocal<TS;>;
MethodParameters:
Name Flags
supplier
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic java.lang.ThreadLocal.nextHashCode:()I
putfield java.lang.ThreadLocal.threadLocalHashCode:I
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/lang/ThreadLocal<TT;>;
public T get();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 1
start local 1 1: aload 0
aload 1
invokevirtual java.lang.ThreadLocal.getMap:(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
astore 2
start local 2 2: aload 2
ifnull 7
3: aload 2
aload 0
invokevirtual java.lang.ThreadLocal$ThreadLocalMap.getEntry:(Ljava/lang/ThreadLocal;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
astore 3
start local 3 4: aload 3
ifnull 7
5: aload 3
getfield java.lang.ThreadLocal$ThreadLocalMap$Entry.value:Ljava/lang/Object;
astore 4
start local 4 6: aload 4
areturn
end local 4 end local 3 7: StackMap locals: java.lang.Thread java.lang.ThreadLocal$ThreadLocalMap
StackMap stack:
aload 0
invokevirtual java.lang.ThreadLocal.setInitialValue:()Ljava/lang/Object;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Ljava/lang/ThreadLocal<TT;>;
1 8 1 t Ljava/lang/Thread;
2 8 2 map Ljava/lang/ThreadLocal$ThreadLocalMap;
4 7 3 e Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
6 7 4 result TT;
Signature: ()TT;
boolean isPresent();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=3, args_size=1
start local 0 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 1
start local 1 1: aload 0
aload 1
invokevirtual java.lang.ThreadLocal.getMap:(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
astore 2
start local 2 2: aload 2
ifnull 3
aload 2
aload 0
invokevirtual java.lang.ThreadLocal$ThreadLocalMap.getEntry:(Ljava/lang/ThreadLocal;)Ljava/lang/ThreadLocal$ThreadLocalMap$Entry;
ifnull 3
iconst_1
ireturn
StackMap locals: java.lang.Thread java.lang.ThreadLocal$ThreadLocalMap
StackMap stack:
3: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/lang/ThreadLocal<TT;>;
1 4 1 t Ljava/lang/Thread;
2 4 2 map Ljava/lang/ThreadLocal$ThreadLocalMap;
private T setInitialValue();
descriptor: ()Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=1
start local 0 0: aload 0
invokevirtual java.lang.ThreadLocal.initialValue:()Ljava/lang/Object;
astore 1
start local 1 1: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 2
start local 2 2: aload 0
aload 2
invokevirtual java.lang.ThreadLocal.getMap:(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
astore 3
start local 3 3: aload 3
ifnull 6
4: aload 3
aload 0
aload 1
invokevirtual java.lang.ThreadLocal$ThreadLocalMap.set:(Ljava/lang/ThreadLocal;Ljava/lang/Object;)V
5: goto 7
6: StackMap locals: java.lang.Object java.lang.Thread java.lang.ThreadLocal$ThreadLocalMap
StackMap stack:
aload 0
aload 2
aload 1
invokevirtual java.lang.ThreadLocal.createMap:(Ljava/lang/Thread;Ljava/lang/Object;)V
7: StackMap locals:
StackMap stack:
aload 0
instanceof jdk.internal.misc.TerminatingThreadLocal
ifeq 9
8: aload 0
checkcast jdk.internal.misc.TerminatingThreadLocal
invokestatic jdk.internal.misc.TerminatingThreadLocal.register:(Ljdk/internal/misc/TerminatingThreadLocal;)V
9: StackMap locals:
StackMap stack:
aload 1
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Ljava/lang/ThreadLocal<TT;>;
1 10 1 value TT;
2 10 2 t Ljava/lang/Thread;
3 10 3 map Ljava/lang/ThreadLocal$ThreadLocalMap;
Signature: ()TT;
public void set();
descriptor: (Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 2
start local 2 1: aload 0
aload 2
invokevirtual java.lang.ThreadLocal.getMap:(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
astore 3
start local 3 2: aload 3
ifnull 5
3: aload 3
aload 0
aload 1
invokevirtual java.lang.ThreadLocal$ThreadLocalMap.set:(Ljava/lang/ThreadLocal;Ljava/lang/Object;)V
4: goto 6
5: StackMap locals: java.lang.Thread java.lang.ThreadLocal$ThreadLocalMap
StackMap stack:
aload 0
aload 2
aload 1
invokevirtual java.lang.ThreadLocal.createMap:(Ljava/lang/Thread;Ljava/lang/Object;)V
6: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Ljava/lang/ThreadLocal<TT;>;
0 7 1 value TT;
1 7 2 t Ljava/lang/Thread;
2 7 3 map Ljava/lang/ThreadLocal$ThreadLocalMap;
Signature: (TT;)V
MethodParameters:
Name Flags
value
public void remove();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
invokevirtual java.lang.ThreadLocal.getMap:(Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
astore 1
start local 1 1: aload 1
ifnull 3
2: aload 1
aload 0
invokevirtual java.lang.ThreadLocal$ThreadLocalMap.remove:(Ljava/lang/ThreadLocal;)V
3: StackMap locals: java.lang.ThreadLocal$ThreadLocalMap
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Ljava/lang/ThreadLocal<TT;>;
1 4 1 m Ljava/lang/ThreadLocal$ThreadLocalMap;
java.lang.ThreadLocal$ThreadLocalMap getMap(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)Ljava/lang/ThreadLocal$ThreadLocalMap;
flags: (0x0000)
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield java.lang.Thread.threadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/lang/ThreadLocal<TT;>;
0 1 1 t Ljava/lang/Thread;
MethodParameters:
Name Flags
t
void createMap(java.lang.Thread, );
descriptor: (Ljava/lang/Thread;Ljava/lang/Object;)V
flags: (0x0000)
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
new java.lang.ThreadLocal$ThreadLocalMap
dup
aload 0
aload 2
invokespecial java.lang.ThreadLocal$ThreadLocalMap.<init>:(Ljava/lang/ThreadLocal;Ljava/lang/Object;)V
putfield java.lang.Thread.threadLocals:Ljava/lang/ThreadLocal$ThreadLocalMap;
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/lang/ThreadLocal<TT;>;
0 2 1 t Ljava/lang/Thread;
0 2 2 firstValue TT;
Signature: (Ljava/lang/Thread;TT;)V
MethodParameters:
Name Flags
t
firstValue
static java.lang.ThreadLocal$ThreadLocalMap createInheritedMap(java.lang.ThreadLocal$ThreadLocalMap);
descriptor: (Ljava/lang/ThreadLocal$ThreadLocalMap;)Ljava/lang/ThreadLocal$ThreadLocalMap;
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.ThreadLocal$ThreadLocalMap
dup
aload 0
invokespecial java.lang.ThreadLocal$ThreadLocalMap.<init>:(Ljava/lang/ThreadLocal$ThreadLocalMap;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 parentMap Ljava/lang/ThreadLocal$ThreadLocalMap;
MethodParameters:
Name Flags
parentMap
T childValue();
descriptor: (Ljava/lang/Object;)Ljava/lang/Object;
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: new java.lang.UnsupportedOperationException
dup
invokespecial java.lang.UnsupportedOperationException.<init>:()V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/lang/ThreadLocal<TT;>;
0 1 1 parentValue TT;
Signature: (TT;)TT;
MethodParameters:
Name Flags
parentValue
}
Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;
SourceFile: "ThreadLocal.java"
NestMembers:
java.lang.ThreadLocal$SuppliedThreadLocal java.lang.ThreadLocal$ThreadLocalMap java.lang.ThreadLocal$ThreadLocalMap$Entry
InnerClasses:
final SuppliedThreadLocal = java.lang.ThreadLocal$SuppliedThreadLocal of java.lang.ThreadLocal
ThreadLocalMap = java.lang.ThreadLocal$ThreadLocalMap of java.lang.ThreadLocal
Entry = java.lang.ThreadLocal$ThreadLocalMap$Entry of java.lang.ThreadLocal$ThreadLocalMap