Skip to content

Package io.github.qishr.cascara.lang.yaml.processor

Class AbstractYamlTypeSerializer

java.lang.Object
        io.github.qishr.cascara.common.lang.type.AbstractTypeDescriptor
                io.github.qishr.cascara.lang.yaml.processor.AbstractYamlTypeSerializer

All Implemented Interfaces:
    TypeSerializer


public abstract class AbstractYamlTypeSerializer
extends AbstractTypeDescriptor

Constructor Summary

Constructor Description
AbstractYamlTypeSerializer(Class javaType)
AbstractYamlTypeSerializer(Class javaType, String schemaType)

Method Summary

Modifier and Type Method Description
public YamlNode serialize(T jvmInstance) Transforms a concrete Java object into its structural AST representation.
public T deserialize(YamlNode node) Deserializes an AST node into a strongly-typed Java object.
public final T deserialize(AstNode node) This explicitly overrides the top-level multi-format interface contract

Methods inherited from AbstractTypeDescriptor

getSchemaType, populateSchema, getServiceProperties, getJvmType

Method Details

serialize

public YamlNode serialize(T jvmInstance)

Transforms a concrete Java object into its structural AST representation.

Parameters:

jvmInstance - The live runtime object instance to serialize.

Returns:

The matching structural AstNode graph.

Throws:

SerializerException

Specified By:

TypeSerializer


deserialize

public T deserialize(YamlNode node)

Deserializes an AST node into a strongly-typed Java object.

Parameters:

node - The structural AST node being parsed (e.g., YamlScalarNode, YamlMap).

Returns:

The fully constructed Java object instance.

Throws:

SerializerException


deserialize

public final T deserialize(AstNode node)

This explicitly overrides the top-level multi-format interface contract

Throws:

SerializerException

Specified By:

TypeSerializer