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 |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
CodeGenerator
public CodeGenerator()
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)