use of com.oracle.svm.core.configure.SerializationConfigurationParser in project graal by oracle.
the class SerializationBuilder method duringSetup.
@Override
public void duringSetup(DuringSetupAccess a) {
FeatureImpl.DuringSetupAccessImpl access = (FeatureImpl.DuringSetupAccessImpl) a;
ImageClassLoader imageClassLoader = access.getImageClassLoader();
ConfigurationTypeResolver typeResolver = new ConfigurationTypeResolver("serialization configuration", imageClassLoader, NativeImageOptions.AllowIncompleteClasspath.getValue());
SerializationDenyRegistry serializationDenyRegistry = new SerializationDenyRegistry(typeResolver);
serializationBuilder = new SerializationBuilder(serializationDenyRegistry, access, typeResolver);
ImageSingletons.add(RuntimeSerializationSupport.class, serializationBuilder);
SerializationConfigurationParser denyCollectorParser = new SerializationConfigurationParser(serializationDenyRegistry, ConfigurationFiles.Options.StrictConfiguration.getValue());
ConfigurationParserUtils.parseAndRegisterConfigurations(denyCollectorParser, imageClassLoader, "serialization", ConfigurationFiles.Options.SerializationDenyConfigurationFiles, ConfigurationFiles.Options.SerializationDenyConfigurationResources, ConfigurationFile.SERIALIZATION_DENY.getFileName());
SerializationConfigurationParser parser = new SerializationConfigurationParser(serializationBuilder, ConfigurationFiles.Options.StrictConfiguration.getValue());
loadedConfigurations = ConfigurationParserUtils.parseAndRegisterConfigurations(parser, imageClassLoader, "serialization", ConfigurationFiles.Options.SerializationConfigurationFiles, ConfigurationFiles.Options.SerializationConfigurationResources, ConfigurationFile.SERIALIZATION.getFileName());
}
use of com.oracle.svm.core.configure.SerializationConfigurationParser in project graal by oracle.
the class ConfigurationSet method loadSerializationConfig.
public SerializationConfiguration loadSerializationConfig(Function<IOException, Exception> exceptionHandler) throws Exception {
SerializationConfiguration serializationConfiguration = new SerializationConfiguration();
loadConfig(serializationConfigPaths, new SerializationConfigurationParser(serializationConfiguration, true), exceptionHandler);
return serializationConfiguration;
}
Aggregations