All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class DE.fub.inf.JVM.JavaClass.CodeException

java.lang.Object
   |
   +----DE.fub.inf.JVM.JavaClass.CodeException

public final class CodeException
extends Object
This class represents an entry in the exception table of the Code attribute and is used only there. It contains a range in which a particular exception handler is active.

Version:
970922
Author:
M. Dahm
See Also:
Code

Constructor Index

 o CodeException()
Empty constructor, all attributes have to be defined via `setXXX' methods.
 o CodeException(CodeException)
Initialize from another object.
 o CodeException(short, short, short, short)

Method Index

 o accept(Visitor)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 o dump(DataOutputStream)
Dump code exception to file stream in binary format.
 o getCatchType()
 o getEndPC()
 o getHandlerPC()
 o getStartPC()
 o setCatchType(short)
 o setEndPC(short)
 o setHandlerPC(short)
 o setStartPC(short)
 o toString()

Constructors

 o CodeException
 public CodeException()
Empty constructor, all attributes have to be defined via `setXXX' methods. Use at your own risk.

 o CodeException
 public CodeException(CodeException c)
Initialize from another object.

 o CodeException
 public CodeException(short start_pc,
                      short end_pc,
                      short handler_pc,
                      short catch_type)
Parameters:
start_pc - Range in the code the exception handler is active, start_pc is inclusive while
end_pc - is exclusive
handler_pc - Starting address of exception handler, i.e. an offset from start of code.
catch_type - If zero the handler catches any exception, otherwise it points to the exception class which is to be caught.

Methods

 o accept
 public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters:
v - Visitor object
 o dump
 public final void dump(DataOutputStream file) throws IOException
Dump code exception to file stream in binary format.

Parameters:
file - Output file stream
 o getCatchType
 public final short getCatchType()
Returns:
Zero, if the handler catches any exception, otherwise it points to the exception class which is to be caught.
 o getEndPC
 public final short getEndPC()
Returns:
Exclusive end index of the region where the handler is active.
 o getHandlerPC
 public final short getHandlerPC()
Returns:
Starting address of exception handler, relative to the code.
 o getStartPC
 public final short getStartPC()
Returns:
Inclusive start index of the region where the handler is active.
 o setCatchType
 public final void setCatchType(short catch_type)
 o setEndPC
 public final void setEndPC(short end_pc)
 o setHandlerPC
 public final void setHandlerPC(short handler_pc)
 o setStartPC
 public final void setStartPC(short start_pc)
 o toString
 public final String toString()
Returns:
String representation.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index