Class ByteCode
There are two classes of methods. The first ones are for creating objects that directly represent opcodes. These effectively wrap one of the opcode constants. The others do something more clever. For example, make_if emits something that is equivalent to a normal Java if statement.
Generic types are supported using the factory methods that take ParametricType arguments.
- Author:
- Thomas Down, Matthew Pocock
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
static final byte
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Instruction
Return the Instruction object for the aaload instruction.static Instruction
Return the Instruction object for the aastore instruction.static Instruction
Return the Instruction object for the aconst_null instruction.make_add
(ParametricType type) static Instruction
make_and
(ParametricType type) static Instruction
Return the Instruction object for the areturn instruction.static ParametricCodeGenerator
Load an element of a parametric type to an array.static Instruction
Return the Instruction object for the arraylength instruction.static ParametricCodeGenerator
Store an element of a parametric type to an array.static Instruction
static Instruction
Return the Instruction object for the athrow instruction.static Instruction
Return the Instruction object for the baload instruction.static Instruction
Return the Instruction object for the bastore instruction.static Instruction
Return the Instruction object for the breakpoint instruction.static Instruction
Return the Instruction object for the caload instruction.make_cast
(ParametricType from, ParametricType to) static Instruction
Return the Instruction object for the castore instruction.static Instruction
make_checkcast
(CodeClass clazz) make_cmpg
(ParametricType type) make_cmpl
(ParametricType type) static Instruction
make_d2f()
Return the Instruction object for the d2f instruction.static Instruction
make_d2i()
Return the Instruction object for the d2i instruction.static Instruction
make_d2l()
Return the Instruction object for the d2l instruction.static Instruction
Return the Instruction object for the dadd instruction.static Instruction
Return the Instruction object for the daload instruction.static Instruction
Return the Instruction object for the dastore instruction.static Instruction
Return the Instruction object for the dcmpg instruction.static Instruction
Return the Instruction object for the dcmpl instruction.static Instruction
make_dconst
(double d) static Instruction
Return the Instruction object for the ddiv instruction.make_div
(ParametricType type) static Instruction
static Instruction
Return the Instruction object for the dmul instruction.static Instruction
Return the Instruction object for the dneg instruction.static Instruction
Return the Instruction object for the drem instruction.static Instruction
Return the Instruction object for the dreturn instruction.static Instruction
static Instruction
Return the Instruction object for the dsub instruction.static Instruction
make_dup()
Return the Instruction object for the dup instruction.make_dup
(ParametricType type) static Instruction
Return the Instruction object for the dup_x1 instruction.static Instruction
Return the Instruction object for the dup_x2 instruction.static Instruction
Return the Instruction object for the dup2 instruction.static Instruction
Return the Instruction object for the dup2_x1 instruction.static Instruction
Return the Instruction object for the dup2_x2 instruction.static Instruction
make_f2d()
Return the Instruction object for the f2d instruction.static Instruction
make_f2i()
Return the Instruction object for the f2i instruction.static Instruction
make_f2l()
Return the Instruction object for the f2l instruction.static Instruction
Return the Instruction object for the fadd instruction.static Instruction
Return the Instruction object for the faload instruction.static Instruction
Return the Instruction object for the fastore instruction.static Instruction
Return the Instruction object for the fcmpg instruction.static Instruction
Return the Instruction object for the fcmpl instruction.static Instruction
make_fconst
(float f) static Instruction
Return the Instruction object for the fdiv instruction.static Instruction
static Instruction
Return the Instruction object for the fmul instruction.static Instruction
Return the Instruction object for the fneg instruction.static Instruction
Return the Instruction object for the frem instruction.static Instruction
Return the Instruction object for the freturn instruction.static Instruction
static Instruction
Return the Instruction object for the fsub instruction.static Instruction
static Instruction
static Instruction
static Instruction
make_i2b()
Return the Instruction object for the i2b instruction.static Instruction
make_i2c()
Return the Instruction object for the i2c instruction.static Instruction
make_i2d()
Return the Instruction object for the i2d instruction.static Instruction
make_i2f()
Return the Instruction object for the i2f instruction.static Instruction
make_i2l()
Return the Instruction object for the i2l instruction.static Instruction
make_i2s()
Return the Instruction object for the i2s instruction.static Instruction
Return the Instruction object for the iadd instruction.static Instruction
Return the Instruction object for the iaload instruction.static Instruction
Return the Instruction object for the iand instruction.static Instruction
Return the Instruction object for the iastore instruction.static Instruction
make_iconst
(int i) static Instruction
Return the Instruction object for the idiv instruction.static Instruction
Make an if Instruction for the opcode and label.static Instruction
Return the Instruction object for the if_acmpeq instruction.static Instruction
Return the Instruction object for the if_acmpne instruction.static Instruction
Return the Instruction object for the if_icmpeq instruction.static Instruction
Return the Instruction object for the if_icmpge instruction.static Instruction
Return the Instruction object for the if_icmpgt instruction.static Instruction
Return the Instruction object for the if_icmple instruction.static Instruction
Return the Instruction object for the if_icmplt instruction.static Instruction
Return the Instruction object for the if_icmpne instruction.static Instruction
Return the Instruction object for the ifeq instruction.static Instruction
Return the Instruction object for the ifge instruction.static Instruction
Return the Instruction object for the ifgt instruction.static Instruction
Return the Instruction object for the ifle instruction.static Instruction
Return the Instruction object for the iflt instruction.static Instruction
Return the Instruction object for the ifne instruction.static Instruction
Return the Instruction object for the ifnonnull instruction.static Instruction
make_ifnull
(Label l) Return the Instruction object for the ifnull instruction.static Instruction
static Instruction
Return the Instruction object for the impdep1 instruction.static Instruction
Return the Instruction object for the impdep2 instruction.static Instruction
Return the Instruction object for the imul instruction.static Instruction
Return the Instruction object for the ineg instruction.static Instruction
make_instanceof
(CodeClass clazz) static Instruction
Make an invoke opcode that is suited to the method.static Instruction
static Instruction
static Instruction
static Instruction
static Instruction
Return the Instruction object for the invokevirtual_quick_w instruction.static Instruction
make_ior()
Return the Instruction object for the ior instruction.static Instruction
Return the Instruction object for the irem instruction.static Instruction
Return the Instruction object for the ireturn instruction.static Instruction
Return the Instruction object for the ishl instruction.static Instruction
Return the Instruction object for the ishr instruction.static Instruction
static Instruction
Return the Instruction object for the isub instruction.static Instruction
Return the Instruction object for the iushr instruction.static Instruction
Return the Instruction object for the ixor instruction.static Instruction
static Instruction
make_l2d()
Return the Instruction object for the l2d instruction.static Instruction
make_l2f()
Return the Instruction object for the l2f instruction.static Instruction
make_l2i()
Return the Instruction object for the l2i instruction.static Instruction
Return the Instruction object for the ladd instruction.static Instruction
Return the Instruction object for the laload instruction.static Instruction
Return the Instruction object for the land instruction.static Instruction
Return the Instruction object for the lastore instruction.static Instruction
Return the Instruction object for the lcmp instruction.static Instruction
make_lconst
(long l) static Instruction
Return the Instruction object for the ldiv instruction.static Instruction
static Instruction
Return the Instruction object for the lmul instruction.static Instruction
Return the Instruction object for the lneg instruction.make_load
(ParametricType type, LocalVariable lv) Load an item of a parametric type from a local variable.static Instruction
make_lor()
Return the Instruction object for the lor instruction.static Instruction
Return the Instruction object for the lrem instruction.static Instruction
Return the Instruction object for the lreturn instruction.static Instruction
Return the Instruction object for the lshl instruction.static Instruction
Return the Instruction object for the lshr instruction.static Instruction
static Instruction
Return the Instruction object for the lsub instruction.static Instruction
Return the Instruction object for the lushr instruction.static Instruction
Return the Instruction object for the lxor instruction.static CodeGenerator
make_markLabel
(Label lab) static Instruction
Return the Instruction object for the monitorenter instruction.static Instruction
Return the Instruction object for the monitorexit instruction.make_mul
(ParametricType type) make_neg
(ParametricType type) static Instruction
static Instruction
make_newarray
(CodeClass clazz) static ParametricCodeGenerator
make_newraray
(ParametricType type) static Instruction
make_nop()
Return the Instruction object for the nop instruction.make_or
(ParametricType type) static Instruction
make_pop()
Return the Instruction object for the pop instruction.static Instruction
Return the Instruction object for the pop2 instruction.static Instruction
static Instruction
make_rem
(ParametricType type) static Instruction
Return the Instruction object for the return instruction.static Instruction
make_return
(CodeClass clazz) Creates the return Instruction suitable for a given class or type.static Instruction
make_return
(CodeMethod method) A convenient one-stop method to get a return statement suitable for a method.make_return
(ParametricType type) Make a return statement for the parametric type.static Instruction
Return the Instruction object for the saload instruction.static Instruction
Return the Instruction object for the sastore instruction.make_save
(ParametricType type, LocalVariable lv) Store an item of a parametric type to a local variable.static Instruction
make_shiftLeft
(ParametricType type) make_sub
(ParametricType type) static Instruction
Return the Instruction object for the swap instruction.static CodeGenerator
Synchronize the processing of an entire block of code on the object on the top of the stack.static CodeGenerator
make_synchronizedBlock
(LocalVariable lockVar, CodeGenerator code) Synchronize the processing of an entire block of code on a local variable.static Instruction
Return the Instruction object for the wide instruction.make_xor
(ParametricType type)
-
Field Details
-
op_nop
public static final byte op_nop- See Also:
-
op_aconst_null
public static final byte op_aconst_null- See Also:
-
op_iconst_m1
public static final byte op_iconst_m1- See Also:
-
op_iconst_0
public static final byte op_iconst_0- See Also:
-
op_iconst_1
public static final byte op_iconst_1- See Also:
-
op_iconst_2
public static final byte op_iconst_2- See Also:
-
op_iconst_3
public static final byte op_iconst_3- See Also:
-
op_iconst_4
public static final byte op_iconst_4- See Also:
-
op_iconst_5
public static final byte op_iconst_5- See Also:
-
op_lconst_0
public static final byte op_lconst_0- See Also:
-
op_lconst_1
public static final byte op_lconst_1- See Also:
-
op_fconst_0
public static final byte op_fconst_0- See Also:
-
op_fconst_1
public static final byte op_fconst_1- See Also:
-
op_fconst_2
public static final byte op_fconst_2- See Also:
-
op_dconst_0
public static final byte op_dconst_0- See Also:
-
op_dconst_1
public static final byte op_dconst_1- See Also:
-
op_bipush
public static final byte op_bipush- See Also:
-
op_sipush
public static final byte op_sipush- See Also:
-
op_ldc
public static final byte op_ldc- See Also:
-
op_ldc_w
public static final byte op_ldc_w- See Also:
-
op_ldc2_w
public static final byte op_ldc2_w- See Also:
-
op_iload
public static final byte op_iload- See Also:
-
op_lload
public static final byte op_lload- See Also:
-
op_fload
public static final byte op_fload- See Also:
-
op_dload
public static final byte op_dload- See Also:
-
op_aload
public static final byte op_aload- See Also:
-
op_iload_0
public static final byte op_iload_0- See Also:
-
op_iload_1
public static final byte op_iload_1- See Also:
-
op_iload_2
public static final byte op_iload_2- See Also:
-
op_iload_3
public static final byte op_iload_3- See Also:
-
op_lload_0
public static final byte op_lload_0- See Also:
-
op_lload_1
public static final byte op_lload_1- See Also:
-
op_lload_2
public static final byte op_lload_2- See Also:
-
op_lload_3
public static final byte op_lload_3- See Also:
-
op_fload_0
public static final byte op_fload_0- See Also:
-
op_fload_1
public static final byte op_fload_1- See Also:
-
op_fload_2
public static final byte op_fload_2- See Also:
-
op_fload_3
public static final byte op_fload_3- See Also:
-
op_dload_0
public static final byte op_dload_0- See Also:
-
op_dload_1
public static final byte op_dload_1- See Also:
-
op_dload_2
public static final byte op_dload_2- See Also:
-
op_dload_3
public static final byte op_dload_3- See Also:
-
op_aload_0
public static final byte op_aload_0- See Also:
-
op_aload_1
public static final byte op_aload_1- See Also:
-
op_aload_2
public static final byte op_aload_2- See Also:
-
op_aload_3
public static final byte op_aload_3- See Also:
-
op_iaload
public static final byte op_iaload- See Also:
-
op_laload
public static final byte op_laload- See Also:
-
op_faload
public static final byte op_faload- See Also:
-
op_daload
public static final byte op_daload- See Also:
-
op_aaload
public static final byte op_aaload- See Also:
-
op_baload
public static final byte op_baload- See Also:
-
op_caload
public static final byte op_caload- See Also:
-
op_saload
public static final byte op_saload- See Also:
-
op_istore
public static final byte op_istore- See Also:
-
op_lstore
public static final byte op_lstore- See Also:
-
op_fstore
public static final byte op_fstore- See Also:
-
op_dstore
public static final byte op_dstore- See Also:
-
op_astore
public static final byte op_astore- See Also:
-
op_istore_0
public static final byte op_istore_0- See Also:
-
op_istore_1
public static final byte op_istore_1- See Also:
-
op_istore_2
public static final byte op_istore_2- See Also:
-
op_istore_3
public static final byte op_istore_3- See Also:
-
op_lstore_0
public static final byte op_lstore_0- See Also:
-
op_lstore_1
public static final byte op_lstore_1- See Also:
-
op_lstore_2
public static final byte op_lstore_2- See Also:
-
op_lstore_3
public static final byte op_lstore_3- See Also:
-
op_fstore_0
public static final byte op_fstore_0- See Also:
-
op_fstore_1
public static final byte op_fstore_1- See Also:
-
op_fstore_2
public static final byte op_fstore_2- See Also:
-
op_fstore_3
public static final byte op_fstore_3- See Also:
-
op_dstore_0
public static final byte op_dstore_0- See Also:
-
op_dstore_1
public static final byte op_dstore_1- See Also:
-
op_dstore_2
public static final byte op_dstore_2- See Also:
-
op_dstore_3
public static final byte op_dstore_3- See Also:
-
op_astore_0
public static final byte op_astore_0- See Also:
-
op_astore_1
public static final byte op_astore_1- See Also:
-
op_astore_2
public static final byte op_astore_2- See Also:
-
op_astore_3
public static final byte op_astore_3- See Also:
-
op_iastore
public static final byte op_iastore- See Also:
-
op_lastore
public static final byte op_lastore- See Also:
-
op_fastore
public static final byte op_fastore- See Also:
-
op_dastore
public static final byte op_dastore- See Also:
-
op_aastore
public static final byte op_aastore- See Also:
-
op_bastore
public static final byte op_bastore- See Also:
-
op_castore
public static final byte op_castore- See Also:
-
op_sastore
public static final byte op_sastore- See Also:
-
op_pop
public static final byte op_pop- See Also:
-
op_pop2
public static final byte op_pop2- See Also:
-
op_dup
public static final byte op_dup- See Also:
-
op_dup_x1
public static final byte op_dup_x1- See Also:
-
op_dup_x2
public static final byte op_dup_x2- See Also:
-
op_dup2
public static final byte op_dup2- See Also:
-
op_dup2_x1
public static final byte op_dup2_x1- See Also:
-
op_dup2_x2
public static final byte op_dup2_x2- See Also:
-
op_swap
public static final byte op_swap- See Also:
-
op_iadd
public static final byte op_iadd- See Also:
-
op_ladd
public static final byte op_ladd- See Also:
-
op_fadd
public static final byte op_fadd- See Also:
-
op_dadd
public static final byte op_dadd- See Also:
-
op_isub
public static final byte op_isub- See Also:
-
op_lsub
public static final byte op_lsub- See Also:
-
op_fsub
public static final byte op_fsub- See Also:
-
op_dsub
public static final byte op_dsub- See Also:
-
op_imul
public static final byte op_imul- See Also:
-
op_lmul
public static final byte op_lmul- See Also:
-
op_fmul
public static final byte op_fmul- See Also:
-
op_dmul
public static final byte op_dmul- See Also:
-
op_idiv
public static final byte op_idiv- See Also:
-
op_ldiv
public static final byte op_ldiv- See Also:
-
op_fdiv
public static final byte op_fdiv- See Also:
-
op_ddiv
public static final byte op_ddiv- See Also:
-
op_irem
public static final byte op_irem- See Also:
-
op_lrem
public static final byte op_lrem- See Also:
-
op_frem
public static final byte op_frem- See Also:
-
op_drem
public static final byte op_drem- See Also:
-
op_ineg
public static final byte op_ineg- See Also:
-
op_lneg
public static final byte op_lneg- See Also:
-
op_fneg
public static final byte op_fneg- See Also:
-
op_dneg
public static final byte op_dneg- See Also:
-
op_ishl
public static final byte op_ishl- See Also:
-
op_lshl
public static final byte op_lshl- See Also:
-
op_ishr
public static final byte op_ishr- See Also:
-
op_lshr
public static final byte op_lshr- See Also:
-
op_iushr
public static final byte op_iushr- See Also:
-
op_lushr
public static final byte op_lushr- See Also:
-
op_iand
public static final byte op_iand- See Also:
-
op_land
public static final byte op_land- See Also:
-
op_ior
public static final byte op_ior- See Also:
-
op_lor
public static final byte op_lor- See Also:
-
op_ixor
public static final byte op_ixor- See Also:
-
op_lxor
public static final byte op_lxor- See Also:
-
op_iinc
public static final byte op_iinc- See Also:
-
op_i2l
public static final byte op_i2l- See Also:
-
op_i2f
public static final byte op_i2f- See Also:
-
op_i2d
public static final byte op_i2d- See Also:
-
op_l2i
public static final byte op_l2i- See Also:
-
op_l2f
public static final byte op_l2f- See Also:
-
op_l2d
public static final byte op_l2d- See Also:
-
op_f2i
public static final byte op_f2i- See Also:
-
op_f2l
public static final byte op_f2l- See Also:
-
op_f2d
public static final byte op_f2d- See Also:
-
op_d2i
public static final byte op_d2i- See Also:
-
op_d2l
public static final byte op_d2l- See Also:
-
op_d2f
public static final byte op_d2f- See Also:
-
op_i2b
public static final byte op_i2b- See Also:
-
op_i2c
public static final byte op_i2c- See Also:
-
op_i2s
public static final byte op_i2s- See Also:
-
op_lcmp
public static final byte op_lcmp- See Also:
-
op_fcmpl
public static final byte op_fcmpl- See Also:
-
op_fcmpg
public static final byte op_fcmpg- See Also:
-
op_dcmpl
public static final byte op_dcmpl- See Also:
-
op_dcmpg
public static final byte op_dcmpg- See Also:
-
op_ifeq
public static final byte op_ifeq- See Also:
-
op_ifne
public static final byte op_ifne- See Also:
-
op_iflt
public static final byte op_iflt- See Also:
-
op_ifge
public static final byte op_ifge- See Also:
-
op_ifgt
public static final byte op_ifgt- See Also:
-
op_ifle
public static final byte op_ifle- See Also:
-
op_if_icmpeq
public static final byte op_if_icmpeq- See Also:
-
op_if_icmpne
public static final byte op_if_icmpne- See Also:
-
op_if_icmplt
public static final byte op_if_icmplt- See Also:
-
op_if_icmpge
public static final byte op_if_icmpge- See Also:
-
op_if_icmpgt
public static final byte op_if_icmpgt- See Also:
-
op_if_icmple
public static final byte op_if_icmple- See Also:
-
op_if_acmpeq
public static final byte op_if_acmpeq- See Also:
-
op_if_acmpne
public static final byte op_if_acmpne- See Also:
-
op_goto
public static final byte op_goto- See Also:
-
op_jsr
public static final byte op_jsr- See Also:
-
op_ret
public static final byte op_ret- See Also:
-
op_tableswitch
public static final byte op_tableswitch- See Also:
-
op_lookupswitch
public static final byte op_lookupswitch- See Also:
-
op_ireturn
public static final byte op_ireturn- See Also:
-
op_lreturn
public static final byte op_lreturn- See Also:
-
op_freturn
public static final byte op_freturn- See Also:
-
op_dreturn
public static final byte op_dreturn- See Also:
-
op_areturn
public static final byte op_areturn- See Also:
-
op_return
public static final byte op_return- See Also:
-
op_getstatic
public static final byte op_getstatic- See Also:
-
op_putstatic
public static final byte op_putstatic- See Also:
-
op_getfield
public static final byte op_getfield- See Also:
-
op_putfield
public static final byte op_putfield- See Also:
-
op_invokevirtual
public static final byte op_invokevirtual- See Also:
-
op_invokespecial
public static final byte op_invokespecial- See Also:
-
op_invokestatic
public static final byte op_invokestatic- See Also:
-
op_invokeinterface
public static final byte op_invokeinterface- See Also:
-
op_new
public static final byte op_new- See Also:
-
op_newarray
public static final byte op_newarray- See Also:
-
op_anewarray
public static final byte op_anewarray- See Also:
-
op_arraylength
public static final byte op_arraylength- See Also:
-
op_athrow
public static final byte op_athrow- See Also:
-
op_checkcast
public static final byte op_checkcast- See Also:
-
op_instanceof
public static final byte op_instanceof- See Also:
-
op_monitorenter
public static final byte op_monitorenter- See Also:
-
op_monitorexit
public static final byte op_monitorexit- See Also:
-
op_wide
public static final byte op_wide- See Also:
-
op_multianewarray
public static final byte op_multianewarray- See Also:
-
op_ifnull
public static final byte op_ifnull- See Also:
-
op_ifnonnull
public static final byte op_ifnonnull- See Also:
-
op_goto_w
public static final byte op_goto_w- See Also:
-
op_jsr_w
public static final byte op_jsr_w- See Also:
-
op_breakpoint
public static final byte op_breakpoint- See Also:
-
op_ldc_quick
public static final byte op_ldc_quick- See Also:
-
op_ldc_w_quick
public static final byte op_ldc_w_quick- See Also:
-
op_ldc2_w_quick
public static final byte op_ldc2_w_quick- See Also:
-
op_getfield_quick
public static final byte op_getfield_quick- See Also:
-
op_putfield_quick
public static final byte op_putfield_quick- See Also:
-
op_getfield2_quick
public static final byte op_getfield2_quick- See Also:
-
op_putfield2_quick
public static final byte op_putfield2_quick- See Also:
-
op_getstatic_quick
public static final byte op_getstatic_quick- See Also:
-
op_putstatic_quick
public static final byte op_putstatic_quick- See Also:
-
op_getstatic2_quick
public static final byte op_getstatic2_quick- See Also:
-
op_putstatic2_quick
public static final byte op_putstatic2_quick- See Also:
-
op_invokevirtual_quick
public static final byte op_invokevirtual_quick- See Also:
-
op_invokenonvirtual_quick
public static final byte op_invokenonvirtual_quick- See Also:
-
op_invokesuper_quick
public static final byte op_invokesuper_quick- See Also:
-
op_invokestatic_quick
public static final byte op_invokestatic_quick- See Also:
-
op_invokeinterface_quick
public static final byte op_invokeinterface_quick- See Also:
-
op_invokevirtualobject_quick
public static final byte op_invokevirtualobject_quick- See Also:
-
op_new_quick
public static final byte op_new_quick- See Also:
-
op_anewarray_quick
public static final byte op_anewarray_quick- See Also:
-
op_multianewarray_quick
public static final byte op_multianewarray_quick- See Also:
-
op_checkcast_quick
public static final byte op_checkcast_quick- See Also:
-
op_instanceof_quick
public static final byte op_instanceof_quick- See Also:
-
op_invokevirtual_quick_w
public static final byte op_invokevirtual_quick_w- See Also:
-
op_getfield_quick_w
public static final byte op_getfield_quick_w- See Also:
-
op_putfield_quick_w
public static final byte op_putfield_quick_w- See Also:
-
op_impdep1
public static final byte op_impdep1- See Also:
-
op_impdep2
public static final byte op_impdep2- See Also:
-
-
Constructor Details
-
ByteCode
public ByteCode()
-
-
Method Details
-
make_iconst
-
make_sconst
-
make_dconst
-
make_lconst
-
make_fconst
-
make_invokevirtual
-
make_invokespecial
-
make_invokestatic
-
make_invokeinterface
-
make_getfield
-
make_putfield
-
make_getstatic
-
make_putstatic
-
make_iload
- Throws:
CodeException
-
make_lload
- Throws:
CodeException
-
make_fload
- Throws:
CodeException
-
make_dload
- Throws:
CodeException
-
make_aload
- Throws:
CodeException
-
make_istore
- Throws:
CodeException
-
make_lstore
- Throws:
CodeException
-
make_fstore
- Throws:
CodeException
-
make_dstore
- Throws:
CodeException
-
make_astore
- Throws:
CodeException
-
make_ifeq
Return the Instruction object for the ifeq instruction. -
make_ifne
Return the Instruction object for the ifne instruction. -
make_iflt
Return the Instruction object for the iflt instruction. -
make_ifge
Return the Instruction object for the ifge instruction. -
make_ifgt
Return the Instruction object for the ifgt instruction. -
make_ifle
Return the Instruction object for the ifle instruction. -
make_if_icmpeq
Return the Instruction object for the if_icmpeq instruction. -
make_if_icmpne
Return the Instruction object for the if_icmpne instruction. -
make_if_icmplt
Return the Instruction object for the if_icmplt instruction. -
make_if_icmpge
Return the Instruction object for the if_icmpge instruction. -
make_if_icmpgt
Return the Instruction object for the if_icmpgt instruction. -
make_if_icmple
Return the Instruction object for the if_icmple instruction. -
make_if_acmpeq
Return the Instruction object for the if_acmpeq instruction. -
make_if_acmpne
Return the Instruction object for the if_acmpne instruction. -
make_ifnull
Return the Instruction object for the ifnull instruction. -
make_ifnonnull
Return the Instruction object for the ifnonnull instruction. -
make_goto
-
make_jsr
-
make_nop
Return the Instruction object for the nop instruction. -
make_aconst_null
Return the Instruction object for the aconst_null instruction. -
make_iaload
Return the Instruction object for the iaload instruction. -
make_laload
Return the Instruction object for the laload instruction. -
make_faload
Return the Instruction object for the faload instruction. -
make_daload
Return the Instruction object for the daload instruction. -
make_aaload
Return the Instruction object for the aaload instruction. -
make_baload
Return the Instruction object for the baload instruction. -
make_caload
Return the Instruction object for the caload instruction. -
make_saload
Return the Instruction object for the saload instruction. -
make_iastore
Return the Instruction object for the iastore instruction. -
make_lastore
Return the Instruction object for the lastore instruction. -
make_fastore
Return the Instruction object for the fastore instruction. -
make_dastore
Return the Instruction object for the dastore instruction. -
make_aastore
Return the Instruction object for the aastore instruction. -
make_bastore
Return the Instruction object for the bastore instruction. -
make_castore
Return the Instruction object for the castore instruction. -
make_sastore
Return the Instruction object for the sastore instruction. -
make_pop
Return the Instruction object for the pop instruction. -
make_pop2
Return the Instruction object for the pop2 instruction. -
make_dup
Return the Instruction object for the dup instruction. -
make_dup_x1
Return the Instruction object for the dup_x1 instruction. -
make_dup_x2
Return the Instruction object for the dup_x2 instruction. -
make_dup2
Return the Instruction object for the dup2 instruction. -
make_dup2_x1
Return the Instruction object for the dup2_x1 instruction. -
make_dup2_x2
Return the Instruction object for the dup2_x2 instruction. -
make_swap
Return the Instruction object for the swap instruction. -
make_iadd
Return the Instruction object for the iadd instruction. -
make_ladd
Return the Instruction object for the ladd instruction. -
make_fadd
Return the Instruction object for the fadd instruction. -
make_dadd
Return the Instruction object for the dadd instruction. -
make_isub
Return the Instruction object for the isub instruction. -
make_lsub
Return the Instruction object for the lsub instruction. -
make_fsub
Return the Instruction object for the fsub instruction. -
make_dsub
Return the Instruction object for the dsub instruction. -
make_imul
Return the Instruction object for the imul instruction. -
make_lmul
Return the Instruction object for the lmul instruction. -
make_fmul
Return the Instruction object for the fmul instruction. -
make_dmul
Return the Instruction object for the dmul instruction. -
make_idiv
Return the Instruction object for the idiv instruction. -
make_ldiv
Return the Instruction object for the ldiv instruction. -
make_fdiv
Return the Instruction object for the fdiv instruction. -
make_ddiv
Return the Instruction object for the ddiv instruction. -
make_irem
Return the Instruction object for the irem instruction. -
make_lrem
Return the Instruction object for the lrem instruction. -
make_frem
Return the Instruction object for the frem instruction. -
make_drem
Return the Instruction object for the drem instruction. -
make_ineg
Return the Instruction object for the ineg instruction. -
make_lneg
Return the Instruction object for the lneg instruction. -
make_fneg
Return the Instruction object for the fneg instruction. -
make_dneg
Return the Instruction object for the dneg instruction. -
make_ishl
Return the Instruction object for the ishl instruction. -
make_lshl
Return the Instruction object for the lshl instruction. -
make_ishr
Return the Instruction object for the ishr instruction. -
make_lshr
Return the Instruction object for the lshr instruction. -
make_iushr
Return the Instruction object for the iushr instruction. -
make_lushr
Return the Instruction object for the lushr instruction. -
make_iand
Return the Instruction object for the iand instruction. -
make_land
Return the Instruction object for the land instruction. -
make_ior
Return the Instruction object for the ior instruction. -
make_lor
Return the Instruction object for the lor instruction. -
make_ixor
Return the Instruction object for the ixor instruction. -
make_lxor
Return the Instruction object for the lxor instruction. -
make_i2l
Return the Instruction object for the i2l instruction. -
make_i2f
Return the Instruction object for the i2f instruction. -
make_i2d
Return the Instruction object for the i2d instruction. -
make_l2i
Return the Instruction object for the l2i instruction. -
make_l2f
Return the Instruction object for the l2f instruction. -
make_l2d
Return the Instruction object for the l2d instruction. -
make_f2i
Return the Instruction object for the f2i instruction. -
make_f2l
Return the Instruction object for the f2l instruction. -
make_f2d
Return the Instruction object for the f2d instruction. -
make_d2i
Return the Instruction object for the d2i instruction. -
make_d2l
Return the Instruction object for the d2l instruction. -
make_d2f
Return the Instruction object for the d2f instruction. -
make_i2b
Return the Instruction object for the i2b instruction. -
make_i2c
Return the Instruction object for the i2c instruction. -
make_i2s
Return the Instruction object for the i2s instruction. -
make_lcmp
Return the Instruction object for the lcmp instruction. -
make_fcmpl
Return the Instruction object for the fcmpl instruction. -
make_fcmpg
Return the Instruction object for the fcmpg instruction. -
make_dcmpl
Return the Instruction object for the dcmpl instruction. -
make_dcmpg
Return the Instruction object for the dcmpg instruction. -
make_ireturn
Return the Instruction object for the ireturn instruction. -
make_lreturn
Return the Instruction object for the lreturn instruction. -
make_freturn
Return the Instruction object for the freturn instruction. -
make_dreturn
Return the Instruction object for the dreturn instruction. -
make_areturn
Return the Instruction object for the areturn instruction. -
make_return
Return the Instruction object for the return instruction. -
make_arraylength
Return the Instruction object for the arraylength instruction. -
make_athrow
Return the Instruction object for the athrow instruction. -
make_monitorenter
Return the Instruction object for the monitorenter instruction. -
make_monitorexit
Return the Instruction object for the monitorexit instruction. -
make_wide
Return the Instruction object for the wide instruction. -
make_breakpoint
Return the Instruction object for the breakpoint instruction. -
make_invokevirtual_quick_w
Return the Instruction object for the invokevirtual_quick_w instruction. Apparently now undocumented. Presumably deprecated. -
make_impdep1
Return the Instruction object for the impdep1 instruction. -
make_impdep2
Return the Instruction object for the impdep2 instruction. -
make_checkcast
-
make_instanceof
-
make_new
-
make_newarray
- Throws:
CodeException
-
make_return
A convenient one-stop method to get a return statement suitable for a method.- Parameters:
method
- the CodeMethod to return from- Returns:
- a return Instruction that fits this method's return type
-
make_return
Creates the return Instruction suitable for a given class or type.- Parameters:
clazz
- the CodeClass representing the class or type to return- Returns:
- the apropreate return instruction
-
make_invoke
Make an invoke opcode that is suited to the method.Constructors and private methods are invoked by invokespecial. Static methods are invoked by invokestatic. Methods referred to by interface are invoked by invokeinterface, and methods referred to by classes are invoked by invokeabstract.
- Parameters:
cm
- the CodeMethod to invoke- Returns:
- an invocation Instruction suited to the method
-
make_synchronizedBlock
public static CodeGenerator make_synchronizedBlock(LocalVariable lockVar, CodeGenerator code) throws CodeException Synchronize the processing of an entire block of code on a local variable. The local variable must refer to a Java object. It is safe to replace the value of the local variable within the block.- Parameters:
lockVar
- Label for the local variable to lock oncode
- the CodeGenerator that will make the body of the synchronized block- Throws:
CodeException
- if locVar holds a primative value
-
make_synchronizedBlock
Synchronize the processing of an entire block of code on the object on the top of the stack.- Parameters:
code
- the CodeGenerator that will make the body of the synchronized blocklockVar
- Label for the local variable to lock on
-
make_markLabel
-
make_if
Make an if Instruction for the opcode and label.Obcodes for IF jump to the label if the condition is true, or execute the next instruction ontherwise. In this case, op will be used to compare the top of the stack and if the condition is true, will cause a jump to the label. Otherwise, the next instruction in the stream will be used.
- Parameters:
op
- if opcodelab
- Label to jump to- Returns:
- an Instruction that will perform an if
- Throws:
IllegalArgumentException
- if the op code is not an if instruction
-
make_newraray
-
make_array_load
Load an element of a parametric type to an array.This is the parametric version of the make_<x>aload() factory methods.
- Parameters:
type
- the ParametricType giving the element type of the array- Returns:
- a ParametricCodeGenerator that will load the correct type.
-
make_arrayStore
Store an element of a parametric type to an array.This is the parametric version of the make_<x>astore() factory methods.
- Parameters:
type
- the ParametricType giving the element type of the array- Returns:
- a ParametricCodeGenerator that will store the correct type.
-
make_load
public ParametricCodeGenerator make_load(ParametricType type, LocalVariable lv) throws CodeException Load an item of a parametric type from a local variable.This is the parametric version of the make_<x>load() factory methods.
- Parameters:
type
- the ParametricType giving the type to loadlv
- the LocalVariable to load from- Returns:
- a ParametricCodeGenerator that will load the correct type.
- Throws:
CodeException
-
make_save
public ParametricCodeGenerator make_save(ParametricType type, LocalVariable lv) throws CodeException Store an item of a parametric type to a local variable.This is the parametric version of the make_<x>save() factory methods.
- Parameters:
type
- the ParametricType giving the type to savelv
- the LocalVariable to load from- Returns:
- a ParametricCodeGenerator that will save the correct type.
- Throws:
CodeException
-
make_return
Make a return statement for the parametric type.- Parameters:
type
- the ParametricType to return
-
make_cast
public PParametricCodeGenerator make_cast(ParametricType from, ParametricType to) throws CodeException - Throws:
CodeException
-
make_add
- Throws:
CodeException
-
make_sub
- Throws:
CodeException
-
make_mul
- Throws:
CodeException
-
make_div
- Throws:
CodeException
-
make_rem
- Throws:
CodeException
-
make_neg
- Throws:
CodeException
-
make_shiftLeft
- Throws:
CodeException
-
make_shiftRight
- Throws:
CodeException
-
make_shiftRightLogical
- Throws:
CodeException
-
make_and
- Throws:
CodeException
-
make_or
- Throws:
CodeException
-
make_xor
- Throws:
CodeException
-
make_cmpg
- Throws:
CodeException
-
make_cmpl
- Throws:
CodeException
-
make_dup
- Throws:
CodeException
-