public abstract class ExceptionList extends Object
Request
操作可以通过方法抛出的异常。它维护一个可修改的列表的例外
TypeCode
s。
下面的代码片段演示如何创建一个ExceptionList
对象:
球球=球体。init(args,null);org.omg.corba.exceptionlist exclist =球体。create_exception_list();变
excList
表示无
TypeCode
对象
ExceptionList
对象。
将项目添加到列表中,您首先创建要包含异常的TypeCode
对象,使用ORB
方法create_exception_tc
。然后你用ExceptionList
方法add
添加到列表中。这类ExceptionList
具有获取列表中的TypeCode
对象个数的方法,和之后的项目已被添加,它可以调用方法访问或删除项在指定的索引。
Constructor and Description |
---|
ExceptionList() |
public abstract int count()
ExceptionList
TypeCode
检索对象的对象的数目。
ExceptionList
对象
TypeCode
对象数
public abstract void add(TypeCode exc)
TypeCode
对象描述的例外
ExceptionList
对象。
exc
-要添加的
TypeCode
对象
public abstract TypeCode item(int index) throws Bounds
TypeCode
对象。第一个项目是在索引0。
index
-指数的
TypeCode
对象所需的。这必须是0和
TypeCode
对象数减一之间的
int
,包容。
TypeCode
对象
Bounds
如果指数大于或等于该
ExceptionList
对象
TypeCode
对象数
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.