public abstract class InstructionListUtils extends StackMapUtils
BCEL should automatically build and maintain the StackMapTable in a manner similar to the LineNumberTable and the LocalVariableTable. However, for historical reasons it does not.
debug_instrument, first_local_index, initial_locals_count, initial_type_list, needStackMap, number_active_locals, pool, running_offset, smta, stack_map_table| Constructor and Description |
|---|
InstructionListUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
append_inst(org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.Instruction inst)
Appends the specified instruction to the end of the specified list.
|
protected org.apache.bcel.generic.InstructionList |
build_il(org.apache.bcel.generic.Instruction... instructions)
Convenience function to build an instruction list
|
protected org.apache.bcel.classfile.StackMapType[] |
calculate_live_local_types(org.apache.bcel.generic.MethodGen mg,
int location)
Compute the StackMapTypes of the live variables of the current method at a specific location
within the method.
|
protected org.apache.bcel.classfile.StackMapType[] |
calculate_live_stack_types(org.apache.bcel.verifier.structurals.OperandStack stack)
Compute the StackMapTypes of the items on the execution stack as described by the OperandStack
argument.
|
protected void |
insert_at_method_start(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionList new_il)
Inserts an instruction list at the beginning of a method.
|
protected void |
insert_before_handle(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.InstructionList new_il,
boolean redirect_branches)
Inserts a new instruction list into an existing instruction list just prior to the indicated
instruction handle (which must be a member of the existing instruction list).
|
protected void |
replace_instructions(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.InstructionList new_il)
Replace instruction ih in list il with the instructions in new_il.
|
add_new_argument, add_string, adjust_code_for_locals_change, bcel_calc_stack_types, build_unitialized_NEW_map, create_method_scope_local, create_new_stack_map_attribute, fetch_current_stack_map_table, find_stack_map_equal, find_stack_map_index_after, find_stack_map_index_before, fix_local_variable_table, gen_temp_locals, generate_StackMapType_from_Type, generate_Type_from_StackMapType, get_attribute_name, get_local_variable_type_table_attribute, get_stack_map_table_attribute, getSize, is_local_variable_type_table, is_stack_map_table, modify_stack_maps_for_switches, print_stack_map_table, remove_local_variable_type_table, typeToClassGetName, update_full_frame_stack_map_entries, update_stack_map_offset, update_uninitialized_NEW_offsetsprotected final void append_inst(org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.Instruction inst)
il - InstructionList to be modifiedinst - Instruction to be appendedprotected final void insert_at_method_start(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionList new_il)
mg - MethodGen of method to be modifiednew_il - InstructionList holding the new codeprotected final void insert_before_handle(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.InstructionList new_il,
boolean redirect_branches)
mg - MethodGen containing the instruction handleih - InstructionHandle indicating where to insert new codenew_il - InstructionList holding the new coderedirect_branches - flag indicating if branch targets should be moved from ih to new_ilprotected final org.apache.bcel.generic.InstructionList build_il(org.apache.bcel.generic.Instruction... instructions)
instructions - a variable number of BCEL instructionsprotected final org.apache.bcel.classfile.StackMapType[] calculate_live_local_types(org.apache.bcel.generic.MethodGen mg,
int location)
mg - MethodGen for the current methodlocation - the code location to be evaluatedprotected final org.apache.bcel.classfile.StackMapType[] calculate_live_stack_types(org.apache.bcel.verifier.structurals.OperandStack stack)
stack - an OperandStack objectprotected final void replace_instructions(org.apache.bcel.generic.MethodGen mg,
org.apache.bcel.generic.InstructionList il,
org.apache.bcel.generic.InstructionHandle ih,
org.apache.bcel.generic.InstructionList new_il)
mg - MethodGen containing the instruction handleil - InstructionList containing ihih - InstructionHandle indicating where to insert new codenew_il - InstructionList holding the new code