- java.lang.Object
-
- org.omg.CORBA.ExceptionList
-
public abstract class ExceptionList extends Object
An object used inRequest
operations to describe the exceptions that can be thrown by a method. It maintains a modifiable list ofTypeCode
s of the exceptions.The following code fragment demonstrates creating an
ExceptionList
object:ORB orb = ORB.init(args, null); org.omg.CORBA.ExceptionList excList = orb.create_exception_list();
The variableexcList
represents anExceptionList
object with noTypeCode
objects in it.To add items to the list, you first create a
TypeCode
object for the exception you want to include, using theORB
methodcreate_exception_tc
. Then you use theExceptionList
methodadd
to add it to the list. The classExceptionList
has a method for getting the number ofTypeCode
objects in the list, and after items have been added, it is possible to call methods for accessing or deleting an item at a designated index.- Since:
- JDK1.2
-
-
Constructor Summary
Constructors Constructor and Description ExceptionList()
-
Method Summary
Methods Modifier and Type Method and Description abstract void
add(TypeCode exc)
Adds aTypeCode
object describing an exception to thisExceptionList
object.abstract int
count()
Retrieves the number ofTypeCode
objects in thisExceptionList
object.abstract TypeCode
item(int index)
Returns theTypeCode
object at the given index.abstract void
remove(int index)
Removes theTypeCode
object at the given index.
-
-
-
Method Detail
-
count
public abstract int count()
Retrieves the number ofTypeCode
objects in thisExceptionList
object.- Returns:
- the number of
TypeCode
objects in thisExceptionList
object
-
add
public abstract void add(TypeCode exc)
Adds aTypeCode
object describing an exception to thisExceptionList
object.- Parameters:
exc
- theTypeCode
object to be added
-
item
public abstract TypeCode item(int index) throws Bounds
Returns theTypeCode
object at the given index. The first item is at index 0.- Parameters:
index
- the index of theTypeCode
object desired. This must be anint
between 0 and the number ofTypeCode
objects minus one, inclusive.- Returns:
- the
TypeCode
object at the given index - Throws:
Bounds
- if the index given is greater than or equal to the number ofTypeCode
objects in thisExceptionList
object
-
remove
public abstract void remove(int index) throws Bounds
Removes theTypeCode
object at the given index. Note that the indices of all theTypeCoded
objects following the one deleted are shifted down by one.- Parameters:
index
- the index of theTypeCode
object to be removed. This must be anint
between 0 and the number ofTypeCode
objects minus one, inclusive.- Throws:
Bounds
- if the index is greater than or equal to the number ofTypeCode
objects in thisExceptionList
object
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-org/omg/CORBA/ExceptionList.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.