JavaCompilerFacade { public <T> Class<? extends T> apply(JavaSource<T> source) { return compile(source); } JavaCompilerFacade(ClassLoader loader); Class<? extends T> apply(JavaSource<T> source);  }
@Test public void shouldCreateGetterClass() { Stream.of(Foo.class.getDeclaredConstructors()).forEach(c -> c.setAccessible(true)); Foo foo = new Foo(); foo.setBar("bar"); JavaCompilerBeanPropertyReaderFactory factory = new JavaCompilerBeanPropertyReaderFactory(); ReadFromGetterMethod propertyReader = factory.generate(Foo.class, "bar"); Object bar = propertyReader.apply(foo); Assertions.assertEquals("bar", bar); }