0N/A/*
157N/A * Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A
0N/Apackage org.omg.CORBA;
0N/A
0N/A/**
0N/A * An object used in <code>Request</code> operations to
0N/A * describe the exceptions that can be thrown by a method. It maintains a
0N/A * modifiable list of <code>TypeCode</code>s of the exceptions.
0N/A * <P>
0N/A * The following code fragment demonstrates creating
0N/A * an <code>ExceptionList</code> object:
0N/A * <PRE>
0N/A * ORB orb = ORB.init(args, null);
0N/A * org.omg.CORBA.ExceptionList excList = orb.create_exception_list();
0N/A * </PRE>
0N/A * The variable <code>excList</code> represents an <code>ExceptionList</code>
0N/A * object with no <code>TypeCode</code> objects in it.
0N/A * <P>
0N/A * To add items to the list, you first create a <code>TypeCode</code> object
0N/A * for the exception you want to include, using the <code>ORB</code> method
0N/A * <code>create_exception_tc</code>. Then you use the <code>ExceptionList</code>
0N/A * method <code>add</code> to add it to the list.
0N/A * The class <code>ExceptionList</code> has a method for getting
0N/A * the number of <code>TypeCode</code> objects in the list, and after
0N/A * items have been added, it is possible to call methods for accessing
0N/A * or deleting an item at a designated index.
0N/A *
0N/A * @since JDK1.2
0N/A */
0N/A
0N/Apublic abstract class ExceptionList {
0N/A
0N/A /**
0N/A * Retrieves the number of <code>TypeCode</code> objects in this
0N/A * <code>ExceptionList</code> object.
0N/A *
0N/A * @return the number of <code>TypeCode</code> objects in this
0N/A * <code>ExceptionList</code> object
0N/A */
0N/A
0N/A public abstract int count();
0N/A
0N/A /**
0N/A * Adds a <code>TypeCode</code> object describing an exception
0N/A * to this <code>ExceptionList</code> object.
0N/A *
0N/A * @param exc the <code>TypeCode</code> object to be added
0N/A */
0N/A
0N/A public abstract void add(TypeCode exc);
0N/A
0N/A /**
0N/A * Returns the <code>TypeCode</code> object at the given index. The first
0N/A * item is at index 0.
0N/A *
0N/A * @param index the index of the <code>TypeCode</code> object desired.
0N/A * This must be an <code>int</code> between 0 and the
0N/A * number of <code>TypeCode</code> objects
0N/A * minus one, inclusive.
0N/A * @return the <code>TypeCode</code> object at the given index
0N/A * @exception org.omg.CORBA.Bounds if the index given is greater than
0N/A * or equal to the number of <code>TypeCode</code> objects
0N/A * in this <code>ExceptionList</code> object
0N/A */
0N/A
0N/A public abstract TypeCode item(int index)
0N/A throws org.omg.CORBA.Bounds;
0N/A
0N/A /**
0N/A * Removes the <code>TypeCode</code> object at the given index.
0N/A * Note that the indices of all the <code>TypeCoded</code> objects
0N/A * following the one deleted are shifted down by one.
0N/A *
0N/A * @param index the index of the <code>TypeCode</code> object to be
0N/A * removed.
0N/A * This must be an <code>int</code> between 0 and the
0N/A * number of <code>TypeCode</code> objects
0N/A * minus one, inclusive.
0N/A *
0N/A * @exception org.omg.CORBA.Bounds if the index is greater than
0N/A * or equal to the number of <code>TypeCode</code> objects
0N/A * in this <code>ExceptionList</code> object
0N/A */
0N/A
0N/A public abstract void remove(int index)
0N/A throws org.omg.CORBA.Bounds;
0N/A}