1 26 27 package org.objectweb.openccm.ast.lib; 28 29 30 import org.objectweb.openccm.ast.api.ExceptionDecl; 31 32 33 import org.omg.CORBA.ExceptionDef ; 34 35 36 import org.omg.CORBA.ExceptionDescription ; 37 38 54 55 public class ExceptionListImpl 56 extends ListBaseImpl 57 implements org.objectweb.openccm.ast.api.ExceptionList 58 { 59 65 71 74 public ExceptionListImpl() 75 { 76 super(); 78 } 79 80 86 92 97 public ExceptionDef [] 98 getExceptionDefSeq() 99 { 100 ExceptionDef [] result = new ExceptionDef [getSize()]; 102 103 java.util.Iterator it = iterator(); 105 for(int i=0; it.hasNext(); i++) 106 { 107 ExceptionDeclImpl exc = (ExceptionDeclImpl)it.next(); 109 110 result[i] = exc.getExceptionDef(); 112 } 113 114 return result; 116 } 117 118 123 public ExceptionDescription [] 124 getExceptionDescriptionSeq() 125 { 126 ExceptionDescription [] result = new ExceptionDescription [getSize()]; 128 129 java.util.Iterator it = iterator(); 131 for(int i=0; it.hasNext(); i++) 132 { 133 ExceptionDeclImpl exc = (ExceptionDeclImpl)it.next(); 135 136 result[i] = exc.getExceptionDescription(); 138 } 139 140 return result; 142 } 143 144 150 155 public void 156 add(ExceptionDecl exception) 157 { 158 super.addObject(exception); 159 } 160 161 166 public ExceptionDecl[] 167 getExceptions() 168 { 169 return (ExceptionDecl[])super.toArray(new ExceptionDecl[0]); 170 } 171 } 172 | Popular Tags |