pub struct JvmProgramBuilder { /* private fields */ }Expand description
JVM program builder
Implementations§
Source§impl JvmProgramBuilder
impl JvmProgramBuilder
Sourcepub fn new(name: impl Into<String>) -> Self
pub fn new(name: impl Into<String>) -> Self
Creates a new JVM program builder with the given class name
Sourcepub fn with_version(self, major: u16, minor: u16) -> Self
pub fn with_version(self, major: u16, minor: u16) -> Self
Sets the JVM version for the program
Sourcepub fn with_access_flags(self, flags: JvmAccessFlags) -> Self
pub fn with_access_flags(self, flags: JvmAccessFlags) -> Self
Sets the access flags for the program
Sourcepub fn with_public(self) -> Self
pub fn with_public(self) -> Self
Sets the program as public
Sourcepub fn with_super_class(self, super_class: impl Into<String>) -> Self
pub fn with_super_class(self, super_class: impl Into<String>) -> Self
Sets the super class for the program
Sourcepub fn add_interface(self, interface: impl Into<String>) -> Self
pub fn add_interface(self, interface: impl Into<String>) -> Self
Adds an interface to the program
Sourcepub fn with_source_file(self, source_file: impl Into<String>) -> Self
pub fn with_source_file(self, source_file: impl Into<String>) -> Self
Sets the source file for the program
Sourcepub fn add_method<F>(
self,
name: impl Into<String>,
descriptor: impl Into<String>,
f: F,
) -> Self
pub fn add_method<F>( self, name: impl Into<String>, descriptor: impl Into<String>, f: F, ) -> Self
Adds a method to the program using a builder closure
Sourcepub fn build(self) -> JvmProgram
pub fn build(self) -> JvmProgram
Builds and returns the JVM program
Auto Trait Implementations§
impl Freeze for JvmProgramBuilder
impl RefUnwindSafe for JvmProgramBuilder
impl Send for JvmProgramBuilder
impl Sync for JvmProgramBuilder
impl Unpin for JvmProgramBuilder
impl UnsafeUnpin for JvmProgramBuilder
impl UnwindSafe for JvmProgramBuilder
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