Public Methods | |
ClassGen (JavaClass clazz) | |
ClassGen (String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces) | |
void | addAttribute (Attribute a) |
void | addEmptyConstructor (int access_flags) |
void | addField (Field f) |
void | addInterface (int i) |
void | addInterface (String i) |
void | addMethod (Method m) |
boolean | containsField (Field f) |
Field | containsField (String name) |
Method | containsMethod (String name, String signature) |
Attribute[] | getAttributes () |
String | getClassName () |
int | getClassNameIndex () |
ConstantPoolGen | getConstantPool () |
Field[] | getFields () |
String | getFileName () |
int[] | getInterfaces () |
JavaClass | getJavaClass () |
Method[] | getMethods () |
String | getSuperclassName () |
int | getSuperclassNameIndex () |
void | removeAttribute (Attribute a) |
void | removeField (Field f) |
void | removeInterface (int i) |
void | removeMethod (Method m) |
void | setClassNameIndex (int class_name_index) |
void | setConstantPool (ConstantPoolGen constant_pool) |
void | setMethods (Method[] methods) |
void | setSuperclassNameIndex (int superclass_name_index) |
ClassGen (JavaClass clazz) | |
ClassGen (String class_name, String super_class_name, String file_name, int access_flags, String[] interfaces) | |
void | addAttribute (Attribute a) |
void | addEmptyConstructor (int access_flags) |
void | addField (Field f) |
void | addInterface (String name) |
void | addMethod (Method m) |
void | addObserver (ClassObserver o) |
Object | clone () |
boolean | containsField (Field f) |
Field | containsField (String name) |
Method | containsMethod (String name, String signature) |
Attribute[] | getAttributes () |
String | getClassName () |
int | getClassNameIndex () |
ConstantPoolGen | getConstantPool () |
Field[] | getFields () |
String | getFileName () |
String[] | getInterfaceNames () |
int[] | getInterfaces () |
JavaClass | getJavaClass () |
int | getMajor () |
Method | getMethodAt (int pos) |
Method[] | getMethods () |
int | getMinor () |
String | getSuperclassName () |
int | getSuperclassNameIndex () |
void | removeAttribute (Attribute a) |
void | removeField (Field f) |
void | removeInterface (String name) |
void | removeMethod (Method m) |
void | removeObserver (ClassObserver o) |
void | replaceField (Field old, Field new_) |
void | replaceMethod (Method old, Method new_) |
void | setClassName (String name) |
void | setClassNameIndex (int class_name_index) |
void | setConstantPool (ConstantPoolGen constant_pool) |
void | setMajor (int major) |
void | setMethodAt (Method method, int pos) |
void | setMethods (Method[] methods) |
void | setMinor (int minor) |
void | setSuperclassName (String name) |
void | setSuperclassNameIndex (int superclass_name_index) |
void | update () |
Private Attributes | |
String | class_name |
String | super_class_name |
String | file_name |
int | class_name_index = -1 |
int | superclass_name_index = -1 |
ConstantPoolGen | cp |
Vector | field_vec = new Vector() |
Vector | method_vec = new Vector() |
Vector | attribute_vec = new Vector() |
Vector | interface_vec = new Vector() |
int | major = Constants.MAJOR_1_1 |
int | minor = Constants.MINOR_1_1 |
Vector | observers |
Definition at line 15 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java.
|
Initialize with existing class.
Definition at line 39 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 72 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Initialize with existing class.
Definition at line 37 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Convenience constructor to set up some important values initially.
Definition at line 73 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Add an attribute to this class.
Definition at line 95 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Add an attribute to this class.
Definition at line 94 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Convenience method. Add an empty constructor to this class that does nothing but calling super().
Definition at line 102 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Convenience method. Add an empty constructor to this class that does nothing but calling super().
Definition at line 101 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Add a field to this class.
Definition at line 118 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Add a field to this class.
Definition at line 117 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Add an interface to this class, i.e., this class has to implement it.
Definition at line 123 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Add an interface to this class, i.e. this class has to implement it.
Definition at line 129 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Add an interface to this class, i.e. this class has to implement it.
Definition at line 122 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Add a method to this class.
Definition at line 130 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Add a method to this class.
Definition at line 136 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Add observer for this object. Definition at line 133 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 150 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 161 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 203 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 182 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 219 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Definition at line 231 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Remove an attribute from this class.
Definition at line 238 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Remove an attribute from this class.
Definition at line 199 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Remove a field to this class.
Definition at line 243 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Remove a field to this class.
Definition at line 204 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Remove an interface from this class.
Definition at line 248 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Remove an interface from this class.
Definition at line 209 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Remove a method from this class.
Definition at line 255 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Remove a method from this class.
Definition at line 218 of file lib/jpf/de/fub/bytecode/generic/ClassGen.java. |
|
Remove observer for this object. Definition at line 258 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Replace given field with new one. If the old one does not exist add the new_ field to the class anyway. Definition at line 265 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Replace given method with new one. If the old one does not exist add the new_ method to the class anyway. Definition at line 279 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Set major version number of class file, default value is 45 (JDK 1.1)
Definition at line 305 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Set minor version number of class file, default value is 3 (JDK 1.1)
Definition at line 319 of file src/de/fub/bytecode/generic/ClassGen.java. |
|
Call notify() method on all observers. This method is not called automatically whenever the state has changed, but has to be called by the user after he has finished editing the object. Definition at line 335 of file src/de/fub/bytecode/generic/ClassGen.java. |