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 |
|
| AbstractYamlTypeSerializer(Class |
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:
Specified By:
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:
deserialize
public final T deserialize(AstNode node)
This explicitly overrides the top-level multi-format interface contract
Throws:
Specified By: