org.apache.avro.specific
Class SpecificCompiler

java.lang.Object
  extended by org.apache.avro.specific.SpecificCompiler

public class SpecificCompiler
extends Object

Generate specific Java interfaces and classes for protocols and schemas. Java reserved keywords are mangled to preserve compilation.


Nested Class Summary
static class SpecificCompiler.SpecificCompilerTool
          Implementation of Tool for inclusion by the "avro-tools" runner.
 
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.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpecificCompiler

public SpecificCompiler(Protocol protocol)

SpecificCompiler

public SpecificCompiler(Schema schema)
Method Detail

compileProtocol

public static void compileProtocol(File src,
                                   File dest)
                            throws IOException
Generates Java interface and classes for a protocol.

Parameters:
src - the source Avro protocol file
dest - the directory to place generated files in
Throws:
IOException

compileSchema

public static void compileSchema(File src,
                                 File dest)
                          throws IOException
Generates Java classes for a schema.

Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2010 The Apache Software Foundation