Skip to main content

JvmMethodBuilder

Struct JvmMethodBuilder 

Source
pub struct JvmMethodBuilder { /* private fields */ }
Expand description

JVM 方法构建器

Implementations§

Source§

impl JvmMethodBuilder

Source

pub fn new(name: String, descriptor: String) -> Self

Source

pub fn with_public(self) -> Self

Source

pub fn with_private(self) -> Self

Source

pub fn with_protected(self) -> Self

Source

pub fn with_static(self) -> Self

Source

pub fn with_final(self) -> Self

Source

pub fn with_synchronized(self) -> Self

Source

pub fn with_max_stack(self, max_stack: u16) -> Self

Source

pub fn with_max_locals(self, max_locals: u16) -> Self

Source

pub fn add_instruction(self, instruction: JvmInstruction) -> Self

Source

pub fn add_exception_handler(self, handler: JvmExceptionHandler) -> Self

Source

pub fn add_exception(self, exception: impl Into<String>) -> Self

Source

pub fn nop(self) -> Self

Source

pub fn aconst_null(self) -> Self

Source

pub fn iconst_m1(self) -> Self

Source

pub fn iconst_0(self) -> Self

Source

pub fn iconst_1(self) -> Self

Source

pub fn iconst_2(self) -> Self

Source

pub fn iconst_3(self) -> Self

Source

pub fn iconst_4(self) -> Self

Source

pub fn iconst_5(self) -> Self

Source

pub fn lconst_0(self) -> Self

Source

pub fn lconst_1(self) -> Self

Source

pub fn fconst_0(self) -> Self

Source

pub fn fconst_1(self) -> Self

Source

pub fn fconst_2(self) -> Self

Source

pub fn dconst_0(self) -> Self

Source

pub fn dconst_1(self) -> Self

Source

pub fn bipush(self, value: i8) -> Self

Source

pub fn sipush(self, value: i16) -> Self

Source

pub fn ldc(self, symbol: impl Into<String>) -> Self

Source

pub fn iload(self, index: u16) -> Self

Source

pub fn lload(self, index: u16) -> Self

Source

pub fn fload(self, index: u16) -> Self

Source

pub fn dload(self, index: u16) -> Self

Source

pub fn aload(self, index: u16) -> Self

Source

pub fn iload_0(self) -> Self

Source

pub fn iload_1(self) -> Self

Source

pub fn iload_2(self) -> Self

Source

pub fn iload_3(self) -> Self

Source

pub fn lload_0(self) -> Self

Source

pub fn lload_1(self) -> Self

Source

pub fn lload_2(self) -> Self

Source

pub fn lload_3(self) -> Self

Source

pub fn fload_0(self) -> Self

Source

pub fn fload_1(self) -> Self

Source

pub fn fload_2(self) -> Self

Source

pub fn fload_3(self) -> Self

Source

pub fn dload_0(self) -> Self

Source

pub fn dload_1(self) -> Self

Source

pub fn dload_2(self) -> Self

Source

pub fn dload_3(self) -> Self

Source

pub fn aload_0(self) -> Self

Source

pub fn aload_1(self) -> Self

Source

pub fn aload_2(self) -> Self

Source

pub fn aload_3(self) -> Self

Source

pub fn istore(self, index: u16) -> Self

Source

pub fn lstore(self, index: u16) -> Self

Source

pub fn fstore(self, index: u16) -> Self

Source

pub fn dstore(self, index: u16) -> Self

Source

pub fn astore(self, index: u16) -> Self

Source

pub fn istore_0(self) -> Self

Source

pub fn istore_1(self) -> Self

Source

pub fn istore_2(self) -> Self

Source

pub fn istore_3(self) -> Self

Source

pub fn lstore_0(self) -> Self

Source

pub fn lstore_1(self) -> Self

Source

pub fn lstore_2(self) -> Self

Source

pub fn lstore_3(self) -> Self

Source

pub fn fstore_0(self) -> Self

Source

pub fn fstore_1(self) -> Self

Source

pub fn fstore_2(self) -> Self

Source

pub fn fstore_3(self) -> Self

Source

pub fn dstore_0(self) -> Self

Source

pub fn dstore_1(self) -> Self

Source

pub fn dstore_2(self) -> Self

Source

pub fn dstore_3(self) -> Self

Source

pub fn astore_0(self) -> Self

Source

pub fn astore_1(self) -> Self

Source

pub fn astore_2(self) -> Self

Source

pub fn astore_3(self) -> Self

Source

pub fn iadd(self) -> Self

Source

pub fn ladd(self) -> Self

Source

pub fn fadd(self) -> Self

Source

pub fn dadd(self) -> Self

Source

pub fn isub(self) -> Self

Source

pub fn lsub(self) -> Self

Source

pub fn fsub(self) -> Self

Source

pub fn dsub(self) -> Self

Source

pub fn imul(self) -> Self

Source

pub fn lmul(self) -> Self

Source

pub fn fmul(self) -> Self

Source

pub fn dmul(self) -> Self

Source

pub fn idiv(self) -> Self

Source

pub fn ldiv(self) -> Self

Source

pub fn fdiv(self) -> Self

Source

pub fn ddiv(self) -> Self

Source

pub fn irem(self) -> Self

Source

pub fn lrem(self) -> Self

Source

pub fn frem(self) -> Self

Source

pub fn drem(self) -> Self

Source

pub fn ineg(self) -> Self

Source

pub fn lneg(self) -> Self

Source

pub fn fneg(self) -> Self

Source

pub fn dneg(self) -> Self

Source

pub fn ishl(self) -> Self

Source

pub fn lshl(self) -> Self

Source

pub fn ishr(self) -> Self

Source

pub fn lshr(self) -> Self

Source

pub fn iushr(self) -> Self

Source

pub fn lushr(self) -> Self

Source

pub fn iand(self) -> Self

Source

pub fn land(self) -> Self

Source

pub fn ior(self) -> Self

Source

pub fn lor(self) -> Self

Source

pub fn ixor(self) -> Self

Source

pub fn lxor(self) -> Self

Source

pub fn lcmp(self) -> Self

Source

pub fn fcmpl(self) -> Self

Source

pub fn fcmpg(self) -> Self

Source

pub fn dcmpl(self) -> Self

Source

pub fn dcmpg(self) -> Self

Source

pub fn iinc(self, index: u16, increment: i16) -> Self

Source

pub fn getstatic( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn putstatic( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn getfield( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn putfield( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn invokevirtual( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn invokespecial( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn invokestatic( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn invokeinterface( self, class: impl Into<String>, name: impl Into<String>, desc: impl Into<String>, ) -> Self

Source

pub fn new_instance(self, class: impl Into<String>) -> Self

Source

pub fn dup(self) -> Self

Source

pub fn dup_x1(self) -> Self

Source

pub fn dup_x2(self) -> Self

Source

pub fn dup2(self) -> Self

Source

pub fn dup2_x1(self) -> Self

Source

pub fn dup2_x2(self) -> Self

Source

pub fn swap(self) -> Self

Source

pub fn pop(self) -> Self

Source

pub fn pop2(self) -> Self

Source

pub fn return_void(self) -> Self

Source

pub fn ireturn(self) -> Self

Source

pub fn lreturn(self) -> Self

Source

pub fn freturn(self) -> Self

Source

pub fn dreturn(self) -> Self

Source

pub fn areturn(self) -> Self

Source

pub fn label(self, name: impl Into<String>) -> Self

Source

pub fn goto(self, target: impl Into<String>) -> Self

Source

pub fn ifeq(self, target: impl Into<String>) -> Self

Source

pub fn ifne(self, target: impl Into<String>) -> Self

Source

pub fn build(self) -> JvmMethod

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,