public abstract class io.netty.util.ConstantPool<T extends io.netty.util.Constant<T>>
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: io.netty.util.ConstantPool
super_class: java.lang.Object
{
private final java.util.concurrent.ConcurrentMap<java.lang.String, T> constants;
descriptor: Ljava/util/concurrent/ConcurrentMap;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ConcurrentMap<Ljava/lang/String;TT;>;
private final java.util.concurrent.atomic.AtomicInteger nextId;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic io.netty.util.internal.PlatformDependent.newConcurrentHashMap:()Ljava/util/concurrent/ConcurrentMap;
putfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
2: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
iconst_1
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:(I)V
putfield io.netty.util.ConstantPool.nextId:Ljava/util/concurrent/atomic/AtomicInteger;
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/netty/util/ConstantPool<TT;>;
public T valueOf(java.lang.Class<?>, java.lang.String);
descriptor: (Ljava/lang/Class;Ljava/lang/String;)Lio/netty/util/Constant;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnonnull 2
1: new java.lang.NullPointerException
dup
ldc "firstNameComponent"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 2
ifnonnull 4
3: new java.lang.NullPointerException
dup
ldc "secondNameComponent"
invokespecial java.lang.NullPointerException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
new java.lang.StringBuilder
dup
aload 1
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
bipush 35
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual io.netty.util.ConstantPool.valueOf:(Ljava/lang/String;)Lio/netty/util/Constant;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/netty/util/ConstantPool<TT;>;
0 5 1 firstNameComponent Ljava/lang/Class<*>;
0 5 2 secondNameComponent Ljava/lang/String;
Signature: (Ljava/lang/Class<*>;Ljava/lang/String;)TT;
MethodParameters:
Name Flags
firstNameComponent
secondNameComponent
public T valueOf(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/netty/util/Constant;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic io.netty.util.ConstantPool.checkNotNullAndNotEmpty:(Ljava/lang/String;)Ljava/lang/String;
pop
1: aload 0
aload 1
invokevirtual io.netty.util.ConstantPool.getOrCreate:(Ljava/lang/String;)Lio/netty/util/Constant;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/util/ConstantPool<TT;>;
0 2 1 name Ljava/lang/String;
Signature: (Ljava/lang/String;)TT;
MethodParameters:
Name Flags
name
private T getOrCreate(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/netty/util/Constant;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.netty.util.Constant
astore 2
start local 2 1: aload 2
ifnonnull 6
2: aload 0
aload 0
invokevirtual io.netty.util.ConstantPool.nextId:()I
aload 1
invokevirtual io.netty.util.ConstantPool.newConstant:(ILjava/lang/String;)Lio/netty/util/Constant;
astore 3
start local 3 3: aload 0
getfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
aload 1
aload 3
invokeinterface java.util.concurrent.ConcurrentMap.putIfAbsent:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.netty.util.Constant
astore 2
4: aload 2
ifnonnull 6
5: aload 3
areturn
end local 3 6: StackMap locals: io.netty.util.Constant
StackMap stack:
aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lio/netty/util/ConstantPool<TT;>;
0 7 1 name Ljava/lang/String;
1 7 2 constant TT;
3 6 3 tempConstant TT;
Signature: (Ljava/lang/String;)TT;
MethodParameters:
Name Flags
name
public boolean exists(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic io.netty.util.ConstantPool.checkNotNullAndNotEmpty:(Ljava/lang/String;)Ljava/lang/String;
pop
1: aload 0
getfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.containsKey:(Ljava/lang/Object;)Z
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/util/ConstantPool<TT;>;
0 2 1 name Ljava/lang/String;
MethodParameters:
Name Flags
name
public T newInstance(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/netty/util/Constant;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokestatic io.netty.util.ConstantPool.checkNotNullAndNotEmpty:(Ljava/lang/String;)Ljava/lang/String;
pop
1: aload 0
aload 1
invokevirtual io.netty.util.ConstantPool.createOrThrow:(Ljava/lang/String;)Lio/netty/util/Constant;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/netty/util/ConstantPool<TT;>;
0 2 1 name Ljava/lang/String;
Signature: (Ljava/lang/String;)TT;
MethodParameters:
Name Flags
name
private T createOrThrow(java.lang.String);
descriptor: (Ljava/lang/String;)Lio/netty/util/Constant;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
aload 1
invokeinterface java.util.concurrent.ConcurrentMap.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.netty.util.Constant
astore 2
start local 2 1: aload 2
ifnonnull 6
2: aload 0
aload 0
invokevirtual io.netty.util.ConstantPool.nextId:()I
aload 1
invokevirtual io.netty.util.ConstantPool.newConstant:(ILjava/lang/String;)Lio/netty/util/Constant;
astore 3
start local 3 3: aload 0
getfield io.netty.util.ConstantPool.constants:Ljava/util/concurrent/ConcurrentMap;
aload 1
aload 3
invokeinterface java.util.concurrent.ConcurrentMap.putIfAbsent:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
checkcast io.netty.util.Constant
astore 2
4: aload 2
ifnonnull 6
5: aload 3
areturn
end local 3 6: StackMap locals: io.netty.util.Constant
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "'%s' is already in use"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lio/netty/util/ConstantPool<TT;>;
0 7 1 name Ljava/lang/String;
1 7 2 constant TT;
3 6 3 tempConstant TT;
Signature: (Ljava/lang/String;)TT;
MethodParameters:
Name Flags
name
private static java.lang.String checkNotNullAndNotEmpty(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/lang/String;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc "name"
invokestatic io.netty.util.internal.ObjectUtil.checkNotNull:(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
pop
1: aload 0
invokevirtual java.lang.String.isEmpty:()Z
ifeq 3
2: new java.lang.IllegalArgumentException
dup
ldc "empty name"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 name Ljava/lang/String;
MethodParameters:
Name Flags
name
protected abstract T newConstant(int, java.lang.String);
descriptor: (ILjava/lang/String;)Lio/netty/util/Constant;
flags: (0x0404) ACC_PROTECTED, ACC_ABSTRACT
Signature: (ILjava/lang/String;)TT;
MethodParameters:
Name Flags
id
name
public final int nextId();
descriptor: ()I
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.netty.util.ConstantPool.nextId:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndIncrement:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/netty/util/ConstantPool<TT;>;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
}
Signature: <T::Lio/netty/util/Constant<TT;>;>Ljava/lang/Object;
SourceFile: "ConstantPool.java"