Package net.sf.rej.java.attribute

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


      modifyInstruction(cr.getPosition(), cr.getInstruction(), cr.getDecompilationContext().getLocalVariableTable());
      this.list.repaint();
    } else if (o instanceof MethodDefRow) {
      MethodDefRow mdr = (MethodDefRow) o;
      Method method = mdr.getMethod();
      CodeAttribute code = method.getAttributes().getCode();
      int flags = method.getAccessFlags();
      if (!AccessFlags.isNative(flags) && !AccessFlags.isAbstract(flags)) {
        this.methodEditor.invoke(method.getName(), method
            .getDescriptor(), method.getAccessFlags(), Integer.valueOf(
            code.getMaxStackSize()), Integer.valueOf(code
            .getMaxLocals()), method.getExceptions());
      } else {
        this.methodEditor.invoke(method.getName(), method
            .getDescriptor(), method.getAccessFlags(), null, null,
            method.getExceptions());
View Full Code Here


          TransferrableMethod transferrable = new TransferrableMethod();
          transferrable.setMethodName(method.getName());
          transferrable.setDescriptor(method.getDescriptor());
          transferrable.setAccessFlags(method.getAccessFlags());
          CodeAttribute ca = method.getAttributes().getCode();
          if (ca != null) {
            transferrable.setMaxStack(ca.getMaxStackSize());
            transferrable.setMaxLocals(ca.getMaxLocals());
            List<Instruction> list = new ArrayList<Instruction>();
            for (EditorRow er : mdr.getCodeRows()) {
              if (er instanceof CodeRow) {
                list.add(((CodeRow) er).getInstruction());
              } else if (er instanceof LabelRow) {
View Full Code Here

        SystemFacade.getInstance().performAction(ica);
      } else if (row instanceof MethodDefRow) {
        MethodDefRow mdr = (MethodDefRow) row;
        if (mdr.isClosing()) {
          // at the end of the code block
          CodeAttribute ca = mdr.getMethod().getAttributes()
              .getCode();
          Code code = ca.getCode();
          InsertCodeAction ica = new InsertCodeAction(this.classDef
              .getClassFile(), code, code.getMaxPC(), (Code) data);
          SystemFacade.getInstance().performAction(ica);
        } else {
          // at the beginning of the code block
          CodeAttribute ca = mdr.getMethod().getAttributes()
              .getCode();
          Code code = ca.getCode();
          InsertCodeAction ica = new InsertCodeAction(this.classDef
              .getClassFile(), code, 0, (Code) data);
          SystemFacade.getInstance().performAction(ica);
        }
      }
View Full Code Here

TOP

Related Classes of net.sf.rej.java.attribute.CodeAttribute

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.