Class JsonDeSers
java.lang.Object
de.monticore.symboltable.serialization.JsonDeSers
Collection of (static) methods and constants that support using DeSers in combination with Json.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckCorrectDeSerForKind(String deSerKind, JsonElement serializedElement) This method checks, if a passed JsonElement is a Json object of a certain passed kind.static StringgetKind(JsonObject symbol) getKindOpt(JsonObject symbol) static StringgetPackage(JsonObject scopeJson) This method deserializes a stored package.static StringgetSymbolFilePath(String symbolPath, String modelName, String modelFileExtension) static StringgetSymbolFilePath(String symbolPath, String packagePath, String modelName, String modelFileExtension) static List<JsonObject> getSymbols(JsonObject scopeJson) This method returns a list of JsonObjects from a passed serialized scope.
-
Field Details
-
PACKAGE
- See Also:
-
IS_SHADOWING_SCOPE
- See Also:
-
NAME
- See Also:
-
KIND
- See Also:
-
FULL_NAME
- See Also:
-
PACKAGE_NAME
- See Also:
-
SYMBOLS
- See Also:
-
SPANNED_SCOPE
- See Also:
-
STEREO_INFO
- See Also:
-
-
Constructor Details
-
JsonDeSers
public JsonDeSers()
-
-
Method Details
-
getPackage
This method deserializes a stored package. If no package is stored, the default empty package ("") is returned.- Parameters:
scopeJson-- Returns:
-
getSymbols
This method returns a list of JsonObjects from a passed serialized scope.- Parameters:
scopeJson-- Returns:
-
getKind
-
getKindOpt
-
checkCorrectDeSerForKind
This method checks, if a passed JsonElement is a Json object of a certain passed kind. It is useful to check, whether a DeSer that can deserialize the passed deSerSymbolKind is capable of deserializing the passed serializedElement.- Parameters:
deSerKind-serializedElement-
-
getSymbolFilePath
-
getSymbolFilePath
-