pub struct JvmMethod {
pub name: String,
pub descriptor: String,
pub access_flags: u16,
pub code: Vec<JvmInstruction>,
pub max_stack: u16,
pub max_locals: u16,
pub exceptions: Vec<ExceptionEntry>,
}Expand description
A single JVM method (Code attribute + metadata).
Fields§
§name: StringSimple method name (e.g. "<init>", "apply").
descriptor: StringMethod descriptor string (e.g. "(I)V").
access_flags: u16Access flags bitmask.
code: Vec<JvmInstruction>Bytecode instructions.
max_stack: u16Maximum operand-stack depth.
max_locals: u16Maximum number of local variables (including this).
exceptions: Vec<ExceptionEntry>Exception table entries.
Implementations§
Source§impl JvmMethod
impl JvmMethod
pub fn new( name: &str, descriptor: &str, access_flags: u16, code: Vec<JvmInstruction>, max_stack: u16, max_locals: u16, ) -> Self
Sourcepub fn add_exception(&mut self, entry: ExceptionEntry)
pub fn add_exception(&mut self, entry: ExceptionEntry)
Add an exception handler entry.
Sourcepub fn is_abstract(&self) -> bool
pub fn is_abstract(&self) -> bool
Is this method abstract (no Code attribute)?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JvmMethod
impl RefUnwindSafe for JvmMethod
impl Send for JvmMethod
impl Sync for JvmMethod
impl Unpin for JvmMethod
impl UnsafeUnpin for JvmMethod
impl UnwindSafe for JvmMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more