jef.dna.instructions
Class BCOperations

java.lang.Object
  extended by jef.dna.instructions.BCOperations

public class BCOperations
extends java.lang.Object

BCOperations: ByteCodeOperations

Author:
ggiovanzana

Field Summary
protected static Logger logger
          Logger
static int MASK_16
          Bit mask used to exstrac a byte value from an int value.
static int SHIFT_8
          Position to shift.
 
Constructor Summary
BCOperations()
          Creates a new instance of BCOperations
 
Method Summary
static int applyOffset16(int[] byteCode, int offset)
          Computes new values of indexbyte1 and indexbyte2 after offset application.
static int applyOffset8(int[] byteCode, int offset)
          Computes new values of index with offset application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MASK_16

public static final int MASK_16
Bit mask used to exstrac a byte value from an int value.

See Also:
Constant Field Values

SHIFT_8

public static final int SHIFT_8
Position to shift.

See Also:
Constant Field Values

logger

protected static Logger logger
Logger

Constructor Detail

BCOperations

public BCOperations()
Creates a new instance of BCOperations

Method Detail

applyOffset8

public static int applyOffset8(int[] byteCode,
                               int offset)
Computes new values of index with offset application.

Parameters:
byteCode - The bytecode
offset - The offset to apply to all the bytecode references to constant pool table entries
Returns:
int Number of processed bytes.

applyOffset16

public static int applyOffset16(int[] byteCode,
                                int offset)
Computes new values of indexbyte1 and indexbyte2 after offset application.

Parameters:
byteCode - The bytecode to modify
offset - The offset to be applied to all the bytecode references to constant pool table entries
Returns:
int Number of processed bytes.