Top Description Constructors Methods
org.graalvm.nativeimage.hosted

public final Class RuntimeResourceAccess

extends Object
Class Inheritance
Annotations
@Platforms:HOSTED_ONLY
Imports
java.util.Arrays, .Locale, .Objects, java.util.regex.Pattern, org.graalvm.nativeimage.ImageSingletons, .Platform, .Platforms, org.graalvm.nativeimage.impl.ConfigurationCondition, .RuntimeResourceSupport

This class can be used to register Java resources and ResourceBundles that should be accessible at run time.
Since
22.3

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
addResource(Module module, String resourcePath)

Make Java resource resourcePath from module available at run time.

public static void
addResource(Module module, String resourcePath, byte[] resourceContent)

Inject a Java resource at resourcePath in module with the specified resourceContent.

public static void
addResourceBundle(Module module, String baseBundleName, Locale[] locales)

Make Java ResourceBundle that is specified by a baseBundleName and locales from module module available at run time.

public static void
addResourceBundle(Module module, String bundleName)

Make Java ResourceBundle that is specified by a bundleName from module module available at run time.

private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

RuntimeResourceAccessback to summary
private RuntimeResourceAccess()

Method Detail

addResourceback to summary
public static void addResource(Module module, String resourcePath)

Make Java resource resourcePath from module available at run time. If the given module is unnamed, the resource is looked up on the classpath instead.

Since
22.3
addResourceback to summary
public static void addResource(Module module, String resourcePath, byte[] resourceContent)

Inject a Java resource at resourcePath in module with the specified resourceContent. At runtime the resource can be accessed as if it was part of the original application. If the given module is unnamed, the resource is placed on the classpath instead.

Since
22.3
addResourceBundleback to summary
public static void addResourceBundle(Module module, String baseBundleName, Locale[] locales)

Make Java ResourceBundle that is specified by a baseBundleName and locales from module module available at run time. If the given module is unnamed, the ResourceBundle is looked up on the classpath instead.

Since
22.3
addResourceBundleback to summary
public static void addResourceBundle(Module module, String bundleName)

Make Java ResourceBundle that is specified by a bundleName from module module available at run time. If the given module is unnamed, the ResourceBundle is looked up on the classpath instead.

Since
22.3
withModuleNameback to summary
private static String withModuleName(Module module, String str)