Gin is doing Constructor<? extends GinModule> constructor = moduleClassName.getDeclaredConstructor(); try { constructor.setAccessible(true); return new GinModuleAdapter(constructor.newInstance()); } finally { constructor.setAccessible(false); }
If I understand what you are saying is something along the lines of moduleClassName = context.getSpecialClassLoader().loadClass(...); but the new GinModuleAdapter would blow up. Since GinModuleAdapter is loaded by SystemCL and is expecting GinModule also loaded from SCL but it would get an instance of GinModule from SpecialCL. What am I missing? On Jul 22, 7:30 pm, Scott Blum <sco...@google.com> wrote: > Brian, do you know if Guice allows you to specify a ClassLoader other than > the "active" one? > In principle, I would be okay with GeneratorContext providing a special > "other" ClassLoader to generators that contained only client code; it would > have exactly what TypeOracle does.and just be another way to get the exact > same information. > > I just think we need to separate the machine from the materials. :) --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---