use of org.whole.lang.java.visitors.JavaPrettyPrinterVisitor 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