Merge: Model uml
[nit.git] / lib / jvm.nit
index 8a07b2a..4337d9e 100644 (file)
@@ -374,6 +374,18 @@ extern class JniEnv `{JNIEnv *`}
        fun string_to_jobject(string: String): JavaObject `{
                return (*recv)->NewStringUTF(recv, String_to_cstring(string));
        `}
+
+       # Pushes a local reference frame on the JNI stack
+       fun push_local_frame(capacity: Int): Bool `{
+               return (*recv)->PushLocalFrame(recv, capacity);
+       `}
+
+       # Pops the current local reference frame on the JNI stack
+       #
+       # Similiar to `JavaObject::pop_from_local_frame` which returns a value.
+       fun pop_local_frame `{
+               (*recv)->PopLocalFrame(recv, NULL);
+       `}
 end
 
 # used to initialize a JavaVM 
@@ -390,7 +402,7 @@ extern class JMethodID `{jmethodID`}
 end
 
 # Represens a jni jobject
-extern class JavaObject `{jobject`}
+extern class JavaObject in "Java" `{ java.lang.Object `}
 end
 
 # Represents a jni JNINNativeMethod