|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jenesis4java.example.SimpleGenerator
public class SimpleGenerator
The SimpleGenerator
class creates getXXX()
,
setXXX()
, and member fields using the addMember()
method.
Constructor Summary | |
---|---|
SimpleGenerator()
Create a new SimpleGenerator . |
Method Summary | |
---|---|
void |
addMember(Type type,
String name)
Intermediate steps: Add a member to the class such that a member field, getter method, and setter method are defined for the member having the given name and type. |
void |
generate()
Final step: Generate the class. |
void |
initialize(String codebase,
String packageName,
String className)
Step 1: Internally setup the CompilationUnit and
PackageClass to be generated using the given
codebase , packageName , and
className . |
static void |
main(String[] argv)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleGenerator()
SimpleGenerator
.
Method Detail |
---|
public static void main(String[] argv) throws Exception
Exception
public void addMember(Type type, String name)
public void generate() throws Exception
CompilationUnit.encode()
Exception
public void initialize(String codebase, String packageName, String className) throws Exception
CompilationUnit
and
PackageClass
to be generated using the given
codebase
, packageName
, and
className
.
codebase
- - where the generated class should be written (for example
/tmp).packageName
- - the name of the package for the generated class (for example
com.example.util).className
- - the name of the generated class.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |