Example #1
0
// IsLocalRef returns true iff the reference pointed to by obj is a local reference.
func IsLocalRef(env Env, obj Object) bool {
	return obj.IsNull() || C.GetObjectRefType(env.value(), obj.value()) == C.JNILocalRefType
}
Example #2
0
// IsGlobalRef returns true iff the reference pointed to by obj is a global reference.
func IsGlobalRef(env Env, obj Object) bool {
	return !obj.IsNull() && C.GetObjectRefType(env.value(), obj.value()) == C.JNIGlobalRefType
}