public class java.util.concurrent.locks.ReentrantLock implements java.util.concurrent.locks.Lock, java.io.Serializable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: java.util.concurrent.locks.ReentrantLock
super_class: java.lang.Object
{
private static final long serialVersionUID;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 7373984872572414699
private final java.util.concurrent.locks.ReentrantLock$Sync sync;
descriptor: Ljava/util/concurrent/locks/ReentrantLock$Sync;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
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.concurrent.locks.ReentrantLock$NonfairSync
dup
invokespecial java.util.concurrent.locks.ReentrantLock$NonfairSync.<init>:()V
putfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Ljava/util/concurrent/locks/ReentrantLock;
public void <init>(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iload 1
ifeq 2
new java.util.concurrent.locks.ReentrantLock$FairSync
dup
invokespecial java.util.concurrent.locks.ReentrantLock$FairSync.<init>:()V
goto 3
StackMap locals: java.util.concurrent.locks.ReentrantLock int
StackMap stack: java.util.concurrent.locks.ReentrantLock
2: new java.util.concurrent.locks.ReentrantLock$NonfairSync
dup
invokespecial java.util.concurrent.locks.ReentrantLock$NonfairSync.<init>:()V
StackMap locals: java.util.concurrent.locks.ReentrantLock int
StackMap stack: java.util.concurrent.locks.ReentrantLock java.util.concurrent.locks.ReentrantLock$Sync
3: putfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 5 1 fair Z
MethodParameters:
Name Flags
fair
public void lock();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.lock:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/concurrent/locks/ReentrantLock;
public void lockInterruptibly();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
iconst_1
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.acquireInterruptibly:(I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/concurrent/locks/ReentrantLock;
Exceptions:
throws java.lang.InterruptedException
public boolean tryLock();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
iconst_1
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.nonfairTryAcquire:(I)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public boolean tryLock(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 3 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
iconst_1
aload 3
lload 1
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.tryAcquireNanos:(IJ)Z
ireturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 1 1 timeout J
0 1 3 unit Ljava/util/concurrent/TimeUnit;
Exceptions:
throws java.lang.InterruptedException
MethodParameters:
Name Flags
timeout
unit
public void unlock();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
iconst_1
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.release:(I)Z
pop
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Ljava/util/concurrent/locks/ReentrantLock;
public java.util.concurrent.locks.Condition newCondition();
descriptor: ()Ljava/util/concurrent/locks/Condition;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.newCondition:()Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public int getHoldCount();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getHoldCount:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public boolean isHeldByCurrentThread();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.isHeldExclusively:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public boolean isLocked();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.isLocked:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public final boolean isFair();
descriptor: ()Z
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
instanceof java.util.concurrent.locks.ReentrantLock$FairSync
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
protected java.lang.Thread getOwner();
descriptor: ()Ljava/lang/Thread;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getOwner:()Ljava/lang/Thread;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public final boolean hasQueuedThreads();
descriptor: ()Z
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.hasQueuedThreads:()Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
public final boolean hasQueuedThread(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)Z
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
aload 1
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.isQueued:(Ljava/lang/Thread;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 1 1 thread Ljava/lang/Thread;
MethodParameters:
Name Flags
thread
public final int getQueueLength();
descriptor: ()I
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getQueueLength:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
protected java.util.Collection<java.lang.Thread> getQueuedThreads();
descriptor: ()Ljava/util/Collection;
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getQueuedThreads:()Ljava/util/Collection;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Ljava/util/concurrent/locks/ReentrantLock;
Signature: ()Ljava/util/Collection<Ljava/lang/Thread;>;
public boolean hasWaiters(java.util.concurrent.locks.Condition);
descriptor: (Ljava/util/concurrent/locks/Condition;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 1
instanceof java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
ifne 4
3: new java.lang.IllegalArgumentException
dup
ldc "not owner"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
aload 1
checkcast java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.hasWaiters:(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 5 1 condition Ljava/util/concurrent/locks/Condition;
MethodParameters:
Name Flags
condition
public int getWaitQueueLength(java.util.concurrent.locks.Condition);
descriptor: (Ljava/util/concurrent/locks/Condition;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 1
instanceof java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
ifne 4
3: new java.lang.IllegalArgumentException
dup
ldc "not owner"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
aload 1
checkcast java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getWaitQueueLength:(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 5 1 condition Ljava/util/concurrent/locks/Condition;
MethodParameters:
Name Flags
condition
protected java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.Condition);
descriptor: (Ljava/util/concurrent/locks/Condition;)Ljava/util/Collection;
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 1
instanceof java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
ifne 4
3: new java.lang.IllegalArgumentException
dup
ldc "not owner"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
aload 1
checkcast java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getWaitingThreads:(Ljava/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject;)Ljava/util/Collection;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Ljava/util/concurrent/locks/ReentrantLock;
0 5 1 condition Ljava/util/concurrent/locks/Condition;
Signature: (Ljava/util/concurrent/locks/Condition;)Ljava/util/Collection<Ljava/lang/Thread;>;
MethodParameters:
Name Flags
condition
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield java.util.concurrent.locks.ReentrantLock.sync:Ljava/util/concurrent/locks/ReentrantLock$Sync;
invokevirtual java.util.concurrent.locks.ReentrantLock$Sync.getOwner:()Ljava/lang/Thread;
astore 1
start local 1 1: new java.lang.StringBuilder
dup
aload 0
invokespecial java.lang.Object.toString:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
ifnonnull 3
2: ldc "[Unlocked]"
goto 4
3: StackMap locals: java.util.concurrent.locks.ReentrantLock java.lang.Thread
StackMap stack: java.lang.StringBuilder
new java.lang.StringBuilder
dup
ldc "[Locked by thread "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.Thread.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
StackMap locals: java.util.concurrent.locks.ReentrantLock java.lang.Thread
StackMap stack: java.lang.StringBuilder java.lang.String
4: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
5: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Ljava/util/concurrent/locks/ReentrantLock;
1 6 1 o Ljava/lang/Thread;
}
SourceFile: "ReentrantLock.java"
NestMembers:
java.util.concurrent.locks.ReentrantLock$FairSync java.util.concurrent.locks.ReentrantLock$NonfairSync java.util.concurrent.locks.ReentrantLock$Sync
InnerClasses:
public ConditionObject = java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject of java.util.concurrent.locks.AbstractQueuedSynchronizer
final FairSync = java.util.concurrent.locks.ReentrantLock$FairSync of java.util.concurrent.locks.ReentrantLock
final NonfairSync = java.util.concurrent.locks.ReentrantLock$NonfairSync of java.util.concurrent.locks.ReentrantLock
abstract Sync = java.util.concurrent.locks.ReentrantLock$Sync of java.util.concurrent.locks.ReentrantLock