| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ClassGeneratorImpl | defineClass(int modifiers, String name, Type superType, List<Type> impls)
Define a ClassGeneratorImpl for a class. |
| public static ClassGeneratorImpl | defineInterface(int modifiers, String name, List<Type> impls)
Define a ClassGeneratorImpl for an interface. |
| public static byte[] | generateBytecode(ClassGeneratorImpl cg, ClassLoader cl, ImportList imports, Properties options, PrintStream debugOutput)
Convert the Java class or interface defined by ClassGeneratorImpl into an array of bytecodes. |
| public static void | generateSourceCode(PrintStream ps, ClassGeneratorImpl cg, ImportList imports, Properties options)
Write a source code representation of the class or interface defined by cg to the PrintStream ps. |
| public static void | generateSourceCode(String sdir, ClassGeneratorImpl cg, ImportList imports, Properties options)
Write a source code representation of the class or interface defined by cg to a file in the SOURCE_GENERATION_DIRECTORY specified in options. |
| CodeGenerator | back to summary |
|---|---|
| private CodeGenerator() | |
| defineClass | back to summary |
|---|---|
| public static ClassGeneratorImpl defineClass(int modifiers, String name, Type superType, List<Type> impls) Define a ClassGeneratorImpl for a class. | |
| defineInterface | back to summary |
|---|---|
| public static ClassGeneratorImpl defineInterface(int modifiers, String name, List<Type> impls) Define a ClassGeneratorImpl for an interface. | |
| generateBytecode | back to summary |
|---|---|
| public static byte[] generateBytecode(ClassGeneratorImpl cg, ClassLoader cl, ImportList imports, Properties options, PrintStream debugOutput) Convert the Java class or interface defined by ClassGeneratorImpl into an array of bytecodes. | |
| generateSourceCode | back to summary |
|---|---|
| public static void generateSourceCode(PrintStream ps, ClassGeneratorImpl cg, ImportList imports, Properties options) throws IOException Write a source code representation of the class or interface defined by cg to the PrintStream ps. | |
| generateSourceCode | back to summary |
|---|---|
| public static void generateSourceCode(String sdir, ClassGeneratorImpl cg, ImportList imports, Properties options) throws IOException Write a source code representation of the class or interface defined by cg to a file in the SOURCE_GENERATION_DIRECTORY specified in options. | |