blob: aa66e25422fd037b39ea2a4c47d236b2066ba0bd [file] [log] [blame]
Orion Hodsonaadb3732018-11-21 12:58:34 +00001/*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Orion Hodson962ee002020-04-19 09:45:28 +010017#pragma once
Orion Hodsonaadb3732018-11-21 12:58:34 +000018
Orion Hodson962ee002020-04-19 09:45:28 +010019#include <sys/cdefs.h>
Orion Hodsonaadb3732018-11-21 12:58:34 +000020
Orion Hodson962ee002020-04-19 09:45:28 +010021#include "include_jni/jni.h"
Orion Hodsonaadb3732018-11-21 12:58:34 +000022
Orion Hodson962ee002020-04-19 09:45:28 +010023__BEGIN_DECLS
Orion Hodsonaadb3732018-11-21 12:58:34 +000024
Orion Hodson7e438db2020-04-19 16:39:50 +010025
Orion Hodson962ee002020-04-19 09:45:28 +010026//
27// Classes in constants cache.
28//
29// NB The implementations of these methods are generated by the JCLASS_ACCESSOR_IMPL macro in
30// JniConstants.c.
31//
Orion Hodson7e438db2020-04-19 16:39:50 +010032jclass JniConstants_ClassClass(JNIEnv* env);
Orion Hodson962ee002020-04-19 09:45:28 +010033jclass JniConstants_FileDescriptorClass(JNIEnv* env);
34jclass JniConstants_NIOAccessClass(JNIEnv* env);
35jclass JniConstants_NioBufferClass(JNIEnv* env);
36jclass JniConstants_ReferenceClass(JNIEnv* env);
37jclass JniConstants_StringClass(JNIEnv* env);
Orion Hodson7e438db2020-04-19 16:39:50 +010038jclass JniConstants_ThrowableClass(JNIEnv* env);
39
Orion Hodsonaadb3732018-11-21 12:58:34 +000040
Orion Hodson962ee002020-04-19 09:45:28 +010041//
42// Methods in the constants cache.
43//
44// NB The implementations of these methods are generated by the JMETHODID_ACCESSOR_IMPL macro in
45// JniConstants.c.
46//
47jmethodID JniConstants_FileDescriptor_init(JNIEnv* env);
Orion Hodson7e438db2020-04-19 16:39:50 +010048jmethodID JniConstants_Class_getName();
Orion Hodson962ee002020-04-19 09:45:28 +010049jmethodID JniConstants_NIOAccess_getBaseArray(JNIEnv* env);
50jmethodID JniConstants_NIOAccess_getBaseArrayOffset(JNIEnv* env);
51jmethodID JniConstants_NioBuffer_array(JNIEnv* env);
52jmethodID JniConstants_NioBuffer_arrayOffset(JNIEnv* env);
53jmethodID JniConstants_Reference_get(JNIEnv* env);
Orion Hodson7e438db2020-04-19 16:39:50 +010054jmethodID JniConstants_Throwable_getMessage(JNIEnv* env);
55jmethodID JniConstants_Throwable_printStackTrace(JNIEnv* env);
Orion Hodsonaadb3732018-11-21 12:58:34 +000056
Orion Hodson962ee002020-04-19 09:45:28 +010057//
58// Fields in the constants cache.
59//
60// NB The implementations of these methods are generated by the JFIELDID_ACCESSOR_IMPL macro in
61// JniConstants.c.
62//
63jfieldID JniConstants_FileDescriptor_descriptor(JNIEnv* env);
64jfieldID JniConstants_NioBuffer_address(JNIEnv* env);
65jfieldID JniConstants_NioBuffer__elementSizeShift(JNIEnv* env);
66jfieldID JniConstants_NioBuffer_limit(JNIEnv* env);
67jfieldID JniConstants_NioBuffer_position(JNIEnv* env);
Orion Hodsonbcc2b6f2019-02-22 16:41:10 +000068
Orion Hodson962ee002020-04-19 09:45:28 +010069__END_DECLS