List of usage examples for org.objectweb.asm.tree.analysis AnalyzerException AnalyzerException
public AnalyzerException(final AbstractInsnNode insn, final String message, final Throwable cause)
From source file:co.paralleluniverse.fibers.instrument.InstrumentMethod.java
License:Open Source License
public InstrumentMethod(MethodDatabase db, String className, MethodNode mn) throws AnalyzerException { this.db = db; this.className = className; this.mn = mn; try {//from ww w. j av a 2 s . c om Analyzer a = new TypeAnalyzer(db); this.frames = a.analyze(className, mn); this.lvarStack = mn.maxLocals; this.lvarResumed = mn.maxLocals + 1; this.lvarInvocationReturnValue = mn.maxLocals + 2; // this.lvarSuspendableCalled = (verifyInstrumentation ? mn.maxLocals + 3 : -1); this.firstLocal = ((mn.access & Opcodes.ACC_STATIC) == Opcodes.ACC_STATIC) ? 0 : 1; } catch (UnsupportedOperationException ex) { throw new AnalyzerException(null, ex.getMessage(), ex); } }
From source file:jaspex.speculation.newspec.FlowFrame.java
License:Open Source License
FlowFrame computeNextFrame(FlowFrame previousFrame, AbstractInsnNode insn) throws AnalyzerException { if (previousFrame == null) throw new NullPointerException("Null previousFrame"); FlowFrame newFrame = newFrame(previousFrame); // Verificar que instruco produz uma frame if (insn.getOpcode() == ATHROW || returnOpcodes.contains(insn.getOpcode())) { throw new AssertionError(); }//ww w .j av a 2s . c o m if (!(insn instanceof FrameNode || insn instanceof LabelNode || insn instanceof LineNumberNode)) { try { newFrame.execute(insn, _interpreter); } catch (IndexOutOfBoundsException e) { throw new AnalyzerException(insn, "Error inside computeNextFrame", e); } catch (NullPointerException e) { throw new AnalyzerException(insn, "Error inside computeNextFrame", e); } } return newFrame; }