private Compiled compile(String name) { add(name); add("com.example.Mock"); ClassLoader classLoader = start(operatorProcessor()); Class<?> origin = load(classLoader, name); Object factory = create(classLoader, Constants.getFactoryClass(name)); Object impl = create(classLoader, Constants.getImplementationClass(name)); return new Compiled(origin, factory, impl); }
private Object compile(String name) { add(name); ClassLoader classLoader = start( new Callback() { @Override protected void test() { TypeElement element = env.findTypeElement(new ClassDescription(name)); if (round.getRootElements().contains(element)) { assertThat(name, element, is(notNullValue())); OperatorImplementationEmitter emitter = new OperatorImplementationEmitter(env); emitter.emit(new OperatorClass(element, Collections.emptyList())); } } }); return create(classLoader, Constants.getImplementationClass(name)); }