ACT-CV - Machine Vision for Cognitive Modeling
|
the java virtual machine More...
#include <JVM.h>
Public Member Functions | |
JVM () | |
create the VM with additional classpath "." More... | |
JVM (const char *cp) | |
create the VM with additional classpath cp More... | |
~JVM () | |
(don't) destroy the vm More... | |
Protected Member Functions | |
JNIEnv * | GetEnv () |
the environment More... | |
void | CreateJVM (const char *classpath) |
create the Java Virtual Machine More... | |
jobject | CreateGlobalRef (jobject obj) |
hinder the VM from garbage collecting obj More... | |
jclass | CreateGlobalRef (jclass obj) |
hinder the VM from garbage collecting obj More... | |
void | AttachCurrentThread () |
threads different from the one within which the VM was created must be attached More... | |
void | DetachCurrentThread () |
any attached thread has to be detached afterwards More... | |
int | GetThreadId () |
system specific code! More... | |
JavaVM * | GetCreatedJavaVM () |
pointer to an already created virtual machine More... | |
Protected Attributes | |
JavaVM * | jvm |
pointer to the virtual machine More... | |
Private Member Functions | |
jint (__stdcall *jniCreateJavaVM)(JavaVM ** | |
void void * | jint (__stdcall *jniGetCreatedJavaVMs)(JavaVM ** |
void void jsize *void | LoadJvmLib () |
Private Attributes | |
JavaVMInitArgs | vm_args |
for vm creation More... | |
JavaVMOption | options [3] |
for vm creation More... | |
std::map< int, JNIEnv * > | threadSpecificEnvs |
environments are only valid in one thread More... | |
bool | mustDestroyVM |
flagged in the class that created the VM More... | |
void * | jvmInstance |
void void | jsize |
JVM::JVM | ( | ) |
create the VM with additional classpath "."
Definition at line 237 of file JVM.cpp.
References AttachCurrentThread(), CreateJVM(), GetCreatedJavaVM(), GetThreadId(), jvm, LoadJvmLib(), MHDBGMSG, and threadSpecificEnvs.
JVM::JVM | ( | const char * | cp) |
create the VM with additional classpath cp
Definition at line 263 of file JVM.cpp.
References AttachCurrentThread(), CreateJVM(), GetCreatedJavaVM(), GetThreadId(), jvm, LoadJvmLib(), MHDBGMSG, and threadSpecificEnvs.
JVM::~JVM | ( | ) |
|
protected |
threads different from the one within which the VM was created must be attached
Definition at line 299 of file JVM.cpp.
References GetCreatedJavaVM(), GetThreadId(), jvm, MHDBGMSG, and threadSpecificEnvs.
Referenced by Robot::AttachCurrentThread(), GetEnv(), and JVM().
|
protected |
hinder the VM from garbage collecting obj
Definition at line 294 of file JVM.cpp.
References GetEnv().
Referenced by Robot::Robot().
|
protected |
|
protected |
create the Java Virtual Machine
When NDEBUG is not set, two options are passed to the VM: "-verbose:gc,class,jni" and "-Xdebug"
The user classpath is always passed to the VM
Definition at line 200 of file JVM.cpp.
References MHDBGMSG, and MHDBGMSG_P.
Referenced by JVM().
|
protected |
any attached thread has to be detached afterwards
Definition at line 315 of file JVM.cpp.
References GetThreadId(), jvm, and threadSpecificEnvs.
Referenced by Robot::DetachCurrentThread().
|
protected |
|
protected |
the environment
as this is thread dependent, one needs to call this method
Definition at line 106 of file JVM.h.
References AttachCurrentThread(), GetThreadId(), and threadSpecificEnvs.
Referenced by CreateGlobalRef(), Robot::CreateRect(), Robot::CreateScreenRect(), Robot::Delay(), Robot::GetPixelRGB(), Robot::GetScreenCapture(), Robot::KeyPress(), Robot::KeyRelease(), Robot::MouseMove(), Robot::MousePress(), Robot::MouseRelease(), Robot::Robot(), Robot::SetAutoDelay(), and Robot::~Robot().
|
protected |
system specific code!
Definition at line 124 of file JVM.h.
Referenced by AttachCurrentThread(), DetachCurrentThread(), GetEnv(), and JVM().
|
private |
Referenced by GetCreatedJavaVM(), and Robot::GetScreenCapture().
|
private |
|
private |
|
private |
Definition at line 91 of file JVM.h.
Referenced by GetCreatedJavaVM().
|
protected |
pointer to the virtual machine
Definition at line 97 of file JVM.h.
Referenced by AttachCurrentThread(), DetachCurrentThread(), and JVM().
|
private |
|
private |
environments are only valid in one thread
Definition at line 75 of file JVM.h.
Referenced by AttachCurrentThread(), DetachCurrentThread(), GetEnv(), and JVM().