pub trait MethodVisitor {
Show 16 methods
// Provided methods
fn visit_code(&mut self) { ... }
fn visit_insn(&mut self, _opcode: u8) { ... }
fn visit_int_insn(&mut self, _opcode: u8, _operand: i32) { ... }
fn visit_var_insn(&mut self, _opcode: u8, _var_index: u16) { ... }
fn visit_type_insn(&mut self, _opcode: u8, _type_name: &str) { ... }
fn visit_field_insn(
&mut self,
_opcode: u8,
_owner: &str,
_name: &str,
_desc: &str,
) { ... }
fn visit_method_insn(
&mut self,
_opcode: u8,
_owner: &str,
_name: &str,
_desc: &str,
_is_interface: bool,
) { ... }
fn visit_invoke_dynamic_insn(&mut self, _name: &str, _desc: &str) { ... }
fn visit_jump_insn(&mut self, _opcode: u8, _target_offset: i32) { ... }
fn visit_ldc_insn(&mut self, _value: LdcConstant) { ... }
fn visit_iinc_insn(&mut self, _var_index: u16, _increment: i16) { ... }
fn visit_table_switch(
&mut self,
_default: i32,
_low: i32,
_high: i32,
_targets: &[i32],
) { ... }
fn visit_lookup_switch(&mut self, _default: i32, _pairs: &[(i32, i32)]) { ... }
fn visit_multi_anewarray_insn(&mut self, _type_name: &str, _dims: u8) { ... }
fn visit_maxs(&mut self, _max_stack: u16, _max_locals: u16) { ... }
fn visit_end(&mut self) { ... }
}Provided Methods§
Sourcefn visit_code(&mut self)
fn visit_code(&mut self)
Starts the visit of the method’s code.
Sourcefn visit_insn(&mut self, _opcode: u8)
fn visit_insn(&mut self, _opcode: u8)
Sourcefn visit_int_insn(&mut self, _opcode: u8, _operand: i32)
fn visit_int_insn(&mut self, _opcode: u8, _operand: i32)
Visits an instruction with a single int operand.
Sourcefn visit_var_insn(&mut self, _opcode: u8, _var_index: u16)
fn visit_var_insn(&mut self, _opcode: u8, _var_index: u16)
Visits a local variable instruction.
Sourcefn visit_type_insn(&mut self, _opcode: u8, _type_name: &str)
fn visit_type_insn(&mut self, _opcode: u8, _type_name: &str)
Visits a type instruction.
§Arguments
opcode- The opcode of the instruction.type_name- The internal name of the object or array class.
Sourcefn visit_field_insn(
&mut self,
_opcode: u8,
_owner: &str,
_name: &str,
_desc: &str,
)
fn visit_field_insn( &mut self, _opcode: u8, _owner: &str, _name: &str, _desc: &str, )
Visits a field instruction.
§Arguments
opcode- The opcode of the instruction.owner- The internal name of the field’s owner class.name- The field’s name.desc- The field’s descriptor.
fn visit_method_insn( &mut self, _opcode: u8, _owner: &str, _name: &str, _desc: &str, _is_interface: bool, )
fn visit_invoke_dynamic_insn(&mut self, _name: &str, _desc: &str)
Sourcefn visit_jump_insn(&mut self, _opcode: u8, _target_offset: i32)
fn visit_jump_insn(&mut self, _opcode: u8, _target_offset: i32)
Visits a jump instruction.
§Arguments
opcode- The opcode of the instruction.target_offset- The offset of the target instruction relative to the current instruction.
Sourcefn visit_ldc_insn(&mut self, _value: LdcConstant)
fn visit_ldc_insn(&mut self, _value: LdcConstant)
Visits an LDC instruction.