In a modular environment, the ConfigMappingLoader does not have access to generated classes without an explicit opens declaration in the module containing the mapping.
While this works, it would be slightly nicer if instead the user could provide a MethodHandles.Lookup to the various factories on ConfigMapperLoader which accept Class<?> presently. This would allow the user to control access more strictly (if they choose) and also to avoid having to modify the module descriptor for every package which has a config interface in it.
It might be tricky to use a ClassValue-based cache in conjunction with Lookup though.
In a modular environment, the
ConfigMappingLoaderdoes not have access to generated classes without an explicitopensdeclaration in the module containing the mapping.While this works, it would be slightly nicer if instead the user could provide a
MethodHandles.Lookupto the various factories onConfigMapperLoaderwhich acceptClass<?>presently. This would allow the user to control access more strictly (if they choose) and also to avoid having to modify the module descriptor for every package which has a config interface in it.It might be tricky to use a
ClassValue-based cache in conjunction withLookupthough.