10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_JNIHANDLES_HPP
26 #define SHARE_VM_RUNTIME_JNIHANDLES_HPP
27
28 #include "runtime/handles.hpp"
29 #include "utilities/top.hpp"
30
31 class JNIHandleBlock;
32
33
34 // Interface for creating and resolving local/global JNI handles
35
36 class JNIHandles : AllStatic {
37 friend class VMStructs;
38 private:
39 static JNIHandleBlock* _global_handles; // First global handle block
40 static JNIHandleBlock* _weak_global_handles; // First weak global handle block
41 static oop _deleted_handle; // Sentinel marking deleted handles
42
43 public:
44 // Resolve handle into oop
45 inline static oop resolve(jobject handle);
46 // Resolve externally provided handle into oop with some guards
47 inline static oop resolve_external_guard(jobject handle);
48 // Resolve handle into oop, result guaranteed not to be null
49 inline static oop resolve_non_null(jobject handle);
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_JNIHANDLES_HPP
26 #define SHARE_VM_RUNTIME_JNIHANDLES_HPP
27
28 #include "runtime/handles.hpp"
29 #include "utilities/top.hpp"
30 #include "oops/oop.hpp"
31
32 class JNIHandleBlock;
33
34
35 // Interface for creating and resolving local/global JNI handles
36
37 class JNIHandles : AllStatic {
38 friend class VMStructs;
39 private:
40 static JNIHandleBlock* _global_handles; // First global handle block
41 static JNIHandleBlock* _weak_global_handles; // First weak global handle block
42 static oop _deleted_handle; // Sentinel marking deleted handles
43
44 public:
45 // Resolve handle into oop
46 inline static oop resolve(jobject handle);
47 // Resolve externally provided handle into oop with some guards
48 inline static oop resolve_external_guard(jobject handle);
49 // Resolve handle into oop, result guaranteed not to be null
50 inline static oop resolve_non_null(jobject handle);
|