Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/classfile/classLoaderExt.hpp
32285 views
/*1* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP25#define SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP2627#include "classfile/classLoader.hpp"2829class ClassLoaderExt: public ClassLoader { // AllStatic30public:3132class Context {33const char* _file_name;34public:35Context(const char* class_name, const char* file_name, TRAPS) {36_file_name = file_name;37}3839bool check(ClassFileStream* stream, const int classpath_index) {40return true;41}4243bool should_verify(int classpath_index) {44return false;45}4647instanceKlassHandle record_result(const int classpath_index,48ClassPathEntry* e, instanceKlassHandle result, TRAPS) {49if (ClassLoader::add_package(_file_name, classpath_index, THREAD)) {50if (DumpSharedSpaces) {51result->set_shared_classpath_index(classpath_index);52}53return result;54} else {55return instanceKlassHandle(); // NULL56}57}58};596061static void add_class_path_entry(const char* path, bool check_for_duplicates,62ClassPathEntry* new_entry) {63ClassLoader::add_to_list(new_entry);64}65static void append_boot_classpath(ClassPathEntry* new_entry) {66ClassLoader::add_to_list(new_entry);67}68static void setup_search_paths() {}6970static void init_lookup_cache(TRAPS) {}71static void copy_lookup_cache_to_archive(char** top, char* end) {}72static char* restore_lookup_cache_from_archive(char* buffer) {return buffer;}73static inline bool is_lookup_cache_enabled() {return false;}7475static bool known_to_not_exist(JNIEnv *env, jobject loader, const char *classname, TRAPS) {return false;}76static jobjectArray get_lookup_cache_urls(JNIEnv *env, jobject loader, TRAPS) {return NULL;}77static jintArray get_lookup_cache(JNIEnv *env, jobject loader, const char *pkgname, TRAPS) {return NULL;}78};7980#endif // SHARE_VM_CLASSFILE_CLASSLOADEREXT_HPP818283