Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.ExceptionTable


                + n);
        result.append(" * Method:    " + Mangler.mangleUnicode(getName()) + n);
        result.append(" * Signature: " + getSignature() + n);

        // Print the thrown exceptions.
        ExceptionTable etable = wrappedMethod.getExceptionTable();
        if (etable != null) {
            String e = etable.toString();
            if (e.length() > 0) {
                result.append(" * Throws:    ");
                result.append(e);
                result.append(n);
            }
View Full Code Here


                // Append the method string.
                result.append(methodStr);

                // Append an exception table.
                ExceptionTable e = m.getExceptionTable();
                if (e != null) {
                    String exceptions = e.toString();
                    if (exceptions.length() > 0) {
                        result.append(n);
                        result.append(indentString(indent * 3, "throws "));
                        result.append(exceptions);
                    }
View Full Code Here

        // Print a method comment.
        result.append("/*" + n);
        result.append(" * Method: " + methodName + n);

        // Print the thrown exceptions.
        ExceptionTable etable = wrappedMethod.getExceptionTable();
        if (etable != null) {
            String e = etable.toString();
            if (e.length() > 0) {
                result.append(" * Throws: ");
                result.append(e);
                result.append(n);
            }
View Full Code Here

                + n);
        result.append(" * Method:    " + Mangler.mangleUnicode(getName()) + n);
        result.append(" * Signature: " + getSignature() + n);

        // Print the thrown exceptions.
        ExceptionTable etable = wrappedMethod.getExceptionTable();
        if (etable != null) {
            String e = etable.toString();
            if (e.length() > 0) {
                result.append(" * Throws:    ");
                result.append(e);
                result.append(n);
            }
View Full Code Here

                // Append the method string.
                result.append(methodStr);

                // Append an exception table.
                ExceptionTable e = m.getExceptionTable();
                if (e != null) {
                    String exceptions = e.toString();
                    if (exceptions.length() > 0) {
                        result.append(n);
                        result.append(indentString(indent * 3, "throws "));
                        result.append(exceptions);
                    }
View Full Code Here

            for (int i = 0; i < size; i++) {
                ex[i] = cp.addClass(throws_vec.get(i));
            }
        } catch (ArrayIndexOutOfBoundsException e) {
        }
        return new ExceptionTable(cp.addUtf8("Exceptions"), 2 + 2 * size, ex, cp.getConstantPool());
    }
View Full Code Here

                    max_stack, max_locals, byte_code, c_exc, code_attrs, cp.getConstantPool());
            addAttribute(code);
        }
        addAnnotationsAsAttribute(cp);
        addParameterAnnotationsAsAttribute(cp);
        ExceptionTable et = null;
        if (throws_vec.size() > 0) {
            addAttribute(et = getExceptionTable(cp));
            // Add `Exceptions' if there are "throws" clauses
        }
        Method m = new Method(access_flags, name_index, signature_index, getAttributes(), cp
View Full Code Here

      log("         method param[" + i + "]=" + types[i],
          Project.MSG_VERBOSE);
      design.checkClass(types[i]);
    }

    ExceptionTable excs = m.getExceptionTable();
    if (excs != null) {
      types = excs.getExceptionNames();
      for (int i = 0; i < types.length; i++) {
        log("         exc=" + types[i], Project.MSG_VERBOSE);
        design.checkClass(types[i]);
      }
    }
View Full Code Here

        }
        methodMetaData.setParameterTypes(parameterTypes);

        // exceptions
        String[] exceptions;
        ExceptionTable exceptionTable = method.getExceptionTable();
        if (exceptionTable != null) {
            exceptions = exceptionTable.getExceptionNames();
        }
        else {
            exceptions = new String[0];
        }
        methodMetaData.setExceptionTypes(exceptions);
View Full Code Here

        }
        methodMetaData.setParameterTypes(parameterTypes);

        // exceptions
        String[] exceptions;
        ExceptionTable exceptionTable = method.getExceptionTable();
        if (exceptionTable != null) {
            exceptions = exceptionTable.getExceptionNames();
        }
        else {
            exceptions = new String[0];
        }
        methodMetaData.setExceptionTypes(exceptions);
View Full Code Here

TOP

Related Classes of org.apache.bcel.classfile.ExceptionTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.