Class DefaultArtifactAstDeserializer
java.lang.Object
org.mule.runtime.ast.internal.serialization.DefaultArtifactAstDeserializer
- All Implemented Interfaces:
ArtifactAstDeserializer
Default implementation of an ArtifactAstDeserializer. This deserializer reads the serialization metadata from an
InputStream that was generated by an ArtifactAstSerializer and with that
it delegates the deserialization to the correct implementation of an ArtifactAstDeserializer-
Constructor Summary
ConstructorsConstructorDescriptionDefaultArtifactAstDeserializer(boolean populateGenerationInformation) DefaultArtifactAstDeserializer(ArtifactAstSerializerFactory artifactAstSerializerFactory, ArtifactAstSerializerMetadataSerializer artifactAstSerializerMetadataSerializer) -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(InputStream artifactAstInputStream, ExtensionModelResolver extensionModelResolver) Given anInputStreamcreated by serializing anArtifactAstwith anArtifactAstSerializerand the associatedExtensionModels, this method deserializes it.deserialize(InputStream artifactAstInputStream, ExtensionModelResolver extensionModelResolver, ArtifactAst parent) Given anInputStreamcreated by serializing anArtifactAstwith anArtifactAstSerializerand the associatedExtensionModels, this method deserializes it.
-
Constructor Details
-
DefaultArtifactAstDeserializer
public DefaultArtifactAstDeserializer(boolean populateGenerationInformation) -
DefaultArtifactAstDeserializer
public DefaultArtifactAstDeserializer(ArtifactAstSerializerFactory artifactAstSerializerFactory, ArtifactAstSerializerMetadataSerializer artifactAstSerializerMetadataSerializer)
-
-
Method Details
-
deserialize
public ArtifactAst deserialize(InputStream artifactAstInputStream, ExtensionModelResolver extensionModelResolver) throws IllegalArgumentException, IOException Given anInputStreamcreated by serializing anArtifactAstwith anArtifactAstSerializerand the associatedExtensionModels, this method deserializes it.This method reads the metadata to determine the format in order to apply the corresponding implementation of
ArtifactAstDeserializer.- Specified by:
deserializein interfaceArtifactAstDeserializer- Parameters:
artifactAstInputStream- the input stream generated by anArtifactAstSerializerextensionModelResolver- anExtensionModelResolverinstance- Returns:
- The artifact
- Throws:
IllegalArgumentException- if this deserializer cannot deserialize this input streamIOException- if the input stream could not be read
-
deserialize
public ArtifactAst deserialize(InputStream artifactAstInputStream, ExtensionModelResolver extensionModelResolver, ArtifactAst parent) throws IllegalArgumentException, IOException Given anInputStreamcreated by serializing anArtifactAstwith anArtifactAstSerializerand the associatedExtensionModels, this method deserializes it.This method reads the metadata to determine the format in order to apply the corresponding implementation of
ArtifactAstDeserializer.- Specified by:
deserializein interfaceArtifactAstDeserializer- Parameters:
artifactAstInputStream- the input stream generated by anArtifactAstSerializerextensionModelResolver- anExtensionModelResolverinstanceparent- anArtifactAstto be set as the parent of the resulting deserializedArtifactAst- Returns:
- The artifact
- Throws:
IllegalArgumentException- if this deserializer cannot deserialize this input streamIOException- if the input stream could not be read
-