fr.umlv.corosol.classfile
Interface JClassFileItem

All Superinterfaces:
JObject
All Known Subinterfaces:
JAttribute, JClassFile, JClassMember, JCodeAttribute, JConstant, JConstantClass, JConstantDouble, JConstantFieldref, JConstantFloat, JConstantInteger, JConstantInterfaceMethodref, JConstantLong, JConstantMethodref, JConstantNameAndType, JConstantPool, JConstantString, JConstantUtf8, JConstantValueAttribute, JExceptionHandler, JExceptionsAttribute, JLoadableConstant
All Known Implementing Classes:
AbstractJAttribute, AbstractJConstant, DefaultJClassFile, DefaultJClassMember, DefaultJCodeAttribute, DefaultJConstantClass, DefaultJConstantDouble, DefaultJConstantFieldref, DefaultJConstantFloat, DefaultJConstantInteger, DefaultJConstantInterfaceMethodref, DefaultJConstantLong, DefaultJConstantMethodref, DefaultJConstantNameAndType, DefaultJConstantPool, DefaultJConstantString, DefaultJConstantUtf8, DefaultJConstantValueAttribute, DefaultJExceptionHandler, DefaultJExceptionsAttribute, JDK1_5JConstantClass, JUnknownAttribute

public interface JClassFileItem
extends JObject

A JClassClassItem object represents a part of a classfile. The method readItem is designed to extract all data of this classfile part.

Author:
Christophe Deleray

Method Summary
 JConstantPool getConstantPool()
          Returns the constant pool of this classfile item.
 void readItem(JClassFileInput in)
          Extracts the data of this classfile item via the specified input stream.
 void setConstantPool(JConstantPool constantPool)
          Sets the constant pool of this classfile item.
 void writeItem(JClassFileOutput out)
          Writes the data of this classfile part into a file via the specified output stream.
 

Method Detail

getConstantPool

JConstantPool getConstantPool()
Returns the constant pool of this classfile item.


setConstantPool

void setConstantPool(JConstantPool constantPool)
Sets the constant pool of this classfile item.

Parameters:
constantPool - the constant Pool

readItem

void readItem(JClassFileInput in)
              throws java.io.IOException
Extracts the data of this classfile item via the specified input stream.

Parameters:
in - a class file input stream
Throws:
java.io.IOException - if an I/O error occurs when reading this classfile item datas

writeItem

void writeItem(JClassFileOutput out)
               throws java.io.IOException
Writes the data of this classfile part into a file via the specified output stream.

Parameters:
out - a class file output stream
Throws:
java.io.IOException - if an I/O error occurs when writing into the classfile