pub struct MethodNode {Show 18 fields
pub access_flags: u16,
pub name: String,
pub descriptor: String,
pub has_code: bool,
pub max_stack: u16,
pub max_locals: u16,
pub instructions: InsnList,
pub instruction_offsets: Vec<u16>,
pub insn_nodes: Vec<AbstractInsnNode>,
pub exception_table: Vec<ExceptionTableEntry>,
pub try_catch_blocks: Vec<TryCatchBlockNode>,
pub line_numbers: Vec<LineNumber>,
pub local_variables: Vec<LocalVariable>,
pub method_parameters: Vec<MethodParameter>,
pub exceptions: Vec<String>,
pub signature: Option<String>,
pub code_attributes: Vec<AttributeInfo>,
pub attributes: Vec<AttributeInfo>,
}Expand description
Fields§
§access_flags: u16A bitmask of access flags (e.g., ACC_PUBLIC, ACC_STATIC, ACC_SYNCHRONIZED).
name: StringThe name of the method.
descriptor: StringThe method descriptor describing parameter types and return type.
has_code: boolWhether this method has a Code attribute.
This is false for native or abstract methods.
max_stack: u16The maximum stack size required by the method’s bytecode.
max_locals: u16The maximum number of local variables required by the method’s bytecode.
instructions: InsnListDecoded JVM instructions in an InsnList.
instruction_offsets: Vec<u16>Original bytecode offsets corresponding to entries in instructions.
insn_nodes: Vec<AbstractInsnNode>Decoded JVM instructions as tree-style nodes, preserving labels and line markers.
exception_table: Vec<ExceptionTableEntry>Exception handlers (raw entries in the code attribute).
try_catch_blocks: Vec<TryCatchBlockNode>Decoded try/catch blocks keyed by labels in insn_nodes.
line_numbers: Vec<LineNumber>Decoded line number entries from the LineNumberTable.
local_variables: Vec<LocalVariable>Decoded local variable entries from the LocalVariableTable.
method_parameters: Vec<MethodParameter>Decoded method parameters from the MethodParameters attribute.
exceptions: Vec<String>Internal names of declared checked exceptions from the Exceptions attribute.
signature: Option<String>Generic signature string from the Signature attribute, if present.
code_attributes: Vec<AttributeInfo>Attributes associated with the Code attribute (e.g., LineNumberTable, LocalVariableTable).
attributes: Vec<AttributeInfo>Other attributes associated with this method (e.g., Exceptions, Synthetic, Deprecated, Signature).
Trait Implementations§
Source§impl Clone for MethodNode
impl Clone for MethodNode
Source§fn clone(&self) -> MethodNode
fn clone(&self) -> MethodNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more