@NotNull public static LabelNode firstLabelInChain(@NotNull LabelNode node) { LabelNode curNode = node; while (curNode.getPrevious() instanceof LabelNode) { curNode = (LabelNode) curNode.getPrevious(); } return curNode; }
/** * Makes the given visitor visit this try catch block. * * @param mv a method visitor. */ public void accept(final MethodVisitor mv) { mv.visitTryCatchBlock( start.getLabel(), end.getLabel(), handler == null ? null : handler.getLabel(), type); int n = visibleTypeAnnotations == null ? 0 : visibleTypeAnnotations.size(); for (int i = 0; i < n; ++i) { TypeAnnotationNode an = visibleTypeAnnotations.get(i); an.accept(mv.visitTryCatchAnnotation(an.typeRef, an.typePath, an.desc, true)); } n = invisibleTypeAnnotations == null ? 0 : invisibleTypeAnnotations.size(); for (int i = 0; i < n; ++i) { TypeAnnotationNode an = invisibleTypeAnnotations.get(i); an.accept(mv.visitTryCatchAnnotation(an.typeRef, an.typePath, an.desc, false)); } }
public void accept(final MethodVisitor mv) { Label[] labels = new Label[this.labels.size()]; for (int i = 0; i < labels.length; ++i) { labels[i] = ((LabelNode) this.labels.get(i)).getLabel(); } mv.visitTableSwitchInsn(min, max, dflt.getLabel(), labels); }
@Override public void accept(final MethodVisitor mv) { int[] keys = new int[this.keys.size()]; for (int i = 0; i < keys.length; ++i) { keys[i] = this.keys.get(i).intValue(); } Label[] labels = new Label[this.labels.size()]; for (int i = 0; i < labels.length; ++i) { labels[i] = this.labels.get(i).getLabel(); } mv.visitLookupSwitchInsn(dflt.getLabel(), keys, labels); }
/** * Makes the given visitor visit this try catch block. * * @param mv a method visitor. */ public void accept(final MethodVisitor mv) { mv.visitTryCatchBlock( start.getLabel(), end.getLabel(), handler == null ? null : handler.getLabel(), type); }
@Override public void accept(final MethodVisitor mv) { mv.visitLineNumber(line, start.getLabel()); }
/** * Makes the given visitor visit this local variable declaration. * * @param mv a method visitor. */ public void accept(final MethodVisitor mv) { mv.visitLocalVariable(name, desc, signature, start.getLabel(), end.getLabel(), index); }
/** @see org.openmaji.implementation.tool.eclipse.hierarchy.nodes.Node#deactivate() */ protected void deactivate() { getProxy().getConfigurationHandler().removeClient(configurationClient); disposeLifeCycleClient(); super.deactivate(); }
protected void activate(StructuredViewer viewer) { super.activate(viewer); getProxy().getLifeCycle().addClient(lifeCycleClient); getProxy().getConfigurationHandler().addClient(configurationClient); }
@Override public void accept(final MethodVisitor mv) { mv.visitJumpInsn(opcode, label.getLabel()); acceptAnnotations(mv); }
public void accept(final MethodVisitor mv) { mv.visitJumpInsn(opcode, label.getLabel()); }