< prev index next >

src/hotspot/share/classfile/classLoaderExt.hpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 61,10 ***
--- 61,17 ---
    static bool _has_non_jar_in_classpath;
  
    static char* read_manifest(JavaThread* current, ClassPathEntry* entry, jint *manifest_size, bool clean_text);
    static bool has_jar_suffix(const char* filename);
  
+   // All classes whose path_index is within
+   //     [_app_class_exclusion_start_path_index ... _app_module_paths_start_index)
+   // are excluded from the archive. See -XX:CacheOnlyClassesIn.
+   static int  _app_class_exclusion_start_path_index;
+ 
+   static ClassPathEntry* get_class_path_entry(s2 classpath_index);
+   static void check_invalid_classpath_index(s2 classpath_index, InstanceKlass* ik);
  public:
    static void process_jar_manifest(JavaThread* current, ClassPathEntry* entry);
  
    // Called by JVMTI code to add boot classpath
    static void append_boot_classpath(ClassPathEntry* new_entry);

*** 130,9 ***
--- 137,16 ---
      _has_platform_classes = true;
    }
    static void set_has_non_jar_in_classpath() {
      _has_non_jar_in_classpath = true;
    }
+ 
+   // -XX:CacheOnlyClassesIn=
+   static bool should_be_excluded(InstanceKlass* k);
+   static void set_app_class_exclusion_start_path_index(int i) {
+     _app_class_exclusion_start_path_index = i;
+   }
+ 
  #endif // INCLUDE_CDS
  };
  
  #endif // SHARE_CLASSFILE_CLASSLOADEREXT_HPP
< prev index next >