use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class SchemeLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new SchemeLanguageKit());
platform.addOperationFactory(SchemeLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SchemeGenericBuilderAdapter((ISchemeBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(SchemeLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SchemeSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(SchemeLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new SchemeInterpreterVisitor((InterpreterOperation) operation);
else
return null;
}
});
platform.addEditorKit(SchemeTextualEditorKit.ID);
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class ImpLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ImpLanguageKit());
platform.addOperationFactory(ImpLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ImpGenericBuilderAdapter((IImpBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ImpSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ImpPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ImpInterpreterVisitor((InterpreterOperation) operation);
else
return null;
}
});
platform.addOperationFactory(ImpLanguageKit.URI, ValidatorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return ImpTraversalFactory.instance.topDown(ImpTraversalFactory.instance.sequence(new ImpResolverValidatorVisitor((ValidatorOperation) operation), new ImpDefUseValidatorVisitor((ValidatorOperation) operation)), false);
}
});
platform.addOperationFactory(ImpLanguageKit.URI, BytecodeGeneratorOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new ImpBytecodeGeneratorVisitor((BytecodeGeneratorOperation) operation);
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class ActionsLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new ActionsLanguageKit());
platform.addOperationFactory(ActionsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ActionsGenericBuilderAdapter((IActionsBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new ActionsSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ActionsInterpreterVisitor();
else
return null;
}
});
platform.addOperationFactory(ActionsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new ActionsDynamicCompilerVisitor();
else
return null;
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class PojoLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new PojoLanguageKit());
platform.addOperationFactory(PojoLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PojoGenericBuilderAdapter((IPojoBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(PojoLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new PojoSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(PojoLanguageKit.URI, NormalizerOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new PojoNormalizerVisitor();
}
});
}
use of org.whole.lang.builders.IBuilderFactory in project whole by wholeplatform.
the class SQLLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new SQLLanguageKit());
platform.addOperationFactory(SQLLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SQLGenericBuilderAdapter((ISQLBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new SQLSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new SQLPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(SQLLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new SQLInterpreterVisitor();
else
return null;
}
});
}
Aggregations