Class StereoinfoDeSer

java.lang.Object
de.monticore.symboltable.stereotypes.StereoinfoDeSer

public class StereoinfoDeSer extends Object
Facade to serialize and deserialize stereoinfos of symbols.

I.e., the de-/serialization is based on / results in a json object with the info about a stereotype that a symbol has. If the symbol has. If there is a corresponding stereovalue for the stereotype, it is also de-/serialized.

The facade consists of printAsJson(IStereotypeReference, Optional), printAsJson(Map.Entry), and deserialize(JsonElement, IScope). Custom de-/serialization behavior can be achieved by initializing the singleton within this class with a sub class that overwrites doPrintAsJson(IStereotypeReference, Optional) and doDeserialize(JsonElement, IScope).

Note that deserialization is not supported out of the box. Initialize this facade with a StereofinoDeSer with such support. Languages that provide stereotype symbols (implementations of IStereotypeSymbol) should also provide such a DeSerializer.