jvm 0.1.1

Core abstractions and runtime services for embeddable JVM implementations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use alloc::{boxed::Box, string::String};
use core::fmt::Debug;

use jvm_types::MethodAccessFlags;

use crate::{JavaValue, Jvm, Result, as_any::AsAny};

#[async_trait::async_trait]
pub trait Method: Sync + Send + AsAny + Debug {
    fn name(&self) -> String;
    fn descriptor(&self) -> String;
    fn access_flags(&self) -> MethodAccessFlags;

    async fn run(&self, jvm: &Jvm, args: Box<[JavaValue]>) -> Result<JavaValue>;
}