Class ConstantPool<T extends Constant<T>>
java.lang.Object
io.netty.util.ConstantPool<T>
- Type Parameters:
T- the type of the constant
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate TcreateOrThrow(java.lang.String name) Creates constant by name or throws exception.booleanexists(java.lang.String name) private TgetOrCreate(java.lang.String name) Get existing constant by name or creates new one if not exists.protected abstract TnewConstant(int id, java.lang.String name) newInstance(java.lang.String name) final intnextId()Deprecated.valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent) valueOf(java.lang.String name) Returns theConstantwhich is assigned to the specifiedname.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
constants
-
nextId
private final java.util.concurrent.atomic.AtomicInteger nextId
-
-
Constructor Details
-
ConstantPool
public ConstantPool()
-
-
Method Details
-
valueOf
-
valueOf
-
getOrCreate
-
exists
public boolean exists(java.lang.String name) -
newInstance
-
createOrThrow
-
newConstant
-
nextId
@Deprecated public final int nextId()Deprecated.
-