T
- the type of the Attribute
which can be accessed via this AttributeKey
.public final class AttributeKey<T> extends AbstractConstant<AttributeKey<T>>
Attribute
out of the AttributeMap
. Be aware that it is not be
possible to have multiple keys with the same name.Modifier and Type | Field and Description |
---|---|
private static ConstantPool<AttributeKey<java.lang.Object>> |
pool |
Modifier | Constructor and Description |
---|---|
private |
AttributeKey(int id,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(java.lang.String name)
|
static <T> AttributeKey<T> |
newInstance(java.lang.String name)
Creates a new
AttributeKey for the given name or fail with an
IllegalArgumentException if a AttributeKey for the given name exists. |
static <T> AttributeKey<T> |
valueOf(java.lang.Class<?> firstNameComponent,
java.lang.String secondNameComponent) |
static <T> AttributeKey<T> |
valueOf(java.lang.String name)
Returns the singleton instance of the
AttributeKey which has the specified name . |
private static final ConstantPool<AttributeKey<java.lang.Object>> pool
public static <T> AttributeKey<T> valueOf(java.lang.String name)
AttributeKey
which has the specified name
.public static boolean exists(java.lang.String name)
public static <T> AttributeKey<T> newInstance(java.lang.String name)
AttributeKey
for the given name
or fail with an
IllegalArgumentException
if a AttributeKey
for the given name
exists.public static <T> AttributeKey<T> valueOf(java.lang.Class<?> firstNameComponent, java.lang.String secondNameComponent)