Package org.apache.bcel.classfile

Examples of org.apache.bcel.classfile.ExceptionTable


        }
        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

     * @param patches The already generated patches.
     */
    public static void generate(Attribute[] old, Attribute[] new_,
            List<AttributePatch> patches){
       
        ExceptionTable newExceptions = null;
        ExceptionTable oldExceptions = null;
        for(Attribute a : old){
            if(a instanceof ExceptionTable){
                oldExceptions = (ExceptionTable)a;
                break;
            }
        }
        for(Attribute a : new_){
            if(a instanceof ExceptionTable){
                newExceptions = (ExceptionTable)a;
                break;
            }
        }
       
        int[] newIndexes = new int[0];
        String[] newStrings = new String[0];
        if(newExceptions != null){
            newIndexes = newExceptions.getExceptionIndexTable();
            newStrings = newExceptions.getExceptionNames();
        }
        int[] oldIndexes = new int[0];
        String[] oldStrings = new String[0];
        if(oldExceptions != null){
            oldIndexes = oldExceptions.getExceptionIndexTable();
            oldStrings = oldExceptions.getExceptionNames();
        }
       
        List<Integer> removedIndexes = new ArrayList<Integer>();
        List<Integer> addedIndexes = new ArrayList<Integer>();
        // Find added
View Full Code Here

       
        int[] intIndexes = new int[indexes.size()];
        for(int i = 0; i < intIndexes.length; i++)
            intIndexes[i] = indexes.get(i);
       
        ExceptionTable e = new ExceptionTable(
                Util.findConstantStringIn(map, "Exceptions"),
                2 + 2 * indexes.size(),
                intIndexes,
                map.to);
       
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.