fr.umlv.corosol.classfile.attribute
Interface JExceptionHandler

All Superinterfaces:
JClassFileItem, JObject
All Known Implementing Classes:
DefaultJExceptionHandler

public interface JExceptionHandler
extends JClassFileItem

A JExceptionHandler represents an entry in the exception_table of a Code attribute. A such entry describes one exception handler in the byte code array of a method (i.e. a try/catch statement). It contains :

Author:
Christophe Deleray
See Also:
JCodeAttribute

Method Summary
 java.lang.String getCatchType()
          Returns the name of the class of exceptions that a method is designated to catch.
 int getCatchTypeIndex()
          Returns an index into the constant pool indicating a class of exceptions that this exception handler is designated to catch.
 int getEndPC()
          Returns the end position in the byte code array at which the exception handler is active.
 int getHandlerPC()
          Returns the start of this exception handler into the byte code array.
 int getStartPC()
          Returns the start position in the byte code array at which the exception handler is active.
 void setCatchType(java.lang.String name)
          Sets the index into the constant pool indicating the class of exceptions specified by name that a method is designated to catch.
 void setCatchTypeIndex(int index)
          Sets the index into the constant pool indicating a class of exceptions that a method is designated to catch.
 void setEndPC(int endPC)
          Sets the end position in the byte code array at which the exception handler is active.
 void setHandlerPC(int handlerPC)
          Sets the start of this exception handler into the byte code array.
 void setStartPC(int startPC)
          Sets the start position in the byte code array at which the exception handler is active.
 java.lang.String toString()
          Returns a string representation of this JExceptionHandler object.
 
Methods inherited from interface fr.umlv.corosol.classfile.JClassFileItem
getConstantPool, readItem, setConstantPool, writeItem
 

Method Detail

getStartPC

int getStartPC()
Returns the start position in the byte code array at which the exception handler is active.


getEndPC

int getEndPC()
Returns the end position in the byte code array at which the exception handler is active.


getHandlerPC

int getHandlerPC()
Returns the start of this exception handler into the byte code array.


toString

java.lang.String toString()
Returns a string representation of this JExceptionHandler object.

Overrides:
toString in class java.lang.Object

setStartPC

void setStartPC(int startPC)
Sets the start position in the byte code array at which the exception handler is active.

Parameters:
startPC - the start position at which the exception handler is active

setEndPC

void setEndPC(int endPC)
Sets the end position in the byte code array at which the exception handler is active.

Parameters:
endPC - the end position at which the exception handler is active

setHandlerPC

void setHandlerPC(int handlerPC)
Sets the start of this exception handler into the byte code array.

Parameters:
handlerPC - the start of this exception handler into the byte code array.

getCatchTypeIndex

int getCatchTypeIndex()
Returns an index into the constant pool indicating a class of exceptions that this exception handler is designated to catch.


getCatchType

java.lang.String getCatchType()
Returns the name of the class of exceptions that a method is designated to catch.


setCatchTypeIndex

void setCatchTypeIndex(int index)
Sets the index into the constant pool indicating a class of exceptions that a method is designated to catch.

Parameters:
index - an index of a constant pool entry indicating a class of exceptions that this exception handler is designated to catch

setCatchType

void setCatchType(java.lang.String name)
Sets the index into the constant pool indicating the class of exceptions specified by name that a method is designated to catch.

Parameters:
name - the class of exceptions that a method is designated to catch