pub struct JvmMethod {
pub name: String,
pub descriptor: String,
pub access_flags: JvmAccessFlags,
pub instructions: Vec<JvmInstruction>,
pub max_stack: u16,
pub max_locals: u16,
pub exception_handlers: Vec<JvmExceptionHandler>,
pub exceptions: Vec<String>,
pub attributes: Vec<JvmAttribute>,
}Expand description
JVM method information
Fields§
§name: StringMethod name
descriptor: StringMethod descriptor
access_flags: JvmAccessFlagsAccess flags
instructions: Vec<JvmInstruction>Method instructions
max_stack: u16Maximum stack size
max_locals: u16Maximum local variables
exception_handlers: Vec<JvmExceptionHandler>Exception handler table
exceptions: Vec<String>Exceptions thrown by the method
attributes: Vec<JvmAttribute>Method attributes
Implementations§
Source§impl JvmMethod
impl JvmMethod
Sourcepub fn add_instruction(&mut self, inst: JvmInstruction)
pub fn add_instruction(&mut self, inst: JvmInstruction)
Adds an instruction to the method
Sourcepub fn add_exception_handler(&mut self, handler: JvmExceptionHandler)
pub fn add_exception_handler(&mut self, handler: JvmExceptionHandler)
Adds an exception handler to the method
Sourcepub fn add_exception(&mut self, exception: String)
pub fn add_exception(&mut self, exception: String)
Adds an exception to the method
Sourcepub fn add_attribute(&mut self, attribute: JvmAttribute)
pub fn add_attribute(&mut self, attribute: JvmAttribute)
Adds an attribute to the method
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