use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class TemplatesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new TemplatesLanguageKit());
platform.addOperationFactory(TemplatesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TemplatesGenericBuilderAdapter((ITemplatesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(TemplatesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TemplatesSpecificBuilderAdapter(strategy, entityContext);
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class SyntaxTreesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new SyntaxTreesLanguageKit());
platform.addOperationFactory(SyntaxTreesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SyntaxTreesGenericBuilderAdapter((ISyntaxTreesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(SyntaxTreesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SyntaxTreesSpecificBuilderAdapter(strategy, entityContext);
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class TestEntitiesLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
if (ReflectionFactory.getLanguageKitRegistry().containsResource(TestEntitiesLanguageKit.URI, false, null))
return;
platform.addLanguageKit(new TestEntitiesLanguageKit());
platform.addOperationFactory(TestEntitiesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestEntitiesGenericBuilderAdapter((ITestEntitiesBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(TestEntitiesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new TestEntitiesSpecificBuilderAdapter(strategy, entityContext);
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class ModelsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ModelsLanguageKit());
platform.addOperationFactory(ModelsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsGenericBuilderAdapter((IModelsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ModelsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ExportTexOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new TeXGeneratorVisitor((ExportTexOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsValidatorVisitor();
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ModelsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ModelsLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ModelsNormalizerVisitor();
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class XsdLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new XsdLanguageKit());
platform.addOperationFactory(XsdLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new XsdGenericBuilderAdapter((IXsdBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(XsdLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new XsdSpecificBuilderAdapter(strategy, entityContext);
}
});
}
Aggregations