Package io.netty.util
Class ConstantPool<T extends Constant<T>>
- java.lang.Object
-
- io.netty.util.ConstantPool<T>
-
-
Constructor Summary
Constructors Constructor Description ConstantPool()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanexists(java.lang.String name)protected abstract TnewConstant(int id, java.lang.String name)TnewInstance(java.lang.String name)intnextId()Deprecated.TvalueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)TvalueOf(java.lang.String name)Returns theConstantwhich is assigned to the specifiedname.
-
-
-
Method Detail
-
valueOf
public T valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)
-
valueOf
public T valueOf(java.lang.String name)
Returns theConstantwhich is assigned to the specifiedname. If there's no suchConstant, a new one will be created and returned. Once created, the subsequent calls with the samenamewill always return the previously created one (i.e. singleton.)- Parameters:
name- the name of theConstant
-
exists
public boolean exists(java.lang.String name)
-
newInstance
public T newInstance(java.lang.String name)
-
newConstant
protected abstract T newConstant(int id, java.lang.String name)
-
nextId
@Deprecated public final int nextId()
Deprecated.
-
-