Class ArtifactAstSerializerProvider
java.lang.Object
org.mule.runtime.ast.api.serialization.ArtifactAstSerializerProvider
This class provides serializers and deserializers instances for
ArtifactAsts.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ArtifactAstDeserializerThis method returns anArtifactAstDeserializerable to handle all formats known by theArtifactAstSerializerFactory.final ArtifactAstDeserializergetDeserializer(boolean populateGenerationInformation) This method returns anArtifactAstDeserializerable to handle all formats known by theArtifactAstSerializerFactory.final ArtifactAstSerializergetSerializer(String format) Deprecated.final ArtifactAstSerializergetSerializer(String format, String version) This method returns a serializer for a given desired output format.
-
Constructor Details
-
ArtifactAstSerializerProvider
public ArtifactAstSerializerProvider() -
ArtifactAstSerializerProvider
-
-
Method Details
-
getSerializer
@Deprecated public final ArtifactAstSerializer getSerializer(String format) throws IllegalArgumentException Deprecated.since 1.1, usegetSerializer(String, String)instead.This method returns a serializer for a given desired output format. The format is a string that identifies the serializer in theArtifactAstSerializerFactory. Valid values for format strings are defined as static constants inArtifactAstSerializerFactoryclass.A serializer instance returned by this provider may not be thread-safe so it should no be used for serializing many
ArtifactAsts at once.- Parameters:
format- the id of the serialization format, defined as constants inArtifactAstSerializerFactory- Returns:
- A serializer for the given format
- Throws:
IllegalArgumentException- if the specified format is null or if no matching serializer for the given format is found in theArtifactAstSerializerFactory
-
getSerializer
public final ArtifactAstSerializer getSerializer(String format, String version) throws IllegalArgumentException This method returns a serializer for a given desired output format. The format is a string that identifies the serializer in theArtifactAstSerializerFactory. Valid values for format strings are defined as static constants inArtifactAstSerializerFactoryclass.A serializer instance returned by this provider may not be thread-safe so it should no be used for serializing many
ArtifactAsts at once.- Parameters:
format- the id of the serialization format, defined as constants inArtifactAstSerializerFactoryversion- the desired serializer version- Returns:
- A serializer for the given format
- Throws:
IllegalArgumentException- if the specified format is null or if no matching serializer for the given format is found in theArtifactAstSerializerFactory- Since:
- 1.1
-
getDeserializer
This method returns anArtifactAstDeserializerable to handle all formats known by theArtifactAstSerializerFactory.A deserializer instance returned by this provider may not be thread-safe so it should no be used for deserializing many
ArtifactAsts at once.- Returns:
- an
ArtifactAstDeserializer
-
getDeserializer
This method returns anArtifactAstDeserializerable to handle all formats known by theArtifactAstSerializerFactory.A deserializer instance returned by this provider may not be thread-safe so it should no be used for deserializing many
ArtifactAsts at once.- Returns:
- an
ArtifactAstDeserializer
-
getSerializer(String, String)instead.