org.ephman.abra.tools
Class JavaClassGenerator

java.lang.Object
  |
  +--org.ephman.abra.tools.JavaClassGenerator
All Implemented Interfaces:
AbraTypes, ClassGenerator, Generator

public class JavaClassGenerator
extends java.lang.Object
implements ClassGenerator, AbraTypes

given a base output directory generate a class when given a JClass descriptor

Version:
0.0.2
Author:
Paul M. Bethe

Field Summary
static java.lang.String INIT_VIEW_NAME
           
 
Fields inherited from interface org.ephman.abra.tools.AbraTypes
BIG_DECIMAL, BIG_INTEGER, BLOB, BOOLEAN, BOOLEAN_OBJ, CHARACTER, CLOB, DOUBLE, DOUBLE_OBJ, FLOAT, INTEGER, INTEGER_OBJ, LONG, STRING, TIMESTAMP
 
Constructor Summary
JavaClassGenerator(java.lang.String outdir, char file_sep, java.lang.String toImp)
          make a new generator with a base directory of outdir so for foo.bar.FooBar if outdir = /home/dknull and file_sep = '/' then a class /home/dknull/foo/bar/FooBar.java is created
 
Method Summary
 void close()
          incase files need to be closed or whatever
 void generate(JClass currentClass)
           
 java.util.Map getTypeMap()
          listing of mappings from dave-knull types to the type names of that language
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_VIEW_NAME

public static java.lang.String INIT_VIEW_NAME
Constructor Detail

JavaClassGenerator

public JavaClassGenerator(java.lang.String outdir,
                          char file_sep,
                          java.lang.String toImp)
make a new generator with a base directory of outdir so for foo.bar.FooBar if outdir = /home/dknull and file_sep = '/' then a class /home/dknull/foo/bar/FooBar.java is created

Parameters:
outdir - the base directory for writing files
file_sep - the file seperator ('/' for unix/linux , '\\' for Windows)
Method Detail

close

public void close()
Description copied from interface: Generator
incase files need to be closed or whatever

Specified by:
close in interface Generator

generate

public void generate(JClass currentClass)
              throws java.io.IOException,
                     SchemaException
Specified by:
generate in interface Generator
java.io.IOException
SchemaException

getTypeMap

public java.util.Map getTypeMap()
Description copied from interface: ClassGenerator
listing of mappings from dave-knull types to the type names of that language

Specified by:
getTypeMap in interface ClassGenerator