at.dms.classfile
Class LineNumberInfo

java.lang.Object
  extended by at.dms.classfile.LineNumberInfo
All Implemented Interfaces:
AccessorContainer

public class LineNumberInfo
extends Object
implements AccessorContainer

VMS 4.7.8: Line Number Table Attribute. This attribute represents a mapping between he Java Virtual Machine code array and the line number in the original Java source file


Constructor Summary
LineNumberInfo(DataInput in, ConstantPool cp, Instruction[] insns)
          Create an entry in the line number table from a class file stream
LineNumberInfo(short line, InstructionAccessor inst)
          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 inst)
          Sets the instruction where the line begins
 void transformAccessors(AccessorTransformer transformer)
          Transforms targets (deferences to actual instructions).
 
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 inst)
Create an entry in the line number table

Parameters:
line - the line number in the source code
inst - the instruction where the line begins

LineNumberInfo

public LineNumberInfo(DataInput in,
                      ConstantPool cp,
                      Instruction[] insns)
               throws 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
insns - (sparse) array of instructions
Throws:
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
Parameters:
transformer - the transformer used to transform accessors
Throws:
BadAccessorException

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 inst)
Sets the instruction where the line begins