public final class Types
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getActionName(java.lang.Class<? extends Action> type)
Get action name by type
|
static java.lang.Class<? extends Action> |
getActionType(java.lang.String key)
Get token to deserialize action from menu file
|
static java.lang.Class<? extends Activator> |
getActivator(java.lang.String key)
Get token to deserialize activator from menu file
|
static java.lang.String |
getActivatorName(java.lang.Class<? extends Activator> type)
Get activator name by type
|
static java.lang.String |
getCatalogName(java.lang.Class<? extends Catalog> type)
Get catalog name by type
|
static java.lang.Class<? extends Catalog<?>> |
getCatalogType(java.lang.String key)
Get token to deserialize catalog from menu file
|
static java.lang.String |
getItemPropertyName(java.lang.Class<? extends ItemProperty> type)
Get item property name by type
|
static java.lang.Class<? extends ItemProperty> |
getItemPropertyType(java.lang.String key)
Get token to deserialize item property from menu file
|
static java.lang.String |
getRuleName(java.lang.Class<? extends Rule> type)
Get rule name by type
|
static java.lang.Class<? extends Rule> |
getRuleType(java.lang.String key)
Get token to deserialize rule from menu file
|
static <T extends Action> |
registerAction(java.lang.String key,
java.lang.Class<T> token,
NodeSerializer<T> serializer)
Register new action
|
static <T extends Activator> |
registerActivator(java.lang.String key,
java.lang.Class<T> token,
NodeSerializer<T> serializer)
Register new menu activator
|
static <T extends Catalog<?>> |
registerCatalog(java.lang.String key,
java.lang.Class<T> token,
NodeSerializer<T> serializer)
Register new catalog
|
static <T extends ItemProperty> |
registerItemProperty(java.lang.String key,
java.lang.Class<T> token,
NodeSerializer<T> serializer)
Register new item property
|
static <T extends Rule> |
registerRule(java.lang.String key,
java.lang.Class<T> token,
NodeSerializer<T> serializer)
Register new rule
|
static NodeSerializers |
serializers()
Global serializers collection
|
public static NodeSerializers serializers()
public static java.lang.String getActionName(java.lang.Class<? extends Action> type)
type
- Action typepublic static java.lang.String getRuleName(java.lang.Class<? extends Rule> type)
type
- Rule typepublic static java.lang.String getActivatorName(java.lang.Class<? extends Activator> type)
type
- Activator typepublic static java.lang.String getItemPropertyName(java.lang.Class<? extends ItemProperty> type)
type
- Item property typepublic static java.lang.String getCatalogName(java.lang.Class<? extends Catalog> type)
type
- Catalog typepublic static <T extends Action> void registerAction(java.lang.String key, java.lang.Class<T> token, NodeSerializer<T> serializer)
T
- Type of the actionkey
- Key of the action. This key uses in menu filetoken
- Type of the actionserializer
- Serializer of the actionpublic static java.lang.Class<? extends Action> getActionType(java.lang.String key)
key
- Action keypublic static <T extends Rule> void registerRule(java.lang.String key, java.lang.Class<T> token, NodeSerializer<T> serializer)
T
- Type of the rulekey
- Key of the rule. This key uses in menu filetoken
- Type of the ruleserializer
- Serializer of the rulepublic static java.lang.Class<? extends Rule> getRuleType(java.lang.String key)
key
- Rule keypublic static <T extends Activator> void registerActivator(java.lang.String key, java.lang.Class<T> token, NodeSerializer<T> serializer)
T
- Type of the activatorkey
- Key of the activator. This key uses in menu filetoken
- Type of the activatorserializer
- Serializer of the activatorpublic static java.lang.Class<? extends Activator> getActivator(java.lang.String key)
key
- Activator keypublic static <T extends ItemProperty> void registerItemProperty(java.lang.String key, java.lang.Class<T> token, NodeSerializer<T> serializer)
T
- Type of the propertykey
- Key of the property. This key uses in menu filetoken
- Type of the propertyserializer
- Serializer of the propertypublic static java.lang.Class<? extends ItemProperty> getItemPropertyType(java.lang.String key)
key
- Item property keypublic static <T extends Catalog<?>> void registerCatalog(java.lang.String key, java.lang.Class<T> token, NodeSerializer<T> serializer)
T
- Type of the catalogkey
- Key of the catalog. This key uses in menu filetoken
- Type of the catalogserializer
- Serializer of the catalogpublic static java.lang.Class<? extends Catalog<?>> getCatalogType(java.lang.String key)
key
- Catalog key