|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.dynamic.codegen.impl.CodeGenerator
public final class CodeGenerator
Class used to define classes and interfaces, and to generator source or byte code from the resulting definitions. This is the factory for the codegen framework.
| Method Summary | |
|---|---|
static ClassGeneratorImpl |
defineClass(int modifiers,
String name,
Type superType,
List<Type> impls)
Define a ClassGeneratorImpl for a class. |
static ClassGeneratorImpl |
defineInterface(int modifiers,
String name,
List<Type> impls)
Define a ClassGeneratorImpl for an interface. |
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. |
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. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ClassGeneratorImpl defineClass(int modifiers,
String name,
Type superType,
List<Type> impls)
public static ClassGeneratorImpl defineInterface(int modifiers,
String name,
List<Type> impls)
public static byte[] generateBytecode(ClassGeneratorImpl cg,
ClassLoader cl,
ImportList imports,
Properties options,
PrintStream debugOutput)
public static void generateSourceCode(PrintStream ps,
ClassGeneratorImpl cg,
ImportList imports,
Properties options)
throws IOException
IOException
public static void generateSourceCode(String sdir,
ClassGeneratorImpl cg,
ImportList imports,
Properties options)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||