Package org.gjt.jclasslib.structures

Examples of org.gjt.jclasslib.structures.InvalidByteCodeException


            int targetOffset = ((AbstractInstruction)instructions.get(i)).getOffset();
            if (targetOffset - startOffset == branchOffset) {
                return i;
            }
        }
        throw new InvalidByteCodeException("Invalid branch target");
    }
View Full Code Here


            if (startPcIndex < 0 || endPcIndex < 0 || handlerPcIndex < 0 ||
                startPcIndex == oldOffsets.length ||
                endPcIndex == oldOffsets.length ||
                handlerPcIndex == oldOffsets.length)
            {
                throw new InvalidByteCodeException("Invalid exception table");
            }
            currentEntry.setStartPc(newOffsets[transformedIndices[startPcIndex]]);
            currentEntry.setEndPc(newOffsets[transformedIndices[endPcIndex]]);
            currentEntry.setHandlerPc(newOffsets[transformedIndices[handlerPcIndex]]);
        }
View Full Code Here

        for (int i = 0; i < lineNumberTable.length; i++) {
            LineNumberTableEntry currentEntry = lineNumberTable[i];
            int startPcIndex = Arrays.binarySearch(oldOffsets, currentEntry.getStartPc());
            if (startPcIndex < 0 || startPcIndex == oldOffsets.length) {
                throw new InvalidByteCodeException("Invalid line number table " + currentEntry.getStartPc());
            }
            currentEntry.setStartPc(newOffsets[transformedIndices[startPcIndex]]);
        }

   }
View Full Code Here

                break;
            case ARRAY_TAG:
                entry = new ArrayElementValue();
                break;
            default:
                throw new InvalidByteCodeException("Unknown tag " + (char)tagType);
        }
        entry.setClassFile(classFile);
        entry.read(in);

        return entry;
View Full Code Here

TOP

Related Classes of org.gjt.jclasslib.structures.InvalidByteCodeException

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.