Search in sources :

Example 1 with PredefinedClassesSupport

use of com.oracle.svm.core.hub.PredefinedClassesSupport 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());
}
Also used : AfterRegistrationAccessImpl(com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl) PredefinedClassesConfigurationParser(com.oracle.svm.core.configure.PredefinedClassesConfigurationParser) PredefinedClassesSupport(com.oracle.svm.core.hub.PredefinedClassesSupport) PredefinedClassesRegistry(com.oracle.svm.core.configure.PredefinedClassesRegistry)

Aggregations

PredefinedClassesConfigurationParser (com.oracle.svm.core.configure.PredefinedClassesConfigurationParser)1 PredefinedClassesRegistry (com.oracle.svm.core.configure.PredefinedClassesRegistry)1 PredefinedClassesSupport (com.oracle.svm.core.hub.PredefinedClassesSupport)1 AfterRegistrationAccessImpl (com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl)1