com.ibm.wala.shrikeBT
Class MethodEditor.Output

java.lang.Object
  extended by com.ibm.wala.shrikeBT.MethodEditor.Output
Enclosing class:
MethodEditor

public static final class MethodEditor.Output
extends java.lang.Object

Output is the interface that patches use to emit their code into a method body.


Method Summary
 void emit(Instruction i)
          Emit an instruction at the current point in the code.
 void emit(Instruction[] instrs)
          Emit a list of instructions at the current point in the code.
 void emit(Instruction[] instrs, ExceptionHandler[] handlers)
          Emit a list of instructions with some exception handlers at the current point in the code.
 void emit(Instruction i, ExceptionHandler[] handlers)
          Emit an instruction with some exception handlers at the current point in the code.
 void emitLabel(int label)
          Emit a label definition at the current point in the code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

emitLabel

public void emitLabel(int label)
Emit a label definition at the current point in the code. The label must have been previously allocated using MethodEditor.allocateLabel.


emit

public void emit(Instruction i)
Emit an instruction at the current point in the code.


emit

public void emit(Instruction i,
                 ExceptionHandler[] handlers)
Emit an instruction with some exception handlers at the current point in the code.


emit

public void emit(Instruction[] instrs)
Emit a list of instructions at the current point in the code.


emit

public void emit(Instruction[] instrs,
                 ExceptionHandler[] handlers)
Emit a list of instructions with some exception handlers at the current point in the code. All the instructions are covered by all the handlers.