| 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 or fail with an
IllegalArgumentException if a Constant for the given exists. |
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 or fail with an
IllegalArgumentException if a Constant for the given exists.Copyright © 2008–2015 The Netty Project. All rights reserved.