Package oracle.toplink.libraries.asm

Examples of oracle.toplink.libraries.asm.Label


      }
      return sb.toString();
    }

    protected final Label getLabel( Object label) {
      Label lbl = ( Label) labels.get( label);
      if( lbl==null) {
        lbl = new Label();
        labels.put( label, lbl);
      }
      return lbl;
    }
View Full Code Here


            }
          } else if (insnNode instanceof LookupSwitchInsnNode) {
            LookupSwitchInsnNode lsi = (LookupSwitchInsnNode)insnNode;
            merge(indexes.get(lsi.dflt), current, subroutine);
            for (int j = 0; j < lsi.labels.size(); ++j) {
              Label label = (Label)lsi.labels.get(j);
              merge(indexes.get(label), current, subroutine);
            }
          } else if (insnNode instanceof TableSwitchInsnNode) {
            TableSwitchInsnNode tsi = (TableSwitchInsnNode)insnNode;
            merge(indexes.get(tsi.dflt), current, subroutine);
            for (int j = 0; j < tsi.labels.size(); ++j) {
              Label label = (Label)tsi.labels.get(j);
              merge(indexes.get(label), current, subroutine);
            }
          } else if (insnOpcode == RET) {
            if (subroutine == null) {
              throw new AnalyzerException(
View Full Code Here

   
    public final void end( String name) {
      Map vals = ( Map) pop();
      int min = Integer.parseInt(( String) vals.get( "min"));
      int max = Integer.parseInt(( String) vals.get( "max"));
      Label dflt = getLabel( vals.get( "dflt"));
      Label[] lbls = ( Label[])(( List) vals.get( "labels")).toArray( new Label[ 0]);
      getCodeVisitor().visitTableSwitchInsn( min, max, dflt, lbls);
    }
View Full Code Here

      push( vals);
    }
   
    public final void end( String name) {
      Map vals = ( Map) pop();
      Label dflt = getLabel( vals.get( "dflt"));
      List keyList = ( List) vals.get( "keys");
      Label[] lbls = ( Label[])(( List) vals.get( "labels")).toArray( new Label[ 0]);
      int[] keys = new int[ keyList.size()];
      for( int i = 0; i < keys.length; i++) {
        keys[ i] = Integer.parseInt(( String) keyList.get( i));
View Full Code Here

    public TryCatchRule( String path) {
      super( path);
    }

    public final void begin( String name, Attributes attrs) {
      Label start = getLabel( attrs.getValue( "start"));
      Label end = getLabel( attrs.getValue( "end"));
      Label handler = getLabel( attrs.getValue( "handler"));
      String type = attrs.getValue( "type");
      getCodeVisitor().visitTryCatchBlock( start, end, handler, type);
    }
View Full Code Here

      super( path);
    }

    public final void begin( String name, Attributes attrs) {
      int line = Integer.parseInt( attrs.getValue( "line"));
      Label start = getLabel( attrs.getValue( "start"));
      getCodeVisitor().visitLineNumber( line, start);
    }
View Full Code Here

    }

    public final void begin( String element, Attributes attrs) {
      String name = attrs.getValue( "name");
      String desc = attrs.getValue( "desc");
      Label start = getLabel( attrs.getValue( "start"));
      Label end = getLabel( attrs.getValue( "end"));
      int var = Integer.parseInt( attrs.getValue( "var"));
      getCodeVisitor().visitLocalVariable( name, desc, start, end, var);
    }
View Full Code Here

  public int read (ClassReader cr,
                   int off, char[] buf, int codeOff, Label[] labels) {
    int n = cr.readUnsignedShort(off);
    off += 2;
    if (labels[n] == null) {
      labels[n] = new Label();
    }
    label = labels[n];
    off = readTypeInfo(cr, off, locals, labels, buf,
                       cr.readUnsignedShort(codeOff + 2))//  maxLocals
    off = readTypeInfo(cr, off, stack, labels, buf,
View Full Code Here

        case StackMapType.ITEM_Uninitialized:  //
          int o = cr.readUnsignedShort(off);
          off += 2;
          if (labels[o] == null) {
            labels[o] = new Label();
          }
          typeInfo.setLabel(labels[o]);
          break;
      }
    }
View Full Code Here

    }
    return bv;
  }

  private Label getLabel( Label[] labels, int offset) {
    Label label = labels[ offset];
    if( label==null) {
      label = new Label();
      labels[ offset] = label;
    }
    return label;
  }
View Full Code Here

TOP

Related Classes of oracle.toplink.libraries.asm.Label

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.