|
1 | 1 | /* |
2 | | - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
@@ -765,6 +765,16 @@ struct JNINativeInterface_ { |
765 | 765 |
|
766 | 766 | jobjectRefType (JNICALL *GetObjectRefType) |
767 | 767 | (JNIEnv* env, jobject obj); |
| 768 | + |
| 769 | + /* Module Features */ |
| 770 | + |
| 771 | + jobject (JNICALL *GetModule) |
| 772 | + (JNIEnv* env, jclass clazz); |
| 773 | + |
| 774 | + /* Virtual threads */ |
| 775 | + |
| 776 | + jboolean (JNICALL *IsVirtualThread) |
| 777 | + (JNIEnv* env, jobject obj); |
768 | 778 | }; |
769 | 779 |
|
770 | 780 | /* |
@@ -1857,9 +1867,35 @@ struct JNIEnv_ { |
1857 | 1867 | return functions->GetObjectRefType(this, obj); |
1858 | 1868 | } |
1859 | 1869 |
|
| 1870 | + /* Module Features */ |
| 1871 | + |
| 1872 | + jobject GetModule(jclass clazz) { |
| 1873 | + return functions->GetModule(this, clazz); |
| 1874 | + } |
| 1875 | + |
| 1876 | + /* Virtual threads */ |
| 1877 | + |
| 1878 | + jboolean IsVirtualThread(jobject obj) { |
| 1879 | + return functions->IsVirtualThread(this, obj); |
| 1880 | + } |
| 1881 | + |
1860 | 1882 | #endif /* __cplusplus */ |
1861 | 1883 | }; |
1862 | 1884 |
|
| 1885 | +/* |
| 1886 | + * optionString may be any option accepted by the JVM, or one of the |
| 1887 | + * following: |
| 1888 | + * |
| 1889 | + * -D<name>=<value> Set a system property. |
| 1890 | + * -verbose[:class|gc|jni] Enable verbose output, comma-separated. E.g. |
| 1891 | + * "-verbose:class" or "-verbose:gc,class" |
| 1892 | + * Standard names include: gc, class, and jni. |
| 1893 | + * All nonstandard (VM-specific) names must begin |
| 1894 | + * with "X". |
| 1895 | + * vfprintf extraInfo is a pointer to the vfprintf hook. |
| 1896 | + * exit extraInfo is a pointer to the exit hook. |
| 1897 | + * abort extraInfo is a pointer to the abort hook. |
| 1898 | + */ |
1863 | 1899 | typedef struct JavaVMOption { |
1864 | 1900 | char *optionString; |
1865 | 1901 | void *extraInfo; |
@@ -1951,6 +1987,12 @@ JNI_OnUnload(JavaVM *vm, void *reserved); |
1951 | 1987 | #define JNI_VERSION_1_2 0x00010002 |
1952 | 1988 | #define JNI_VERSION_1_4 0x00010004 |
1953 | 1989 | #define JNI_VERSION_1_6 0x00010006 |
| 1990 | +#define JNI_VERSION_1_8 0x00010008 |
| 1991 | +#define JNI_VERSION_9 0x00090000 |
| 1992 | +#define JNI_VERSION_10 0x000a0000 |
| 1993 | +#define JNI_VERSION_19 0x00130000 |
| 1994 | +#define JNI_VERSION_20 0x00140000 |
| 1995 | +#define JNI_VERSION_21 0x00150000 |
1954 | 1996 |
|
1955 | 1997 | #ifdef __cplusplus |
1956 | 1998 | } /* extern "C" */ |
|
0 commit comments