-
Notifications
You must be signed in to change notification settings - Fork 0
Home
roland sainty edited this page Jan 22, 2021
·
5 revisions
Package api
java.lang.Object
api.ApiStructuresExtractor
public class ApiStructuresExtractor
extends java.lang.Object
-
Constructors Constructor Description ApiStructuresExtractor(com.google.gson.JsonElement dictionary)Set a JsonElement as a dictionary and set an Index list , an Index Class list, an Index Enum list, an Asset list -
All MethodsStatic MethodsInstance MethodsConcrete Methods
Modifier and Type Method Description voidassetToString(java.lang.String assetToExtract)Extract the values of the API ASSET using a String ID without the prefix set as CONST.voidclassToString(java.lang.String classToExtract)Extract the parameters of a API Class using a String ID without the prefix set as CONST.static java.util.LinkedHashMap<java.lang.String,java.lang.String>clean(com.google.gson.JsonArray structure)Clean a jsonArray of VSC snippet's tagsstatic java.util.List<java.lang.String>cleanEnumTemplate(com.google.gson.JsonArray templates)Parse the Capital letter as VALUES of Enums.static voidconsoleDisplayLinkedMapToString(java.util.LinkedHashMap<java.lang.String,java.lang.String> parameters)Display in Console, line per line, each parameter and parmeter type contained in this map of parameters.java.util.LinkedList<java.lang.String>entryList()Provide a List Strings of structures NAMES corresponding to Class or Enum describe in the Json VSC Snippets file.voidenumToString(java.lang.String enumToExtract)Extract the values of an API ENUM using an id without the prefix, set as CONST.java.util.LinkedHashMap<java.lang.String,java.lang.String>extractClass(java.lang.String classToExtract)Extract a Class of the Api using a String ID whitout the prefix set as CONST.java.lang.StringextractParamDefaultValue(java.lang.String param)Extract the default Value from a String param Type that contain it.java.lang.StringextractParamType(java.lang.String param)Extract an expected parameter type from String param, first word of the String.com.google.gson.JsonArrayextractTemplates(java.lang.String templateToExtract)Extract a specific API Template contained in the Json VSC Snippets file.java.util.LinkedList<java.lang.String>getDictionaryAssetIndex()java.util.LinkedList<java.lang.String>getDictionaryClassIndex()java.util.LinkedList<java.lang.String>getDictionaryEnumIndex()java.util.List<java.lang.String>getDictionaryIndex()
-
-
public ApiStructuresExtractor(com.google.gson.JsonElement dictionary)Set a JsonElement as a dictionary and set an Index list , an Index Class list, an Index Enum list, an Asset list
- Parameters:
-
dictionary- A JsonElement result of a JsonParser.parseReader( Reader) to JsonObject
-
-
-
public static java.util.LinkedHashMap<java.lang.String,java.lang.String> clean(com.google.gson.JsonArray structure)Clean a jsonArray of VSC snippet's tags
- Parameters:
-
structure- JsonArray of parameter Set - Returns:
- LinkedHasMap (Parameter Label ; String Parameter Type and default Value)
-
public static void consoleDisplayLinkedMapToString(java.util.LinkedHashMap<java.lang.String,java.lang.String> parameters)Display in Console, line per line, each parameter and parmeter type contained in this map of parameters.
- Parameters:
-
parameters- a LinkedHashMap String, String of structure s parameters.
-
public static java.util.List<java.lang.String> cleanEnumTemplate(com.google.gson.JsonArray templates)Parse the Capital letter as VALUES of Enums. Enums do not have an equal char.So can be identify by a lenght of 1
- Parameters:
-
templates- JsonArray of JsonElement containing a code to parse - Returns:
- linkedList of String, the Enums Values
-
public java.util.LinkedList<java.lang.String> entryList()Provide a List Strings of structures NAMES corresponding to Class or Enum describe in the Json VSC Snippets file. Here the code compare this list to the Entry summary of a dictionary.
- Returns:
- a List Strings of the entry contained in the JsonElement dictionary
-
public com.google.gson.JsonArray extractTemplates(java.lang.String templateToExtract)Extract a specific API Template contained in the Json VSC Snippets file. Here the code compare this template as a definition in a dictionary
- Parameters:
-
templateToExtract- String template to extract - Returns:
- JsonArray extracted Template
-
public void classToString(java.lang.String classToExtract)Extract the parameters of a API Class using a String ID without the prefix set as CONST.
- Parameters:
-
classToExtract- a String Name, id of the class to display
-
public java.lang.String extractParamDefaultValue(java.lang.String param)Extract the default Value from a String param Type that contain it. ex: TEXTURE_WRAP (default: TEXTURE_WRAP.CLAMP) returns TEXTURE_WRAP.CLAMP
- Parameters:
-
param- String Param containing the default value. - Returns:
- String the default value.
-
public java.lang.String extractParamType(java.lang.String param)Extract an expected parameter type from String param, first word of the String.
- Parameters:
-
param- String Param containing the expected Type. - Returns:
- a String, expected parameter type.
-
public java.util.LinkedHashMap<java.lang.String,java.lang.String> extractClass(java.lang.String classToExtract)Extract a Class of the Api using a String ID whitout the prefix set as CONST.
- Parameters:
-
classToExtract- a String id of the Class to extract - Returns:
- a LinkedHashMap param, param type
-
public void enumToString(java.lang.String enumToExtract)Extract the values of an API ENUM using an id without the prefix, set as CONST.
- Parameters:
-
enumToExtract- a String, id of the Enum to display
-
public void assetToString(java.lang.String assetToExtract)Extract the values of the API ASSET using a String ID without the prefix set as CONST.
- Parameters:
-
assetToExtract- a String, id of the Asset to display
-
public java.util.List<java.lang.String> getDictionaryIndex()
-
public java.util.LinkedList<java.lang.String> getDictionaryClassIndex()
-
public java.util.LinkedList<java.lang.String> getDictionaryEnumIndex()
-
public java.util.LinkedList<java.lang.String> getDictionaryAssetIndex()
-