Package com.tnsai.output
Class AbstractOutputSerializer
java.lang.Object
com.tnsai.output.AbstractOutputSerializer
- All Implemented Interfaces:
OutputSerializer
- Direct Known Subclasses:
JsonOutputSerializer,TextOutputSerializer,TonlOutputSerializer,ToonOutputSerializer,YamlOutputSerializer
Abstract base class for output serializers.
Provides common utilities for field extraction and type handling.
-
Method Summary
Modifier and TypeMethodDescriptionGets the output format this serializer handles.booleansupportsType(Class<?> dataClass) Checks if this format supports the given data structure.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.output.OutputSerializer
deserialize, deserializeList, getFormatInstructions, getListFormatInstructions, serialize, serialize, serializeList, serializeList
-
Method Details
-
getFormat
Description copied from interface:OutputSerializerGets the output format this serializer handles.- Specified by:
getFormatin interfaceOutputSerializer- Returns:
- the output format
-
supportsType
Description copied from interface:OutputSerializerChecks if this format supports the given data structure. For example, CSV doesn't support nested objects.- Specified by:
supportsTypein interfaceOutputSerializer- Parameters:
dataClass- the data class to check- Returns:
- true if supported
-