| 1 |
// Copyright 2018 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
// It's going to be hard to include a whole real JVM to test this. |
| 6 |
// So we'll simulate a really easy JVM using just the parts we need. |
| 7 |
|
| 8 |
// This is the relevant part of jni.h. |
| 9 |
|
| 10 |
// On Android NDK16, jobject is defined like this in C and C++ |
| 11 |
typedef void* jobject; |
| 12 |
|
| 13 |
typedef jobject jclass; |
| 14 |
typedef jobject jthrowable; |
| 15 |
typedef jobject jstring; |
| 16 |
typedef jobject jarray; |
| 17 |
typedef jarray jbooleanArray; |
| 18 |
typedef jarray jbyteArray; |
| 19 |
typedef jarray jcharArray; |
| 20 |
typedef jarray jshortArray; |
| 21 |
typedef jarray jintArray; |
| 22 |
typedef jarray jlongArray; |
| 23 |
typedef jarray jfloatArray; |
| 24 |
typedef jarray jdoubleArray; |
| 25 |
typedef jarray jobjectArray; |
| 26 |
|
| 27 |
typedef jobject jweak; |
| 28 |
|
| 29 |
// Note: jvalue is already a non-pointer type due to it being a C union. |