public Mapper(Class<S> structInterface, boolean debugEnabled) { this.debugEnabled = debugEnabled; this.structInterface = structInterface; inspector = new TypeInspector(structInterface); compiler = new SimpleCompiler(); }
public CompilationResult compile(final String name, final String src) { return compile(asList(new StringWrappingJavaFile(name, src))); }
SimpleCompiler compiler = new SimpleCompiler(); CompilationResult result = compiler.compile(model.blockingQueueClassName, blockingQueueClassFile);
public <I> I newFlyweight(Class<I> implementationParent, String templateFileName, Template template, Object... args) { Class<?>[] constructorParameterTypes = getTypes(args); ClassViewModel model = new ClassViewModel(implementationParent, constructorParameterTypes, structInterface, inspector); String source = template.render(model); debugLogSource(source); CompilationResult result = compiler.compile(model.className(), source); checkCompileFailures(templateFileName, result); return instantiateImplementation(constructorParameterTypes, model.className(), result, args); }