Class JsonArtifactAstDeserializer
java.lang.Object
org.mule.runtime.ast.internal.serialization.json.JsonArtifactAstDeserializer
- All Implemented Interfaces:
ArtifactAstDeserializer,InternalArtifactAstDeserializer
Json implementation of an
InternalArtifactAstDeserializer. This deserializer assumes the InputStream has no
header as it should have been consumed by the
DefaultArtifactAstDeserializer in order to decide to dispatch it here.-
Constructor Summary
ConstructorsConstructorDescriptionJsonArtifactAstDeserializer(com.google.gson.GsonBuilder gsonBuilder, String version, boolean populateGenerationInformation) This constructor allows aGsonBuilderparameter. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(InputStream artifactAstInputStream, Charset charset, ExtensionModelResolver extensionModelResolver, ArtifactAst parent) This method takes an input stream of a serializedArtifactAstwith no metadata header and deserializes and enriches it.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mule.runtime.ast.internal.serialization.InternalArtifactAstDeserializer
deserialize, deserialize
-
Constructor Details
-
JsonArtifactAstDeserializer
public JsonArtifactAstDeserializer(com.google.gson.GsonBuilder gsonBuilder, String version, boolean populateGenerationInformation) This constructor allows aGsonBuilderparameter.- Parameters:
gsonBuilder- aGsonBuilderto use as a starting point.version- the version this deserializer must adhere to.populateGenerationInformation- Whether to populate theComponentGenerationInformation.
-
-
Method Details
-
deserialize
public ArtifactAst deserialize(InputStream artifactAstInputStream, Charset charset, ExtensionModelResolver extensionModelResolver, ArtifactAst parent) This method takes an input stream of a serializedArtifactAstwith no metadata header and deserializes and enriches it.- Specified by:
deserializein interfaceInternalArtifactAstDeserializer- Parameters:
artifactAstInputStream- the input stream generated by an ArtifactAstSerializer. Max allowed size = bytesextensionModelResolver- an instance ofExtensionModelResolver- Returns:
- The deserialized
ArtifactAst
-