JML

org.multijava.util.classfile
Class HandlerInfo

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

public class HandlerInfo
extends Object
implements AccessorContainer

This class represents a protected ("try") portion of block with an handler (catch) for a specified type of exception


Field Summary
private  InstructionAccessor end
           
private  InstructionAccessor handler
           
private  InstructionAccessor start
           
private  ClassConstant thrown
           
 
Constructor Summary
HandlerInfo(DataInput in, ConstantPool cp, Instruction[] insns)
          Constructs a new exception handler info entry from a class file
HandlerInfo(InstructionAccessor start, InstructionAccessor end, InstructionAccessor handler, String thrown)
          Constructs a new exception handler info entry
 
Method Summary
 InstructionAccessor getEnd()
           
 InstructionAccessor getHandler()
           
 InstructionAccessor getStart()
           
 String getThrown()
           
(package private)  void resolveConstants(ConstantPool cp)
          Insert or check location of constant value on constant pool
 void setEnd(InstructionAccessor end)
           
 void setHandler(InstructionAccessor handler)
           
 void setStart(InstructionAccessor start)
           
 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

handler

private InstructionAccessor handler

thrown

private ClassConstant thrown
Constructor Detail

HandlerInfo

public HandlerInfo(InstructionAccessor start,
                   InstructionAccessor end,
                   InstructionAccessor handler,
                   String thrown)
Constructs a new exception handler info entry

Parameters:
start - the beginning of the checked area (inclusive)
end - the end of the checked area (inclusive !)
handler - the entrypoint into the exception handling routine.
thrown - the exceptions handled by this routine

HandlerInfo

public HandlerInfo(DataInput in,
                   ConstantPool cp,
                   Instruction[] insns)
            throws IOException
Constructs a new exception handler info entry from a class file

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

setStart

public void setStart(InstructionAccessor start)

getStart

public InstructionAccessor getStart()

setEnd

public void setEnd(InstructionAccessor end)

getEnd

public InstructionAccessor getEnd()

setHandler

public void setHandler(InstructionAccessor handler)

getHandler

public InstructionAccessor getHandler()

getThrown

public String getThrown()

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

JML

JML is Copyright (C) 1998-2002 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. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.