Class ArtifactAstSerializerFactory
java.lang.Object
org.mule.runtime.ast.internal.serialization.ArtifactAstSerializerFactory
The serializer factory can create a
ArtifactAstSerializer or a ArtifactAstDeserializer instance in the
available ids/formats-
Constructor Summary
ConstructorsConstructorDescriptionArtifactAstSerializerFactory(Executor executor, boolean populateGenerationInformation) -
Method Summary
Modifier and TypeMethodDescriptionAll available serializer formats and versions.getDeserializer(String formatId, String serializerVersion) This method creates a new instance o anArtifactAstDeserializermatching the format and serializerVersion parametersgetSerializer(String formatId, String serializerVersion) This method creates a new instance of anArtifactAstSerializermatching the format parameter
-
Constructor Details
-
ArtifactAstSerializerFactory
public ArtifactAstSerializerFactory() -
ArtifactAstSerializerFactory
-
-
Method Details
-
getSerializer
public ArtifactAstSerializer getSerializer(String formatId, String serializerVersion) throws IllegalArgumentException This method creates a new instance of anArtifactAstSerializermatching the format parameter- Parameters:
formatId- the format in which the requested serializer serializes theArtifactAstserializerVersion- the desired serializer version- Returns:
- An
ArtifactAstSerializermatching the format - Throws:
IllegalArgumentException- if noArtifactAstSerializermatching the format is found
-
getDeserializer
public InternalArtifactAstDeserializer getDeserializer(String formatId, String serializerVersion) throws IllegalArgumentException This method creates a new instance o anArtifactAstDeserializermatching the format and serializerVersion parameters- Parameters:
formatId- the format which the requested deserializer should be able to deserialize in order to generate theArtifactAstserializerVersion- the desired version of the deserializer- Returns:
- An
ArtifactAstDeserializermatching the format - Throws:
IllegalArgumentException- if noArtifactAstDeserializermatching the format is found
-
getAvailableSerializers
All available serializer formats and versions. An available serializer format should be resolved by thegetSerializer(String, String)andgetDeserializer(String, String)methods.- Returns:
- a list of serializer formats and versions like:
"<formatId>[<version>]", e.g.:"json[1.0]".
-