Package org.apache.avro
Class JsonSchemaFormatterFactory
java.lang.Object
org.apache.avro.JsonSchemaFormatterFactory
- All Implemented Interfaces:
SchemaFormatterFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the default formatter for this schema format.getFormatterForVariant(String variantName) Get a formatter for the specified schema format variant, if multiple variants are supported.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
-
Field Details
-
VARIANT_NAME_PRETTY
- See Also:
-
VARIANT_NAME_INLINE
- See Also:
-
-
Constructor Details
-
JsonSchemaFormatterFactory
public JsonSchemaFormatterFactory()
-
-
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
-
getFormatterForVariant
Description copied from interface:SchemaFormatterFactoryGet a formatter for the specified schema format variant, if multiple variants are supported. Instances should be thread-safe, as they may be cached.- Specified by:
getFormatterForVariantin interfaceSchemaFormatterFactory- Parameters:
variantName- the name of the format variant (lower case), if specified- Returns:
- if the factory supports the format, a schema writer;
nullotherwise
-