コード例 #1
0
  private void importExceptions(DbOOAbstractMethod oper, Method method) throws DbException {

    ExceptionTable table = method.getExceptionTable();
    if (table != null) {
      String[] exceptionNames = table.getExceptionNames();

      for (String exceptionName : exceptionNames) {
        DbOOAdt adt = findClassByName(exceptionName);
        if (adt instanceof DbJVClass) {
          DbJVClass exception = (DbJVClass) adt;
          if (oper instanceof DbJVConstructor) {
            DbJVConstructor constr = (DbJVConstructor) oper;
            constr.addToJavaExceptions(exception);
          } else if (oper instanceof DbJVMethod) {
            DbJVMethod meth = (DbJVMethod) oper;
            meth.addToJavaExceptions(exception);
          } // end if
        } // end if
      } // end for
    } // end if
  } // end importExceptions()
コード例 #2
0
 /**
  * Initialize from another object. Note that both objects use the same references (shallow copy).
  * Use copy() for a physical copy.
  */
 public ExceptionTable(ExceptionTable c) {
   this(c.getNameIndex(), c.getLength(), c.getExceptionIndexTable(), c.getConstantPool());
 }
コード例 #3
0
 /** @return deep copy of this attribute */
 public Attribute copy(ConstantPool constant_pool) {
   ExceptionTable c = (ExceptionTable) clone();
   c.exception_index_table = (int[]) exception_index_table.clone();
   c.constant_pool = constant_pool;
   return c;
 }