use of org.whole.lang.java.builders.JavaGenericBuilderAdapter in project whole by wholeplatform.
the class JavaLanguageDeployer method deploy.
public void deploy(ReflectionFactory platform) {
platform.addLanguageKit(new JavaLanguageKit());
platform.addOperationFactory(JavaLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaGenericBuilderAdapter((IJavaBuilder) strategy, entityContext);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {
public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
return new JavaSpecificBuilderAdapter(strategy, entityContext);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
return new JavaPrettyPrinterVisitor((PrettyPrinterOperation) operation);
}
});
platform.addOperationFactory(JavaLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {
public IVisitor create(IOperation operation, int stage) {
if (stage == 0)
return new JavaInterpreterVisitor();
else
return null;
}
});
}
Aggregations