|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.compiler.specific.SpecificCompiler
public class SpecificCompiler
Generate specific Java interfaces and classes for protocols and schemas. Java reserved keywords are mangled to preserve compilation.
Nested Class Summary | |
---|---|
static class |
SpecificCompiler.Slf4jLogChute
|
Constructor Summary | |
---|---|
SpecificCompiler(Protocol protocol)
|
|
SpecificCompiler(Schema schema)
|
Method Summary | |
---|---|
static void |
compileProtocol(File src,
File dest)
Generates Java interface and classes for a protocol. |
static void |
compileSchema(File src,
File dest)
Generates Java classes for a schema. |
void |
compileToDestination(File src,
File dst)
Generate output under dst, unless existing file is newer than src. |
static String |
escapeForJavadoc(String s)
Utility for template use. |
static String |
javaEscape(Object o)
Utility for template use. |
static String |
javaType(Schema schema)
Utility for template use. |
static String |
javaUnbox(Schema schema)
Utility for template use. |
static void |
main(String[] args)
|
static String |
mangle(String word)
Utility for template use. |
static String |
nullToEmpty(String x)
Utility for template use. |
void |
setTemplateDir(String templateDir)
Set the CLASSPATH resource directory where templates reside. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpecificCompiler(Protocol protocol)
public SpecificCompiler(Schema schema)
Method Detail |
---|
public void setTemplateDir(String templateDir)
public static void compileProtocol(File src, File dest) throws IOException
src
- the source Avro protocol filedest
- the directory to place generated files in
IOException
public static void compileSchema(File src, File dest) throws IOException
IOException
public void compileToDestination(File src, File dst) throws IOException
IOException
public static String javaType(Schema schema)
public static String javaUnbox(Schema schema)
public static String javaEscape(Object o)
public static String escapeForJavadoc(String s)
public static String nullToEmpty(String x)
public static String mangle(String word)
public static void main(String[] args) throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |