/// Create a newly initialised but blank JVM `Agent` instance using the provided Java VM pointer.

Create a newly initialised but blank JVM `Agent` instance using the provided Java VM pointer.
Create a newly initialised but blank JVM ` Agent ` instance using the provided Java VM pointer .
pub fn new(vm: JavaVMPtr) -> Agent {
        let jvm_agent = JVMAgent::new(vm);
        let jni = jvm_agent.attach("Flare-Profiler-Attach").unwrap();
        match jvm_agent.get_environment() {
            Ok(jvmti) => Agent {
                jvm: Box::new(jvm_agent),
                capabilities: Capabilities::new(),
                callbacks: EventCallbacks::new(),
                jvm_env: Agent::create_jvm_env(jvmti, jni)
            },
            Err(err) => panic!("FATAL: Could not get JVMTI environment: {}", translate_error(&err))
        }
    }
pub fn new ( vm : JavaVMPtr ) -> Agent { let jvm_agent = JVMAgent :: new ( vm ) ; let jni = jvm_agent . attach ( " " ) . unwrap ( ) ; match jvm_agent . get_environment ( ) { Ok ( jvmti ) => Agent { jvm : Box :: new ( jvm_agent ) , capabilities : Capabilities :: new ( ) , callbacks : EventCallbacks :: new ( ) , jvm_env : Agent :: create_jvm_env ( jvmti , jni ) } , Err ( err ) => panic ! ( " " translate_error ( err ) ) } }
Create a newly initialised but blank JVM `Agent` instance using the provided Java VM pointer.
Create a newly initialised but blank JVM ` Agent ` instance using the provided Java VM pointer .
vm
JavaVMPtr