package xapi.dev.ui;
import com.github.javaparser.ast.expr.UiContainerExpr;
import xapi.dev.ui.ContainerMetadata.MetadataRoot;
/**
* Instances of a {@link UiImplementationGenerator} are responsible
* for generating platform-specific implementations which extend
* a common generic superclass generated by {@link UiGeneratorService}.
*
* It is expected that multiple instances of these generators
* could be run in a single compilation, so care should be
* taken to not mutate any shared state.
*
* Created by James X. Nelson (james @wetheinter.net) on 6/28/16.
*/
public interface UiImplementationGenerator {
UiGeneratorService getGenerator();
UiGeneratorTools getTools();
ContainerMetadata generateComponent(ContainerMetadata metadata, ComponentBuffer buffer);
default ContainerMetadata createMetadata(MetadataRoot root, UiContainerExpr n) {
return getTools().createMetadata(root, n);
}
void setGenerator(UiGeneratorService service);
}