Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class DE.fub.inf.JVM.ClassGen.ClassGen

java.lang.Object
  |
  +--DE.fub.inf.JVM.ClassGen.ClassGen

public final class ClassGen
extends java.lang.Object
implements Constants
Template class for building up a java class. May be initialized by an existing java class (file).

Version:
$Id: ClassGen.java,v 1.2 1998/09/15 08:42:24 dahm Exp $
Author:
M. Dahm
See Also:
JavaClass

Constructor Summary
ClassGen(java.lang.String class_name, java.lang.String super_class_name, java.lang.String file_name, int access_flags, java.lang.String[] interfaces)
           
ClassGen(JavaClass clazz)
          Initialize with existing class.
 
Method Summary
void addAttribute(Attribute a)
          Add an attribute to this class.
void addField(Field f)
          Add a field to this class.
void addInterface(java.lang.String i)
          Add an interface to this class, i.e. this class has to implement it.
void addMethod(Method m)
          Add a method to this class.
int getAccessFlags()
           
java.lang.String getClassName()
           
ConstantPoolGen getConstantPool()
           
java.lang.String getFileName()
           
JavaClass getJavaClass()
           
java.lang.String getSuperclassName()
           
void removeAttribute(Attribute a)
          Remove an attribute from this class.
void removeField(Field f)
          Remove a field to this class.
void removeMethod(Method m)
          Remove a method from this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

ClassGen

public ClassGen(java.lang.String class_name,
                java.lang.String super_class_name,
                java.lang.String file_name,
                int access_flags,
                java.lang.String[] interfaces)
Parameters:
class_name - fully qualified class name
super_class_name - fully qualified superclass name
file_name - source file name
access_flags - access qualifiers
interfaces - implemented interfaces

ClassGen

public ClassGen(JavaClass clazz)
Initialize with existing class.
Parameters:
clazz - JavaClass object (e.g. read from file)
Method Detail

getJavaClass

public JavaClass getJavaClass()
Returns:
the (finally) built up Java class object.

addInterface

public final void addInterface(java.lang.String i)
Add an interface to this class, i.e. this class has to implement it.
Parameters:
i - interface to implement (fully qualified class name)

addAttribute

public final void addAttribute(Attribute a)
Add an attribute to this class.
Parameters:
a - attribute to add

addMethod

public final void addMethod(Method m)
Add a method to this class.
Parameters:
m - method to add

addField

public final void addField(Field f)
Add a field to this class.
Parameters:
f - field to add

removeAttribute

public final void removeAttribute(Attribute a)
Remove an attribute from this class.
Parameters:
a - attribute to remove

removeMethod

public final void removeMethod(Method m)
Remove a method from this class.
Parameters:
m - method to remove

removeField

public final void removeField(Field f)
Remove a field to this class.
Parameters:
f - field to remove

getClassName

public java.lang.String getClassName()

getSuperclassName

public java.lang.String getSuperclassName()

getFileName

public java.lang.String getFileName()

getAccessFlags

public int getAccessFlags()

getConstantPool

public ConstantPoolGen getConstantPool()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD