Examples of LineNumberTableAttribute


Examples of alt.jiapi.file.LineNumberTableAttribute

                // create private representation of
                // line number table, so that we can update
                // its offsets, when class is instrumented
                lineNumberTable = new LinkedList();
               
                LineNumberTableAttribute lnta = (LineNumberTableAttribute)ca.getAttribute(LineNumberTableAttribute.ATTRIBUTE_NAME);
               
                if (lnta != null) {
                    List entries = lnta.getEntries();
                    Iterator i = entries.iterator();
                    while(i.hasNext()) {
                        LineNumberTableAttribute.Entry entry =
                            (LineNumberTableAttribute.Entry)i.next();
                       
View Full Code Here

Examples of com.strobel.assembler.ir.attributes.LineNumberTableAttribute

    private static Integer findFirstLineNumber(final TypeDefinition type) {
        int minLineNumber = Integer.MAX_VALUE;

        for (final MethodDefinition method : type.getDeclaredMethods()) {
            final LineNumberTableAttribute attribute = SourceAttribute.find(AttributeNames.LineNumberTable, method.getSourceAttributes());

            if (attribute != null && !attribute.getEntries().isEmpty()) {
                final int firstLineNumber = attribute.getEntries().get(0).getLineNumber();

                if (firstLineNumber < minLineNumber) {
                    minLineNumber = firstLineNumber;
                }
            }
View Full Code Here

Examples of com.strobel.assembler.ir.attributes.LineNumberTableAttribute

            );
            space();
        }

        if (definition == null || !definition.isTypeInitializer()) {
            final LineNumberTableAttribute lineNumberTable = SourceAttribute.find(
                AttributeNames.LineNumberTable,
                definition != null ? definition.getSourceAttributes()
                                   : Collections.<SourceAttribute>emptyList()
            );
View Full Code Here

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

    list.add(mdr);

    Attributes attr = method.getAttributes();
    CodeAttribute codeAttr = attr.getCode();

    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();
      List instructions = code.getInstructions();
      dc.setPosition(0);
      for (int j = 0; j < instructions.size(); j++) {
        Instruction instruction = (Instruction) instructions.get(j);

        if (instruction instanceof Label) {
          LabelRow lr = new LabelRow((Label) instruction, mdr);
          lr.setParentCode(code);
          list.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++) {
View Full Code Here

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

    Attributes attrA = methodA.getAttributes();
    Attributes attrB = methodB.getAttributes();
    CodeAttribute codeAttrA = attrA.getCode();
    CodeAttribute codeAttrB = attrB.getCode();

    LineNumberTableAttribute lnAttrA = null;
    LineNumberTableAttribute lnAttrB = null;
    LocalVariableTableAttribute lvsA = null;
    LocalVariableTableAttribute lvsB = null;
    if (codeAttrA != null && codeAttrB != null) {
      // TODO: deal with the case where only one is null
      // ie, one method has code, the other doesn't
View Full Code Here

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

  }

  @Override
  public void processAttribute(IterationContext ic, Attribute attr) {
    if (attr instanceof LineNumberTableAttribute) {
      LineNumberTableAttribute lnAttr = (LineNumberTableAttribute) attr;
      Attributes attrs = ic.getCodeAttribute().getAttributes();
      Undoable u = new RemoveAttributeAction(attrs, lnAttr);
      if (batchMode) {
        u.execute();
      } else {
View Full Code Here

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

        DeprecatedAnnotationDefRow ddr = new DeprecatedAnnotationDefRow();
        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++) {
View Full Code Here

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

        int lineNumberIndex = 0;
        int lvtIndex = 0;
        int lvttIndex = 0;
        for (int i = 0; i < codeFlagsCount; i++) {
            if (lineNumberTableLayout.matches(codeFlags[i])) {
                LineNumberTableAttribute lnta = new LineNumberTableAttribute(
                        lineNumberTableN[lineNumberIndex],
                        lineNumberTableBciP[lineNumberIndex],
                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
View Full Code Here

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

        int lineNumberIndex = 0;
        int lvtIndex = 0;
        int lvttIndex = 0;
        for (int i = 0; i < codeFlagsCount; i++) {
            if (lineNumberTableLayout.matches(codeFlags[i])) {
                LineNumberTableAttribute lnta = new LineNumberTableAttribute(
                        lineNumberTableN[lineNumberIndex],
                        lineNumberTableBciP[lineNumberIndex],
                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
View Full Code Here

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

        int lineNumberIndex = 0;
        int lvtIndex = 0;
        int lvttIndex = 0;
        for (int i = 0; i < codeFlagsCount; i++) {
            if (lineNumberTableLayout.matches(codeFlags[i])) {
                LineNumberTableAttribute lnta = new LineNumberTableAttribute(
                        lineNumberTableN[lineNumberIndex],
                        lineNumberTableBciP[lineNumberIndex],
                        lineNumberTableLine[lineNumberIndex]);
                lineNumberIndex++;
                codeAttributes[i].add(lnta);
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.