use of org.whole.lang.java.builders.JavaSpecificBuilderAdapter in project whole by wholeplatform.
the class JDT2JavaBuilder method transform.
public static IEntity transform(ASTNode model) {
JavaSpecificBuilderAdapter builder = new JavaSpecificBuilderAdapter(new ModelBuilder());
transform(model, builder);
return builder.wGetResult();
}
use of org.whole.lang.java.builders.JavaSpecificBuilderAdapter 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