Search in sources :

Example 1 with DynamicProxySupport

use of com.oracle.svm.reflect.proxy.DynamicProxySupport in project graal by oracle.

the class DynamicProxyFeature method duringSetup.

@Override
public void duringSetup(DuringSetupAccess a) {
    DuringSetupAccessImpl access = (DuringSetupAccessImpl) a;
    ImageClassLoader imageClassLoader = access.getImageClassLoader();
    DynamicProxySupport dynamicProxySupport = new DynamicProxySupport(imageClassLoader.getClassLoader());
    ImageSingletons.add(DynamicProxyRegistry.class, dynamicProxySupport);
    ConfigurationTypeResolver typeResolver = new ConfigurationTypeResolver("resource configuration", imageClassLoader, NativeImageOptions.AllowIncompleteClasspath.getValue());
    ProxyRegistry proxyRegistry = new ProxyRegistry(typeResolver, dynamicProxySupport, imageClassLoader);
    ImageSingletons.add(ProxyRegistry.class, proxyRegistry);
    ProxyConfigurationParser parser = new ProxyConfigurationParser(proxyRegistry, ConfigurationFiles.Options.StrictConfiguration.getValue());
    loadedConfigurations = ConfigurationParserUtils.parseAndRegisterConfigurations(parser, imageClassLoader, "dynamic proxy", ConfigurationFiles.Options.DynamicProxyConfigurationFiles, ConfigurationFiles.Options.DynamicProxyConfigurationResources, ConfigurationFile.DYNAMIC_PROXY.getFileName());
    proxyCacheField = access.findField(DynamicProxySupport.class, "proxyCache");
}
Also used : DuringSetupAccessImpl(com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl) DynamicProxySupport(com.oracle.svm.reflect.proxy.DynamicProxySupport) DynamicProxyRegistry(com.oracle.svm.core.jdk.proxy.DynamicProxyRegistry) ProxyConfigurationParser(com.oracle.svm.core.configure.ProxyConfigurationParser) ConfigurationTypeResolver(com.oracle.svm.hosted.ConfigurationTypeResolver) ImageClassLoader(com.oracle.svm.hosted.ImageClassLoader)

Aggregations

ProxyConfigurationParser (com.oracle.svm.core.configure.ProxyConfigurationParser)1 DynamicProxyRegistry (com.oracle.svm.core.jdk.proxy.DynamicProxyRegistry)1 ConfigurationTypeResolver (com.oracle.svm.hosted.ConfigurationTypeResolver)1 DuringSetupAccessImpl (com.oracle.svm.hosted.FeatureImpl.DuringSetupAccessImpl)1 ImageClassLoader (com.oracle.svm.hosted.ImageClassLoader)1 DynamicProxySupport (com.oracle.svm.reflect.proxy.DynamicProxySupport)1