mjc

org.multijava.util.classfile
Class LocalVariableInfo

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

public class LocalVariableInfo
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 end
           
private  AsciiConstant name
           
private  short slot
           
private  InstructionAccessor start
           
private  AsciiConstant type
           
 
Constructor Summary
LocalVariableInfo(DataInput in, ConstantPool cp, Instruction[] insns)
          Create an entry in the line number table from a class file stream
LocalVariableInfo(InstructionAccessor start, InstructionAccessor end, String name, String type, short slot)
          Create an entry in the line number table
 
Method Summary
 InstructionAccessor getEnd()
          Returns the end of the protected area
 String getName()
          Returns the name of the local variable
 short getSlot()
          Returns the index in the method's local variables
 InstructionAccessor getStart()
          Returns the start of the protected area
 String getType()
          Returns the type of the local variable
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool
 void setEnd(InstructionAccessor end)
          Sets the end of the protected area
 void setStart(InstructionAccessor start)
          Sets the start of the protected area
 void transformAccessors(AccessorTransformer transformer)
          Transforms targets (deferences to actual instructions).
(package private)  void write(ConstantPool cp, 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

start

private InstructionAccessor start

end

private InstructionAccessor end

name

private AsciiConstant name

type

private AsciiConstant type

slot

private short slot
Constructor Detail

LocalVariableInfo

public LocalVariableInfo(InstructionAccessor start,
                         InstructionAccessor end,
                         String name,
                         String type,
                         short slot)
Create an entry in the line number table

Parameters:
start - the beginning of the area (inclusive) where the name is valid
end - the end of the area (inclusive) where the name is valid
name - the name of the variable
type - the type signature of the variable
slot - the index in the method's local variables

LocalVariableInfo

public LocalVariableInfo(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

getName

public String getName()
Returns the name of the local variable


getType

public String getType()
Returns the type of the local variable


setStart

public void setStart(InstructionAccessor start)
Sets the start of the protected area


getStart

public InstructionAccessor getStart()
Returns the start of the protected area


setEnd

public void setEnd(InstructionAccessor end)
Sets the end of the protected area


getEnd

public InstructionAccessor getEnd()
Returns the end of the protected area


getSlot

public short getSlot()
Returns the index in the method's local variables


resolveConstants

void resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool

Parameters:
cp - the constant pool for this class

write

void write(ConstantPool cp,
           DataOutput out)
     throws 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:
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.