Package net.sf.rej.util

Examples of net.sf.rej.util.ByteSerializer


    }

    public byte[] getLineNumberData() {
      validateIfNecessary();

      ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.mappings.size());
        for (Entry<Integer, Integer> entry : this.mappings.entrySet()) {
            ser.addShort(entry.getKey());
            ser.addShort(entry.getValue());
        }

        return ser.getBytes();
    }
View Full Code Here


        }
        return null;
    }

    public byte[] getData() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.attributes.size());
        for (Attribute attr : this.attributes) {
            ser.addBytes(attr.getData());
        }

        return ser.getBytes();
    }
View Full Code Here

        return labels;
    }

    @Override
    public byte[] getPayload() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.localVariables.size());
        for (LocalVariable lv : this.localVariables) {
            ser.addBytes(lv.getData());
        }
        return ser.getBytes();
    }
View Full Code Here

        this.signatureIndex = parser.getShortAsInt();
  }
 
  @Override
  public byte[] getPayload() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.signatureIndex);
       
        return ser.getBytes();
  }
View Full Code Here

                + " handlerpc " + getHandlerPc() + " catch type " + this.catchType
                + "(" + this.pool.get(this.catchType) + ")";
    }

    public byte[] getData() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(getStartPc());
        ser.addShort(getEndPc());
        ser.addShort(getHandlerPc());
        ser.addShort(this.catchType);

        return ser.getBytes();
    }
View Full Code Here

                + this.pool.get(this.descriptorIndex) + ") accessflags 0x"
                + ByteToolkit.getHexString(this.accessFlags, 4);
    }

    public byte[] getData() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.accessFlags);
        ser.addShort(this.nameIndex);
        ser.addShort(this.descriptorIndex);
        ser.addBytes(this.attributes.getData());

        return ser.getBytes();
    }
View Full Code Here

   
    return null;
  }

    public byte[] getData() {
        ByteSerializer ser = new ByteSerializer(true);
        ser.addShort(this.accessFlags);
        ser.addShort(this.nameIndex);
        ser.addShort(this.descriptorIndex);
        ser.addBytes(this.attributes.getData());

        return ser.getBytes();
    }
View Full Code Here

        out.println("---- code ends ----");
    }

    public byte[] getData() {
        updateLabelPositions();
        ByteSerializer ser = new ByteSerializer(true);
        DecompilationContext dc = createDecompilationContext();
        for (Instruction instruction : this.code) {
            ser.addBytes(instruction.getData(dc));
            dc.incrementPosition(instruction);
        }

        return ser.getBytes();
    }
View Full Code Here

  public Exceptions() {
  }

  public byte[] getData() {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addShort(this.exceptions.size());
    for (int i = 0; i < this.exceptions.size(); i++) {
      ExceptionInfo e = this.exceptions.get(i);
      ser.addBytes(e.getData());
    }

    return ser.getBytes();
  }
View Full Code Here

    return info.getDescriptor();
  }

  @Override
  public byte[] getData() {
    ByteSerializer ser = new ByteSerializer(true);
    ser.addByte(getType());
    ser.addShort(this.classIndex);
    ser.addShort(this.nameAndTypeIndex);

    return ser.getBytes();
  }
View Full Code Here

TOP

Related Classes of net.sf.rej.util.ByteSerializer

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.