Class StereoinfoDeSer
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static StereoinfoDeSerSingleton instance with implementations ofdoPrintAsJson(IStereotypeReference, Optional)anddoDeserialize(JsonElement, IScope)to which the facade callsprintAsJson(IStereotypeReference, Optional),printAsJson(Map.Entry), anddeserialize(JsonElement, IScope)are delegated to.protected static final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map.Entry<IStereotypeReference, Optional<Value>> deserialize(JsonElement json, IScope enclosingScope) Facade to deserialize the information that a symbol has stereotype from a json object that also holds the associated stereovalue if present.protected Map.Entry<IStereotypeReference, Optional<Value>> doDeserialize(JsonElement json, IScope enclosingScope) protected StringdoPrintAsJson(IStereotypeReference stereotype, Optional<Value> value) protected static StereoinfoDeSerstatic StringprintAsJson(IStereotypeReference stereotype, Optional<Value> value) Facade to convert the information that a symbol has stereotype into a json object that also holds the associated stereovalue if present.static StringprintAsJson(Map.Entry<? extends IStereotypeReference, Optional<Value>> stereoinfo) Facade to convert the information that a symbol has stereotype into a json object that also holds the associated stereovalue if present.
-
Field Details
-
STEREO_TYPE
- See Also:
-
STEREO_VALUE
- See Also:
-
LOG_NAME
- See Also:
-
instance
Singleton instance with implementations ofdoPrintAsJson(IStereotypeReference, Optional)anddoDeserialize(JsonElement, IScope)to which the facade callsprintAsJson(IStereotypeReference, Optional),printAsJson(Map.Entry), anddeserialize(JsonElement, IScope)are delegated to.Set this field from a sub class to configure the behavior.
-
-
Constructor Details
-
StereoinfoDeSer
public StereoinfoDeSer()
-
-
Method Details
-
getInstance
-
printAsJson
public static String printAsJson(Map.Entry<? extends IStereotypeReference, Optional<Value>> stereoinfo) Facade to convert the information that a symbol has stereotype into a json object that also holds the associated stereovalue if present.See
StereoinfoDeSeron how to configure how this facade behaves. -
printAsJson
Facade to convert the information that a symbol has stereotype into a json object that also holds the associated stereovalue if present.See
StereoinfoDeSeron how to configure how this facade behaves. -
doPrintAsJson
-
deserialize
public static Map.Entry<IStereotypeReference,Optional<Value>> deserialize(JsonElement json, IScope enclosingScope) Facade to deserialize the information that a symbol has stereotype from a json object that also holds the associated stereovalue if present.See
StereoinfoDeSeron how to configure how this facade behaves. -
doDeserialize
protected Map.Entry<IStereotypeReference,Optional<Value>> doDeserialize(JsonElement json, IScope enclosingScope)
-