fr.umlv.corosol.classfile.io
Interface JClassFileInput

All Superinterfaces:
java.io.DataInput, JObject
All Known Implementing Classes:
JClassFileInputStream

public interface JClassFileInput
extends JObject, java.io.DataInput

This JClassFileInput interface provides methodes for reading bytes from a binary representation of a class (class file). From those bytes, the method of this class create classfile item objects.

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

Method Summary
 JConstantPool getConstantPool()
          Returns the constant pool created by this classfile reader.
 JAttribute readAttribute()
          Reads an attributes from the classfile.
 JClassFileItem readClassFileItem(java.lang.Class type)
          Reads the class file item specified by its type.
 JClassMember readClassMember()
          Reads a class member description from the classfile.
 JConstant readConstant()
          Reads a constant pool entry from the classfile.
 JConstantPool readConstantPool()
          Reads the constant pool from the classfile.
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Method Detail

readAttribute

JAttribute readAttribute()
                         throws java.io.IOException
Reads an attributes from the classfile.

Returns:
an attribute
Throws:
java.io.IOException - if an I/O error occurs when reading this attribute

readClassMember

JClassMember readClassMember()
                             throws java.io.IOException
Reads a class member description from the classfile.

Returns:
a class member description
Throws:
java.io.IOException - if an I/O error occurs when reading this class member description

readConstant

JConstant readConstant()
                       throws java.io.IOException
Reads a constant pool entry from the classfile.

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

readConstantPool

JConstantPool readConstantPool()
                               throws java.io.IOException
Reads the constant pool from the classfile.

Returns:
the constant pool
Throws:
java.io.IOException - if an I/O error occurs when reading the constant pool

readClassFileItem

JClassFileItem readClassFileItem(java.lang.Class type)
                                 throws java.io.IOException
Reads the class file item specified by its type.

Parameters:
type - the type of a class file item to be readed from the classfile
Returns:
the corresponding class item
Throws:
java.io.IOException - if an I/O error occurs when reading this classfile item

getConstantPool

JConstantPool getConstantPool()
Returns the constant pool created by this classfile reader.

Returns:
the constant pool created by this classfile reader