Examples of LocalVariableTableAttribute


Examples of net.sf.rej.java.attribute.LocalVariableTableAttribute

        this.rows.add(ddr);
      }
      this.rows.add(mdr);
      this.classDef.addMethod(mdr);
      LineNumberTableAttribute lnAttr = null;
      LocalVariableTableAttribute lvs = null;
      if (codeAttr != null) {
        if (codeAttr.getAttributes() != null) {
          lnAttr = codeAttr.getAttributes().getLineNumberTable();
          lvs = codeAttr.getAttributes().getLocalVariableTable();
        }
        Code code = codeAttr.getCode();
        DecompilationContext dc = code.createDecompilationContext();
        dc.setPosition(0);
        for (Instruction instruction : code.getInstructions()) {

          if (instruction instanceof Label) {
            LabelRow lr = new LabelRow((Label) instruction, mdr);
            lr.setParentCode(code);
            this.rows.add(lr);
            mdr.addCodeRow(lr);
          } else {
            int lineNumber = -1;

            if (lnAttr != null) {
              lineNumber = lnAttr.getLineNumber(dc.getPosition());
            }
            if (lvs != null) {
              List locals = lvs
                  .getLocalVariable(dc.getPosition());
              for (int k = 0; k < locals.size(); k++) {
                LocalVariable lv = (LocalVariable) locals
                    .get(k);
                LocalVariableDefRow lvdr = new LocalVariableDefRow(
View Full Code Here

Examples of net.sf.rej.java.attribute.LocalVariableTableAttribute

  public void insertInstruction() {
    Object row = this.list.getSelectedValue();
    if (row instanceof MethodDefRow) {
      MethodDefRow mdr = (MethodDefRow) row;
      Code code = null;
      LocalVariableTableAttribute lvAttr = null;
      if (mdr.getMethod().getAttributes().getCode() != null) {
        code = mdr.getMethod().getAttributes().getCode().getCode();
        lvAttr = mdr.getMethod().getAttributes().getCode().getAttributes().getLocalVariableTable();
      }
      int pc = 0;
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.LocalVariableTableAttribute

                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
            }
            if (localVariableTableLayout.matches(codeFlags[i])) {
                LocalVariableTableAttribute lvta = new LocalVariableTableAttribute(
                        localVariableTableN[lvtIndex],
                        localVariableTableBciP[lvtIndex],
                        localVariableTableSpanO[lvtIndex],
                        localVariableTableNameRU[lvtIndex],
                        localVariableTableTypeRS[lvtIndex],
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.LocalVariableTableAttribute

                operandManager, // operandManager
                new ArrayList()
        );
        assertEquals(29, attribute.getLength());

        attribute.attributes.add(new LocalVariableTableAttribute(0, null, null,
                null, null, null));
        assertEquals(37, attribute.getLength());
    }
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.LocalVariableTableAttribute

                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
            }
            if (localVariableTableLayout.matches(codeFlags[i])) {
                LocalVariableTableAttribute lvta = new LocalVariableTableAttribute(
                        localVariableTableN[lvtIndex],
                        localVariableTableBciP[lvtIndex],
                        localVariableTableSpanO[lvtIndex],
                        localVariableTableNameRU[lvtIndex],
                        localVariableTableTypeRS[lvtIndex],
View Full Code Here

Examples of org.apache.harmony.pack200.bytecode.LocalVariableTableAttribute

                segment, // segment
                operandManager // operandManager
        );
        assertEquals(29, attribute.getLength());

        attribute.attributes.add(new LocalVariableTableAttribute(0, null, null,
                null, null, null));
        assertEquals(37, attribute.getLength());
    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute

                segment, // segment
                operandManager, // operandManager
                new ArrayList());
        assertEquals(29, attribute.getLength());

        attribute.attributes.add(new LocalVariableTableAttribute(0, null, null,
                null, null, null));
        assertEquals(37, attribute.getLength());
    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute

                segment, // segment
                operandManager, // operandManager
                new ArrayList());
        assertEquals(29, attribute.getLength());

        attribute.attributes.add(new LocalVariableTableAttribute(0, null, null,
                null, null, null));
        assertEquals(37, attribute.getLength());
    }
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute

                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
            }
            if (localVariableTableLayout.matches(codeFlags[i])) {
                LocalVariableTableAttribute lvta = new LocalVariableTableAttribute(
                        localVariableTableN[lvtIndex],
                        localVariableTableBciP[lvtIndex],
                        localVariableTableSpanO[lvtIndex],
                        localVariableTableNameRU[lvtIndex],
                        localVariableTableTypeRS[lvtIndex],
View Full Code Here

Examples of org.apache.harmony.unpack200.bytecode.LocalVariableTableAttribute

                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
            }
            if (localVariableTableLayout.matches(codeFlags[i])) {
                LocalVariableTableAttribute lvta = new LocalVariableTableAttribute(
                        localVariableTableN[lvtIndex],
                        localVariableTableBciP[lvtIndex],
                        localVariableTableSpanO[lvtIndex],
                        localVariableTableNameRU[lvtIndex],
                        localVariableTableTypeRS[lvtIndex],
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.