This class stores information about which packages need to be stored within each ClassLoader.
This information is used by
Target_java_lang_ClassLoader
to reset the package
information. The package information must be reset because:
- Many more classes may be loaded during native-image generation time than will be reachable
during a normal execution.
- Each ClassLoader should only initially store packages for classes which are initialized at
build-time. Classes (re)initialized during runtime should have their respective package linked
then.
- During native-image generation time, a custom system class loader is used
(NativeImageSystemClassLoader) to load application classes. However, before heap creation,
classes which were loaded by NativeImageSystemClassLoader are updated to point to the default
system class loader via ClassLoaderFeature. Hence, the default system class loader must be
updated to contain references to all appropriate packages.