Compil3r.Quad
Class ExceptionHandlerList

java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
Compil3r.Quad.ExceptionHandlerList
- All Implemented Interfaces:
- java.util.Collection, java.lang.Iterable, java.util.List, Util.Templates.List.ExceptionHandler
- public class ExceptionHandlerList
- extends java.util.AbstractList
- implements Util.Templates.List.ExceptionHandler
Holds a list of exception handlers that protect a basic block.
It includes a reference to a parent exception handler list, to handle nesting
of exception handlers.
These form a tree structure where each node has a pointer to its parent.
- Version:
- $Id: ExceptionHandlerList.java,v 1.8 2003/05/12 10:05:16 joewhaley Exp $
Methods inherited from class java.util.AbstractList |
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, remove, removeRange, set, subList |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
exception_handler
private ExceptionHandler exception_handler
- The exception handler.
parent
ExceptionHandlerList parent
- The parent exception handler set.
EMPTY
public static final ExceptionHandlerList EMPTY
ExceptionHandlerList
ExceptionHandlerList()
ExceptionHandlerList
public ExceptionHandlerList(ExceptionHandler exception_handler)
- Creates new ExceptionHandlerList containing the given exception handler and no parent set.
ExceptionHandlerList
public ExceptionHandlerList(ExceptionHandler exception_handler,
ExceptionHandlerList parent)
- Creates new ExceptionHandlerList containing the given exception handler and parent set.
getHandler
public ExceptionHandler getHandler()
- Return the handler in this set. Doesn't include parent handlers.
setHandler
public void setHandler(ExceptionHandler eh)
getParent
public ExceptionHandlerList getParent()
- Return the parent set of exception handlers, or null if this set doesn't have a parent.
setParent
public void setParent(ExceptionHandlerList p)
mustCatch
public ExceptionHandler mustCatch(Clazz.jq_Class exType)
- Returns the first exception handler in the list that MUST catch an
exception of the given type, or null if there is no handler that must catch it.
mayCatch
public Util.Templates.List.ExceptionHandler mayCatch(Clazz.jq_Class exType)
- Returns the list of exception handlers in this list that MAY catch the given exception type.
exceptionHandlerIterator
public Util.Templates.ListIterator.ExceptionHandler exceptionHandlerIterator()
- Return an iteration over the handlers in this set (and the handlers in parent sets).
Handlers are returned in the correct order (this set, followed by parent sets.)
- Specified by:
exceptionHandlerIterator
in interface Util.Templates.List.ExceptionHandler
iterator
public java.util.Iterator iterator()
- Description copied from interface:
java.util.List
- Obtain an Iterator over this list, whose sequence is the list order.
- Specified by:
iterator
in interface java.util.List
listIterator
public java.util.ListIterator listIterator()
- Description copied from interface:
java.util.List
- Obtain a ListIterator over this list, starting at the beginning.
- Specified by:
listIterator
in interface java.util.List
getExceptionHandler
public ExceptionHandler getExceptionHandler(int index)
- Specified by:
getExceptionHandler
in interface Util.Templates.List.ExceptionHandler
get
public java.lang.Object get(int index)
- Description copied from interface:
java.util.List
- Get the element at a given index in this list.
- Specified by:
get
in interface java.util.List
size
public int size()
- Description copied from interface:
java.util.List
- Get the number of elements in this list. If the list contains more
than Integer.MAX_VALUE elements, return Integer.MAX_VALUE.
- Specified by:
size
in interface java.util.List
getEmptyList
public static ExceptionHandlerList getEmptyList()