mjc

org.multijava.util.classfile
Class LineNumberInfo

java.lang.Object
  extended byorg.multijava.util.classfile.LineNumberInfo
All Implemented Interfaces:
AccessorContainer

public class LineNumberInfo
extends Object
implements AccessorContainer

VMS 4.7.6: 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


Field Summary
private  InstructionAccessor inst
           
private  int line
           
 
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).
(package private)  void write(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
 

Field Detail

line

private int line

inst

private InstructionAccessor inst
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


write

void write(DataOutput out)
     throws IOException
Write this class into the the file (out) getting data position from the constant pool

Parameters:
out - the file where to write this object info
Throws:
IOException - an io problem has occured

mjc

mjc is Copyright (C) 2000-2004 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. mjc is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.