T - the specific MetadataTypepublic abstract class BaseTypeSerializer<T extends MetadataType> extends Object implements TypeSerializer<T>
TypeSerializers, knows how to write all the common parts of MetadataTypes such as
annotations, format, etc.| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doSerialize(com.google.gson.stream.JsonWriter writer,
T type,
Stack<MetadataType> typeStack) |
void |
serialize(com.google.gson.stream.JsonWriter writer,
T type,
Stack<MetadataType> typeStack)
Writes a
T MetadataType into a JsonWriter, a Stack is also passed to this method to track the
serialization process and handle recursive cases. |
protected void |
writeAnnotations(com.google.gson.stream.JsonWriter writer,
Collection<TypeAnnotation> annotations) |
protected void |
writeMetadataFormat(com.google.gson.stream.JsonWriter writer,
MetadataType type,
Stack<MetadataType> typeStack) |
protected final String typeName
public void serialize(com.google.gson.stream.JsonWriter writer,
T type,
Stack<MetadataType> typeStack)
TypeSerializerT MetadataType into a JsonWriter, a Stack is also passed to this method to track the
serialization process and handle recursive cases.serialize in interface TypeSerializer<T extends MetadataType>writer - the JsonWriter to write the type into.type - the MetadataType to be serializedtypeStack - a Stack with the serialization chain state.protected abstract void doSerialize(com.google.gson.stream.JsonWriter writer,
T type,
Stack<MetadataType> typeStack)
throws IOException
IOExceptionprotected void writeMetadataFormat(com.google.gson.stream.JsonWriter writer,
MetadataType type,
Stack<MetadataType> typeStack)
throws IOException
IOExceptionprotected void writeAnnotations(com.google.gson.stream.JsonWriter writer,
Collection<TypeAnnotation> annotations)
throws IOException
IOExceptionCopyright © 2022 MuleSoft, Inc.. All rights reserved.