use of com.oracle.svm.core.configure.PredefinedClassesConfigurationParser in project graal by oracle.
the class ConfigurationSet method loadPredefinedClassesConfig.
public PredefinedClassesConfiguration loadPredefinedClassesConfig(Path[] classDestinationDirs, Predicate<String> shouldExcludeClassesWithHash, Function<IOException, Exception> exceptionHandler) throws Exception {
PredefinedClassesConfiguration predefinedClassesConfiguration = new PredefinedClassesConfiguration(classDestinationDirs, shouldExcludeClassesWithHash);
loadConfig(predefinedClassesConfigPaths, new PredefinedClassesConfigurationParser(predefinedClassesConfiguration::add, true), exceptionHandler);
return predefinedClassesConfiguration;
}
use of com.oracle.svm.core.configure.PredefinedClassesConfigurationParser in project graal by oracle.
the class ClassPredefinitionFeature method afterRegistration.
@Override
public void afterRegistration(AfterRegistrationAccess arg) {
ImageSingletons.add(PredefinedClassesSupport.class, new PredefinedClassesSupport());
/*
* NOTE: loading the class predefinition configuration should be done as early as possible
* so that their classes are already known for other configuration (reflection, proxies).
*/
AfterRegistrationAccessImpl access = (AfterRegistrationAccessImpl) arg;
PredefinedClassesRegistry registry = new PredefinedClassesRegistryImpl();
ImageSingletons.add(PredefinedClassesRegistry.class, registry);
PredefinedClassesConfigurationParser parser = new PredefinedClassesConfigurationParser(registry, ConfigurationFiles.Options.StrictConfiguration.getValue());
ConfigurationParserUtils.parseAndRegisterConfigurations(parser, access.getImageClassLoader(), "class predefinition", ConfigurationFiles.Options.PredefinedClassesConfigurationFiles, ConfigurationFiles.Options.PredefinedClassesConfigurationResources, ConfigurationFile.PREDEFINED_CLASSES_NAME.getFileName());
}
Aggregations