public class TagRegistry extends Object
| Constructor and Description |
|---|
TagRegistry() |
| Modifier and Type | Method and Description |
|---|---|
static Tag |
createInstance(int id,
String tagName)
Creates an instance of the tag with the given id, using the String constructor.
|
static Class<? extends Tag> |
getClassFor(int id)
Gets the tag class with the given id.
|
static int |
getIdFor(Class<? extends Tag> clazz)
Gets the id of the given tag class.
|
static void |
register(int id,
Class<? extends Tag> tag)
Registers a tag class.
|
static void |
unregister(int id)
Unregisters a tag class.
|
public static void register(int id,
Class<? extends Tag> tag)
throws TagRegisterException
id - ID of the tag.tag - Tag class to register.TagRegisterException - If an error occurs while registering the tag.public static void unregister(int id)
id - ID of the tag to unregister.public static Class<? extends Tag> getClassFor(int id)
id - Id of the tag.public static int getIdFor(Class<? extends Tag> clazz)
clazz - The tag class to get the id of.public static Tag createInstance(int id, String tagName) throws TagCreateException
id - Id of the tag.tagName - Name to give the tag.TagCreateException - If an error occurs while creating the tag.Copyright © 2021. All rights reserved.