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
-
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, wait
Methods inherited from interface org.apache.avro.SchemaFormatterFactory
formatName, getFormatterForVariant
-
Constructor Details
-
CanonicalSchemaFormatterFactory
public CanonicalSchemaFormatterFactory()
-
-
Method Details
-
getDefaultFormatter
Description copied from interface:SchemaFormatterFactory
Get 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:
getDefaultFormatter
in interfaceSchemaFormatterFactory
- Returns:
- the default formatter for this schema format
-
format
Description copied from interface:SchemaFormatter
Write the specified schema as a String.- Specified by:
format
in interfaceSchemaFormatter
- Parameters:
schema
- the schema to write- Returns:
- the formatted schema
-