| Constructor and Description | 
|---|
ConstantPool()  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
exists(String name)
 | 
protected abstract T | 
newConstant(int id,
           String name)  | 
T | 
newInstance(String name)
Creates a new  
Constant for the given name or fail with an
 IllegalArgumentException if a Constant for the given name exists. | 
int | 
nextId()
Deprecated.  
 | 
T | 
valueOf(Class<?> firstNameComponent,
       String secondNameComponent)
 | 
T | 
valueOf(String name)
Returns the  
Constant which is assigned to the specified name. | 
public T valueOf(String name)
Constant which is assigned to the specified name.
 If there's no such Constant, a new one will be created and returned.
 Once created, the subsequent calls with the same name will always return the previously created one
 (i.e. singleton.)name - the name of the Constantpublic boolean exists(String name)
public T newInstance(String name)
Constant for the given name or fail with an
 IllegalArgumentException if a Constant for the given name exists.@Deprecated public final int nextId()
Copyright © 2008–2025 The Netty Project. All rights reserved.