org.schemarepo.api.converter
Class AvroSchemaConverter
java.lang.Object
org.schemarepo.api.converter.AvroSchemaConverter
- All Implemented Interfaces:
- Converter<org.apache.avro.Schema>
public class AvroSchemaConverter
- extends Object
- implements Converter<org.apache.avro.Schema>
This converter can be used for handling Avro schemas.
|
Method Summary |
org.apache.avro.Schema |
fromString(String literal)
Given a String literal, provide a strongly-typed instance. |
String |
toString(org.apache.avro.Schema strongType)
Given a strongly-typed instance, provide its String literal representation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroSchemaConverter
public AvroSchemaConverter()
AvroSchemaConverter
public AvroSchemaConverter(Boolean prettyPrint)
fromString
public org.apache.avro.Schema fromString(String literal)
- Given a String literal, provide a strongly-typed instance.
- Specified by:
fromString in interface Converter<org.apache.avro.Schema>
- Parameters:
literal - to be converted
- Returns:
- the requested TYPE
toString
public String toString(org.apache.avro.Schema strongType)
- Given a strongly-typed instance, provide its String literal representation.
- Specified by:
toString in interface Converter<org.apache.avro.Schema>
- Parameters:
strongType - instance to be converted
- Returns:
- the String literal representation
Copyright © 2015. All rights reserved.