@NotNull
 public static LabelNode firstLabelInChain(@NotNull LabelNode node) {
   LabelNode curNode = node;
   while (curNode.getPrevious() instanceof LabelNode) {
     curNode = (LabelNode) curNode.getPrevious();
   }
   return curNode;
 }
Esempio n. 2
0
 /**
  * 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);
 }
Esempio n. 4
0
 @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);
 }
Esempio n. 5
0
 /**
  * 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);
 }
Esempio n. 6
0
 @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);
 }
Esempio n. 8
0
 /** @see org.openmaji.implementation.tool.eclipse.hierarchy.nodes.Node#deactivate() */
 protected void deactivate() {
   getProxy().getConfigurationHandler().removeClient(configurationClient);
   disposeLifeCycleClient();
   super.deactivate();
 }
Esempio n. 9
0
 protected void activate(StructuredViewer viewer) {
   super.activate(viewer);
   getProxy().getLifeCycle().addClient(lifeCycleClient);
   getProxy().getConfigurationHandler().addClient(configurationClient);
 }
Esempio n. 10
0
 @Override
 public void accept(final MethodVisitor mv) {
   mv.visitJumpInsn(opcode, label.getLabel());
   acceptAnnotations(mv);
 }
Esempio n. 11
0
 public void accept(final MethodVisitor mv) {
   mv.visitJumpInsn(opcode, label.getLabel());
 }