org.locomotive.module.codegen
Class CodeGenerator

java.lang.Object
  |
  +--org.locomotive.loco.handler.GenericHandler
        |
        +--org.locomotive.module.codegen.CodeGenerator

public class CodeGenerator
extends GenericHandler

CodeGenerator is a Java program which generates source code for other Java programs. It can take a class declaration from an HTML Form field, as a Handler, or it can take it from the standard input. The format of the class should look like:

 public class MyClass
 {
     int id;
     String str;
 }
 
The first field in the class is assumed to be the primary identifier -- in other words, its PRIMARY KEY in the database.


Fields inherited from class org.locomotive.loco.handler.GenericHandler
already_displayed_page, conn, DEBUG, ERROR, form_data, handler_uri, hd, NORMAL, session, steam_vars, url_tokens, user, WARNING
 
Constructor Summary
CodeGenerator()
           
 
Method Summary
 void handleRequest(HandlerData hd)
          initializes all the local variables.
static void main(java.lang.String[] argv)
           
protected  java.lang.String parseClassDefinition(java.lang.String class_definition)
           
 
Methods inherited from class org.locomotive.loco.handler.GenericHandler
displayPage, displayString, handleException, init, log, logEvent, sayBadURL, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeGenerator

public CodeGenerator()
Method Detail

handleRequest

public void handleRequest(HandlerData hd)
Description copied from class: GenericHandler
initializes all the local variables. Whenever you subclass a GenericHandler, be sure to call super.handleRequest(hd) in the first line of your handleRequest() method.
Overrides:
handleRequest in class GenericHandler

main

public static void main(java.lang.String[] argv)

parseClassDefinition

protected java.lang.String parseClassDefinition(java.lang.String class_definition)