public class DynamicCommandMetadata
DynamicCommandMetadata is a simple POJO for extracting commands which are user-definable and generated at run-time from a user-defined JSON. This class concerns with the population of those JSON objects onto more accessible formats for easier internal handling.
Inherited Members
Static Methods
fromJSON(JSONObject jsonObject)
public static List<DynamicCommandMetadata> fromJSON(JSONObject jsonObject)
Takes a JSON object and returns a list of metadata objects holding the desired information.
Parameter | |
---|---|
Name | Description |
jsonObject | org.json.simple.JSONObject Input JSON object in the format {"commands": [{"input_pattern": "", "output_pattern": "", "matcher_array": [number1, ...]}, ...]} |
Returns | |
---|---|
Type | Description |
List<DynamicCommandMetadata> | A list of constructed metadata objects in the format understood by DynamicCommands |
Methods
getInputPattern()
public String getInputPattern()
Returns | |
---|---|
Type | Description |
String |
getMatcherOrder()
public List<String> getMatcherOrder()
getOutputPattern()
public String getOutputPattern()
Returns | |
---|---|
Type | Description |
String |