org.jboss.weld.util.bytecode
Class JumpUtils

java.lang.Object
  extended by org.jboss.weld.util.bytecode.JumpUtils

public class JumpUtils
extends Object

Utilities for writiting conditional statements in bytecode

Author:
Stuart Douglas

Constructor Summary
JumpUtils()
           
 
Method Summary
static JumpMarker addJumpInstruction(javassist.bytecode.Bytecode code)
          After writing the instruction that requires a branch offset (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JumpUtils

public JumpUtils()
Method Detail

addJumpInstruction

public static JumpMarker addJumpInstruction(javassist.bytecode.Bytecode code)
After writing the instruction that requires a branch offset (e.g. GOTO ) to the Bytecode call this method. This will write two zero bytes to the stream. When you have reached the position in the bytecode that you want the jump to end at call JumpMarker.mark(), this will update the branch offset to point to the next bytecode instruction that is added

Returns:
The JumpMarker that is used to set the conditionals end point


Copyright © 2013 Seam Framework. All Rights Reserved.