forked from joeferner/node-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava.h
More file actions
30 lines (23 loc) · 686 Bytes
/
Copy pathjava.h
File metadata and controls
30 lines (23 loc) · 686 Bytes
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
#ifndef _node_java_h_
#define _node_java_h_
#include <v8.h>
#include <node.h>
#include <jni.h>
#include <string>
class Java : public node::ObjectWrap {
public:
static void Init(v8::Handle<v8::Object> target);
JavaVM* getJvm() { return m_jvm; }
JNIEnv* getJavaEnv() { return m_env; }
private:
Java();
~Java();
static void createJVM(JavaVM** jvm, JNIEnv** env);
static v8::Handle<v8::Value> New(const v8::Arguments& args);
static v8::Handle<v8::Value> newInstance(const v8::Arguments& args);
static v8::Handle<v8::Value> newInstanceSync(const v8::Arguments& args);
static v8::Persistent<v8::FunctionTemplate> s_ct;
JavaVM* m_jvm;
JNIEnv* m_env;
};
#endif