-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathJniJavaVM.h
45 lines (31 loc) · 821 Bytes
/
JniJavaVM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#pragma once
#ifndef JNI_JAVA_VM_H
#define JNI_JAVA_VM_H
#include <JniForwards.h>
namespace JNI {
class JniJavaVM {
public:
static const jint JNI_DEFAULT_VERSION = JNI_VERSION_1_6;
JniJavaVM(JavaVM * v, jint ver = JNI_DEFAULT_VERSION);
JniJavaVM(const JniJavaVM& vm);
JniJavaVM(JniJavaVM&& vm);
JniJavaVM(jint ver = JNI_DEFAULT_VERSION);
JniJavaVM(const std::string& classPath, jint ver = JNI_DEFAULT_VERSION);
JavaVM * Val();
const JavaVM * Val() const;
jint Version() const;
JavaEnv GetEnv() const;
bool Valid() const;
bool operator==(const JniJavaVM& jvm) const;
bool operator!=(const JniJavaVM& jvm) const;
~JniJavaVM();
JniJavaVM& operator=(const JniJavaVM& vm);
JniJavaVM& operator=(JniJavaVM&& vm);
private:
JavaVM * val;
jint version;
bool doDestroy;
void Destroy();
};
}
#endif