Search in sources :

Example 1 with ReflectionConfigurationParser

use of com.oracle.svm.hosted.config.ReflectionConfigurationParser in project graal by oracle.

the class ReflectionFeature method duringSetup.

@Override
public void duringSetup(DuringSetupAccess a) {
    DuringSetupAccessImpl access = (DuringSetupAccessImpl) a;
    ReflectionSubstitution subst = new ReflectionSubstitution(access.getMetaAccess().getWrapped(), access.getImageClassLoader());
    access.registerSubstitutionProcessor(subst);
    ImageSingletons.add(ReflectionSubstitution.class, subst);
    reflectionData = new ReflectionDataBuilder();
    ImageSingletons.add(RuntimeReflectionSupport.class, reflectionData);
    ReflectionConfigurationParser parser = new ReflectionConfigurationParser(reflectionData, access.getImageClassLoader());
    parser.parseAndRegisterConfigurations("reflection", Options.ReflectionConfigurationFiles, Options.ReflectionConfigurationResources);
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl) ReflectionConfigurationParser(com.oracle.svm.hosted.config.ReflectionConfigurationParser)

Example 2 with ReflectionConfigurationParser

use of com.oracle.svm.hosted.config.ReflectionConfigurationParser in project graal by oracle.

the class JNIAccessFeature method afterRegistration.

@Override
public void afterRegistration(AfterRegistrationAccess arg) {
    AfterRegistrationAccessImpl access = (AfterRegistrationAccessImpl) arg;
    JNIReflectionDictionary.initialize();
    JNIRuntimeAccessibilitySupportImpl registry = new JNIRuntimeAccessibilitySupportImpl();
    ImageSingletons.add(JNIRuntimeAccessibilitySupport.class, registry);
    ReflectionConfigurationParser parser = new ReflectionConfigurationParser(registry, access.getImageClassLoader());
    parser.parseAndRegisterConfigurations("JNI", JNIConfigurationFiles, JNIConfigurationResources);
}
Also used : AfterRegistrationAccessImpl(com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl) ReflectionConfigurationParser(com.oracle.svm.hosted.config.ReflectionConfigurationParser)

Aggregations

ReflectionConfigurationParser (com.oracle.svm.hosted.config.ReflectionConfigurationParser)2 AfterRegistrationAccessImpl (com.oracle.svm.hosted.FeatureImpl.AfterRegistrationAccessImpl)1 DuringSetupAccessImpl (com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)1