2362N/A * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * This file contains utility functions that can be implemented in pure JNI. 0N/A * Caution: Callers of functions declared in this file should be 0N/A * particularly aware of the fact that these functions are convenience 0N/A * functions, and as such are often compound operations, each one of 0N/A * which may throw an exception. Therefore, the functions this file 0N/A * will often return silently if an exception has occured, and callers 0N/A * must check for exception themselves. 0N/A/* Throw a Java exception by name. Similar to SignalError. */ 0N/A/* Throw common exceptions */ 0N/A/* Throw an exception by name, using the string returned by 0N/A * JVM_LastErrorString for the detail string. If the last-error 0N/A * string is NULL, use the given default detail string. 0N/A/* Throw an IOException, using the last-error string for the detail 0N/A * string. If the last-error string is NULL, use the given default 0N/A/* Convert between Java strings and i18n C strings */ 0N/A/* Class constants */ 0N/A/* Copy count number of arguments from src to dst. Array bounds 0N/A * and ArrayStoreException are checked. 0N/A/* Invoke a object-returning static method, based on class name, 0N/A * method name, and signature string. 0N/A * The caller should check for exceptions by setting hasException 0N/A * argument. If the caller is not interested in whether an exception 0N/A * has occurred, pass in NULL. 0N/A/* Invoke an instance method by name. 0N/A/* Construct a new object of class, specifying the class by name, 0N/A * and specififying which constructor to run and what arguments to 0N/A * The method will return an initialized instance if successful. 0N/A * It will return NULL if an error has occured (for example if 0N/A * it ran out of memory) and the appropriate Java exception will 0N/A * 0: object is not an instance of the class named by classname. 0N/A * 1: object is an instance of the class named by classname. 0N/A * -1: the class named by classname cannot be found. An exception 0N/A/* Get or set class and instance fields. 0N/A * Note that set functions take a variable number of arguments, 0N/A * but only one argument of the appropriate type can be passed. 0N/A * For example, to set an integer field i to 100: 0N/A * JNU_SetFieldByName(env, &exc, obj, "i", "I", 100); 0N/A * To set a float field f to 12.3: 0N/A * JNU_SetFieldByName(env, &exc, obj, "f", "F", 12.3); 0N/A * The caller should check for exceptions by setting hasException 0N/A * argument. If the caller is not interested in whether an exception 0N/A * has occurred, pass in NULL. 0N/A * Calls the .equals method. 0N/A/************************************************************************ 0N/A * Convenience thread-related calls on the java.lang.Object class. 0N/A/************************************************************************ 0N/A * Miscellaneous utilities used by the class libraries 0N/A/************************************************************************ 0N/A * Debugging utilities 0N/A * Package shorthand for use by native libraries 0N/A * Check if the current thread is attached to the VM, and returns 0N/A * the JNIEnv of the specified version if the thread is attached. 0N/A * If the current thread is not attached, this function returns 0. 0N/A * If the current thread is attached, this function returns the 0N/A * JNI environment, or returns (void *)JNI_ERR if the specified 0N/A * version is not supported. 0N/A * Warning free access to pointers stored in Java long fields. 0N/A#
endif /* __cplusplus */ 0N/A#
endif /* JNI_UTIL_H */