| java.lang.Object biz.hammurapi.codegen.ClassGeneratorBase
All known Subclasses: biz.hammurapi.codegen.Class, biz.hammurapi.codegen.Interface,
ClassGeneratorBase | public class ClassGeneratorBase (Code) | | author: Pavel Vlasov version: $Revision: 1.9 $ |
Inner Class :protected class FieldDescriptor | |
Method Summary | |
public void | addField(String declaration, String description, Properties attributes) | public void | addStaticInitializer(InstructionList instructionList, Collection exceptionHandlers, String description) | protected boolean | checkMethod(Object signature, String returnType, Collection throwsList) | public InstructionList | cloneInstructions(java.lang.Class clazz, String signature) Copies instructions of existing method.
Parameters: clazz - Parameters: signature - E.g. | public static String | concat(String packageName, String className) | public FieldInstruction | createGetField(String fieldName) | public InvokeInstruction | createInvoke(String signature, Collection parameters, short type) Creates invoke instruction for the method in the current class. | public InvokeInstruction | createInvoke(String className, String signature, Collection parameters, short type) Creates invoke instruction for the method in the current class.
Parameters: signature - E.g. | public FieldInstruction | createPutField(String fieldName) | protected static AST | field(String definition) | public ClassGen | getClassGen() | public InstructionFactory | getInstructionFactory() | public JavaClass | getJavaClass() | public static Method | getMethod(java.lang.Class clazz, String signature) | public boolean | hasField(String name) | protected static AST | invocation(String definition) | public static Type | java2BcelType(String type) | public static short | modifiers(Collection modifiers) | public static void | printMethod(java.lang.Class clazz, String signature) | public static void | printMethod(Method method) | public void | save(File dir) | protected static void | showField(String field) | protected static void | showInvocation(String invocation) | protected static void | showTypeDefinition(String typeDefinition) | protected static String | toString(AST ast) | protected static AST | typeDefinition(String definition) | public static Collection | verify(Collection javaClasses, ClassLoader classLoader) Verifies collection of classes and returns colleciton of error messages. |
checkMethod | protected boolean checkMethod(Object signature, String returnType, Collection throwsList) throws GenerationException(Code) | | Parameters: signature - Method signature Parameters: rtthc - Method return type and throws true - method shall be added throws: GenerationException - If method exists, but return type or throws are different |
createGetField | public FieldInstruction createGetField(String fieldName)(Code) | | This method shall be used only with fields added through addField()
Parameters: fieldName - |
createPutField | public FieldInstruction createPutField(String fieldName)(Code) | | This method shall be used only with fields added through addField()
Parameters: fieldName - |
getClassGen | public ClassGen getClassGen()(Code) | | |
getInstructionFactory | public InstructionFactory getInstructionFactory()(Code) | | |
java2BcelType | public static Type java2BcelType(String type)(Code) | | Parameters: type - |
printMethod | public static void printMethod(Method method)(Code) | | Parameters: methods - Parameters: i - |
|
|