|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--koala.dynamicjava.classfile.BytecodeComponent | +--koala.dynamicjava.classfile.AttributeOwnerComponent | +--koala.dynamicjava.classfile.ClassFile
This class allows the creation of JVM bytecode class format outputs
Fields inherited from class koala.dynamicjava.classfile.AttributeOwnerComponent |
accessFlags, attributes |
Fields inherited from class koala.dynamicjava.classfile.BytecodeComponent |
constantPool, nameIndex |
Constructor Summary | |
ClassFile(java.lang.String name,
java.lang.String sname)
Creates a new ClassFile structure |
Method Summary | |
void |
addInterface(java.lang.String name)
Adds an interface to the list of the implemented interfaces |
FieldInfo |
createField(java.lang.String tp,
java.lang.String nm)
Creates a new field |
MethodInfo |
createMethod(java.lang.String rt,
java.lang.String nm,
java.lang.String[] pt)
Creates a new method |
ConstantPool |
getConstantPool()
Returns the constant pool |
void |
setAbstract()
Sets the abstract flag for this class |
void |
setFinal()
Sets the final flag for this class |
void |
setInnerClassesAttribute(InnerClassesAttribute attr)
Sets the innerclasses attribute to the class |
void |
setInterface()
Sets the interface flag for this class |
void |
setPublic()
Sets the public flag for this class |
void |
setSuper()
Sets the super flag for this class |
void |
write(java.io.DataOutputStream out)
Writes the class file to the given output stream |
Methods inherited from class koala.dynamicjava.classfile.AttributeOwnerComponent |
setAccessFlags, setSyntheticAttribute |
Methods inherited from class koala.dynamicjava.classfile.BytecodeComponent |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClassFile(java.lang.String name, java.lang.String sname)
name
- the name of this classsname
- the name of the superclassMethod Detail |
public ConstantPool getConstantPool()
getConstantPool
in class BytecodeComponent
public void write(java.io.DataOutputStream out) throws java.io.IOException
write
in class BytecodeComponent
public void setPublic()
public void setFinal()
public void setSuper()
public void setInterface()
public void setAbstract()
public void addInterface(java.lang.String name)
public FieldInfo createField(java.lang.String tp, java.lang.String nm)
tp
- the type of the fieldnm
- the name of the fieldfor a description of the type format
public MethodInfo createMethod(java.lang.String rt, java.lang.String nm, java.lang.String[] pt)
rt
- the return typenm
- the name of the methodpt
- the parameter typesfor a description of the type format
public void setInnerClassesAttribute(InnerClassesAttribute attr)
attr
- the attribute to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |