Package org.apache.avro
Class CanonicalSchemaFormatterFactory
java.lang.Object
org.apache.avro.CanonicalSchemaFormatterFactory
- All Implemented Interfaces:
SchemaFormatter,SchemaFormatterFactory
public class CanonicalSchemaFormatterFactory
extends Object
implements SchemaFormatterFactory, SchemaFormatter
Schema formatter factory that supports the "Parsing Canonical Form".
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWrite the specified schema as a String.Get the default formatter for this schema format.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.avro.SchemaFormatterFactory
formatName, getFormatterForVariant
-
Constructor Details
-
CanonicalSchemaFormatterFactory
public CanonicalSchemaFormatterFactory()
-
-
Method Details
-
getDefaultFormatter
Description copied from interface:SchemaFormatterFactoryGet the default formatter for this schema format. Instances should be thread-safe, as they may be cached.Implementations should either return the only formatter for this format, or call
SchemaFormatterFactory.getFormatterForVariant(String)with the default variant and implement that method as well.- Specified by:
getDefaultFormatterin interfaceSchemaFormatterFactory- Returns:
- the default formatter for this schema format
-
format
Description copied from interface:SchemaFormatterWrite the specified schema as a String.- Specified by:
formatin interfaceSchemaFormatter- Parameters:
schema- the schema to write- Returns:
- the formatted schema
-