fr.umlv.corosol.classfile.io
Interface JClassFileOutput

All Superinterfaces:
java.io.DataOutput, JObject
All Known Implementing Classes:
JClassFileOutputStream

public interface JClassFileOutput
extends JObject, java.io.DataOutput

This JClassFileOutput interface provides methods for writing the bytes of a binary representation of a class (class file).

Author:
Christophe Deleray
See Also:
JClassFileItem, JAttribute, JConstant, JConstantPool, JClassMember

Method Summary
 JConstantPool getConstantPool()
          Returns the constant pool used by this classfile writer.
 void writeClassFileItem(JClassFileItem item)
          Writes the specified class file item into the classfile.
 void writeConstant(JConstant constant)
          Writes a constant pool entry in the classfile.
 void writeConstantPool(JConstantPool constantPool)
          Writes the constant pool in the classfile.
 
Methods inherited from interface java.io.DataOutput
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 

Method Detail

writeConstant

void writeConstant(JConstant constant)
                   throws java.io.IOException
Writes a constant pool entry in the classfile.

Parameters:
constant - a constant pool entry
Throws:
java.io.IOException - if an I/O error occurs when writing this constant pool entry

writeConstantPool

void writeConstantPool(JConstantPool constantPool)
                       throws java.io.IOException
Writes the constant pool in the classfile.

Parameters:
constantPool - the constant pool
Throws:
java.io.IOException - if an I/O error occurs when writing the constant pool

writeClassFileItem

void writeClassFileItem(JClassFileItem item)
                        throws java.io.IOException
Writes the specified class file item into the classfile.

Parameters:
item - a classfile item
Throws:
java.io.IOException - if an I/O error occurs when writing

getConstantPool

JConstantPool getConstantPool()
Returns the constant pool used by this classfile writer.

Returns:
the constant pool used by this classfile writer