public class GoraCompiler
extends org.apache.avro.compiler.specific.SpecificCompiler
| Modifier and Type | Field and Description |
|---|---|
static String |
DIRTY_BYTES_FIELD_NAME |
static int |
FIRST_UNMANAGED_FIELD_INDEX |
| Modifier and Type | Method and Description |
|---|---|
static void |
compileSchema(File[] srcFiles,
File dest,
LicenseHeaders licenseHeader) |
static org.apache.avro.Schema |
compileSchema(String sourceSchema,
File dest,
String templatesPath)
Compiles a single schema.
|
static long |
fingerprint64(org.apache.avro.Schema schema)
Utility method used by velocity templates to generate serialVersionUID on AVRO beans.
|
static String |
generateAppropriateImmutabilityModifier(org.apache.avro.Schema schema) |
static String |
generateAppropriateValue(org.apache.avro.Schema.Field field) |
static String |
generateAppropriateWrapper(org.apache.avro.Schema schema,
org.apache.avro.Schema.Field field) |
static String |
generateAppropriateWrapperOrValue(org.apache.avro.Schema schema) |
static String |
generateAppropriateWrapperOrValueForPut(org.apache.avro.Schema schema) |
static String |
generateDefaultValueString(org.apache.avro.Schema schema,
String fieldName) |
static String |
generateDestinationFileName(String destDir,
org.apache.avro.Schema schema) |
static String |
generateDirtyMethod(org.apache.avro.Schema schema,
org.apache.avro.Schema.Field field) |
static boolean |
isNotHiddenField(String fieldName) |
static String |
toUpperCase(String s)
Recognizes camel case.
|
calcAllArgConstructorParameterUnits, compileProtocol, compileProtocol, compileSchema, compileSchema, compileToDestination, conversionInstance, deprecatedFields, escapeForJavadoc, generateClearMethod, generateGetBuilderMethod, generateGetMethod, generateHasBuilderMethod, generateHasMethod, generateSetBuilderMethod, generateSetMethod, hasBuilder, hasLogicalTypeField, isCreateAllArgsConstructor, isCreateSetters, isUnboxedJavaTypeNullable, javaAnnotations, javaEscape, javaSplit, javaType, javaUnbox, main, mangle, mangle, mangle, mangle, nullToEmpty, privateFields, publicFields, setCreateSetters, setEnableDecimalLogicalType, setFieldVisibility, setOutputCharacterEncoding, setStringType, setSuffix, setTemplateDir, validateRecordForCompilationpublic static final String DIRTY_BYTES_FIELD_NAME
public static final int FIRST_UNMANAGED_FIELD_INDEX
public static void compileSchema(File[] srcFiles, File dest, LicenseHeaders licenseHeader) throws IOException
IOExceptionpublic static org.apache.avro.Schema compileSchema(String sourceSchema, File dest, String templatesPath) throws IOException
sourceSchema - String with the schema definition in json (avro).dest - Path where .java classes will be written.templatesPath - Path where Gora's velocity templates are. If null, will use DEFAULT_TEMPLATES_PATH.IOException - If there's an issue with compiling to the destination.public static String generateAppropriateImmutabilityModifier(org.apache.avro.Schema schema)
public static String generateAppropriateWrapperOrValue(org.apache.avro.Schema schema)
public static String generateAppropriateWrapperOrValueForPut(org.apache.avro.Schema schema)
public static String generateAppropriateWrapper(org.apache.avro.Schema schema, org.apache.avro.Schema.Field field)
public static String generateAppropriateValue(org.apache.avro.Schema.Field field)
public static String toUpperCase(String s)
s - converts the given input string to camel case.public static String generateDirtyMethod(org.apache.avro.Schema schema, org.apache.avro.Schema.Field field)
public static String generateDefaultValueString(org.apache.avro.Schema schema, String fieldName)
public static boolean isNotHiddenField(String fieldName)
public static long fingerprint64(org.apache.avro.Schema schema)
schema - Data bean AVRO schema.Copyright © 2010-2019 The Apache Software Foundation. All Rights Reserved.