at.dms.classfile
Class LineNumberInfo

java.lang.Object
  |
  +--at.dms.classfile.LineNumberInfo
All Implemented Interfaces:
AccessorContainer

public class LineNumberInfo
extends java.lang.Object
implements AccessorContainer

An entry in a LineNumberTable.


Constructor Summary
LineNumberInfo(java.io.DataInput in, ConstantPool cp, Instruction[] instructions)
          Create an entry in the line number table from a class file stream.
LineNumberInfo(short line, InstructionAccessor instruction)
          Create an entry in the line number table.
 
Method Summary
 InstructionAccessor getInstruction()
          Returns the instruction where the line begins
 int getLine()
          Returns the line number in the source code
 void setInstruction(InstructionAccessor instruction)
          Sets the instruction where the line begins
 void transformAccessors(AccessorTransformer transformer)
          Transforms targets.
(package private)  void write(java.io.DataOutput out)
          Write this class into the the file (out) getting data position from the constant pool.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineNumberInfo

public LineNumberInfo(short line,
                      InstructionAccessor instruction)
Create an entry in the line number table.
Parameters:
line - The line number in the source code.
instruction - The instruction where the line begins.

LineNumberInfo

public LineNumberInfo(java.io.DataInput in,
                      ConstantPool cp,
                      Instruction[] instructions)
               throws java.io.IOException
Create an entry in the line number table from a class file stream.
Parameters:
in - The stream to read from.
cp - The constant pool.
instructions - (sparse) array of instructions.
Throws:
java.io.IOException - An io problem has occured.
Method Detail

transformAccessors

public void transformAccessors(AccessorTransformer transformer)
                        throws BadAccessorException
Transforms targets. (deferences to actual instructions)
Specified by:
transformAccessors in interface AccessorContainer
Following copied from interface: at.dms.classfile.AccessorContainer
Parameters:
transformer - The transformer used to transform accessors.

getLine

public int getLine()
Returns the line number in the source code

getInstruction

public InstructionAccessor getInstruction()
Returns the instruction where the line begins

setInstruction

public void setInstruction(InstructionAccessor instruction)
Sets the instruction where the line begins

write

void write(java.io.DataOutput out)
     throws java.io.IOException
Write this class into the the file (out) getting data position from the constant pool.
Parameters:
cp - The constant pool that contain all data.
out - The file where to write this object info.
Throws:
java.io.IOException - An io problem has occured.