|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.copernicus.c.ExceptionTracker
public class ExceptionTracker
A class that keeps track of Exceptions and Traps.
| Red (ankush) |
| Red (ankush) |
| Field Summary | |
|---|---|
protected java.util.LinkedList |
_beginUnitList
The list of beginUnits. |
protected java.util.LinkedList |
_currently_active_traps
The list of currently active Traps. |
protected java.util.LinkedList |
_endUnitList
The list of endUnits. |
protected int |
_epc
The exceptional pc. |
protected java.util.LinkedList |
_handlerUnitList
The list of handlerUnits. |
protected soot.util.Chain |
_trapChain
The Chain of Traps. |
protected java.util.LinkedList |
_trapsForEachEpc
List containing the lists of traps for each epc. |
| Constructor Summary | |
|---|---|
ExceptionTracker()
A dummy initializer method. |
|
| Method Summary | |
|---|---|
protected void |
_storeState()
Store the current state of the ExceptionTracker. |
int |
beginIndexOf(soot.Unit u)
Gives the index of the first incidence of Unit u in the list of beginUnits. |
void |
beginUnitEncountered(soot.Unit u)
Record that this beginUnit has been encountered and perform the appropriate housekeeping functions. |
int |
endIndexOf(soot.Unit u)
Gives the index of the first incidence of Unit u in the list of endUnits. |
void |
endUnitEncountered(soot.Unit u)
Record that this endUnit has been encountered and perform the appropriate housekeeping functions. |
int |
getEpc()
Returns the current Exceptional PC. |
java.util.LinkedList |
getHandlerUnitList(int epc)
Returns a list of all handler units associated with the given exceptional pc. |
soot.util.Chain |
getTrapChain()
Returns a chain of all the Traps in the body. |
java.util.LinkedList |
getTrapsForEpc(int epc)
Returns a list of all Traps for the given exceptional PC. |
int |
handlerIndexOf(soot.Unit u)
Gives the index of the first incidence of Unit u in the list of handlerUnits. |
void |
init(soot.Body body)
Initializes the class with a given body. |
boolean |
isBeginUnit(soot.Unit u)
Checks if unit u is the beginUnit for any Trap in the body. |
boolean |
isEndUnit(soot.Unit u)
Checks if unit u is the endUnit for any Trap in the body. |
boolean |
isHandlerUnit(soot.Unit u)
Checks if unit u is the handlerUnit for any Trap in the body. |
int |
numberOfTraps()
Returns the number of traps in the body. |
boolean |
trapsExist()
Returns whether the body has any traps in it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _epc
protected soot.util.Chain _trapChain
protected java.util.LinkedList _beginUnitList
protected java.util.LinkedList _endUnitList
protected java.util.LinkedList _handlerUnitList
protected java.util.LinkedList _currently_active_traps
protected java.util.LinkedList _trapsForEachEpc
| Constructor Detail |
|---|
public ExceptionTracker()
| Method Detail |
|---|
public int beginIndexOf(soot.Unit u)
u - The Unit.
public void beginUnitEncountered(soot.Unit u)
u - The Unit.public int endIndexOf(soot.Unit u)
u - The Unit.
public void endUnitEncountered(soot.Unit u)
u - The Unit.public int getEpc()
public java.util.LinkedList getHandlerUnitList(int epc)
epc - The exceptional pc.
public soot.util.Chain getTrapChain()
public java.util.LinkedList getTrapsForEpc(int epc)
epc - The exceptional pc.
public int handlerIndexOf(soot.Unit u)
u - The Unit.
public void init(soot.Body body)
body - The Body for which exceptions are to be tracked.public boolean isBeginUnit(soot.Unit u)
u - The Unit to be checked.
public boolean isEndUnit(soot.Unit u)
u - The Unit to be checked.
public boolean isHandlerUnit(soot.Unit u)
u - The Unit to be checked.
public int numberOfTraps()
public boolean trapsExist()
protected void _storeState()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||