Search in sources :

Example 21 with IBuilder

use of org.whole.lang.builders.IBuilder in project whole by wholeplatform.

the class DBCFGLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new DBCFGLanguageKit());
    platform.addOperationFactory(DBCFGLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new DBCFGGenericBuilderAdapter((IDBCFGBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(DBCFGLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new DBCFGSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) DBCFGSpecificBuilderAdapter(org.whole.lang.dbcfg.builders.DBCFGSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) DBCFGGenericBuilderAdapter(org.whole.lang.dbcfg.builders.DBCFGGenericBuilderAdapter) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IDBCFGBuilder(org.whole.lang.dbcfg.builders.IDBCFGBuilder)

Example 22 with IBuilder

use of org.whole.lang.builders.IBuilder in project whole by wholeplatform.

the class RDBLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new RDBLanguageKit());
    platform.addOperationFactory(RDBLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new RDBGenericBuilderAdapter((IRDBBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(RDBLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new RDBSpecificBuilderAdapter(strategy, entityContext);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IRDBBuilder(org.whole.lang.rdb.builders.IRDBBuilder) RDBSpecificBuilderAdapter(org.whole.lang.rdb.builders.RDBSpecificBuilderAdapter) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) RDBGenericBuilderAdapter(org.whole.lang.rdb.builders.RDBGenericBuilderAdapter)

Example 23 with IBuilder

use of org.whole.lang.builders.IBuilder in project whole by wholeplatform.

the class PropertiesLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new PropertiesLanguageKit());
    platform.addOperationFactory(PropertiesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new PropertiesGenericBuilderAdapter((IPropertiesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(PropertiesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new PropertiesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(PropertiesLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new PropertiesPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
    platform.addOperationFactory(PropertiesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new PropertiesInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addPersistenceKit("org.whole.lang.properties.PropertiesTextEditor", PropertiesTextPersistenceKit.instance());
    platform.addPersistenceKit("org.whole.lang.properties.PropertiesXmlEditor", PropertiesXmlPersistenceKit.instance());
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) PropertiesPrettyPrinterVisitor(org.whole.lang.properties.visitors.PropertiesPrettyPrinterVisitor) PropertiesSpecificBuilderAdapter(org.whole.lang.properties.builders.PropertiesSpecificBuilderAdapter) PropertiesInterpreterVisitor(org.whole.lang.properties.visitors.PropertiesInterpreterVisitor) PropertiesGenericBuilderAdapter(org.whole.lang.properties.builders.PropertiesGenericBuilderAdapter) IPropertiesBuilder(org.whole.lang.properties.builders.IPropertiesBuilder)

Example 24 with IBuilder

use of org.whole.lang.builders.IBuilder in project whole by wholeplatform.

the class QueriesLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new QueriesLanguageKit());
    platform.addOperationFactory(QueriesLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new QueriesGenericBuilderAdapter((IQueriesBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new QueriesSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new QueriesInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new QueriesDynamicCompilerVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(QueriesLanguageKit.URI, PrettyPrinterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            return new QueriesPrettyPrinterVisitor((PrettyPrinterOperation) operation);
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) QueriesDynamicCompilerVisitor(org.whole.lang.queries.visitors.QueriesDynamicCompilerVisitor) PrettyPrinterOperation(org.whole.lang.operations.PrettyPrinterOperation) QueriesPrettyPrinterVisitor(org.whole.lang.queries.visitors.QueriesPrettyPrinterVisitor) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) QueriesSpecificBuilderAdapter(org.whole.lang.queries.builders.QueriesSpecificBuilderAdapter) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) IQueriesBuilder(org.whole.lang.queries.builders.IQueriesBuilder) QueriesInterpreterVisitor(org.whole.lang.queries.visitors.QueriesInterpreterVisitor) QueriesGenericBuilderAdapter(org.whole.lang.queries.builders.QueriesGenericBuilderAdapter)

Example 25 with IBuilder

use of org.whole.lang.builders.IBuilder in project whole by wholeplatform.

the class SemanticsLanguageDeployer method deploy.

public void deploy(ReflectionFactory platform) {
    platform.addLanguageKit(new SemanticsLanguageKit());
    platform.addOperationFactory(SemanticsLanguageKit.URI, GenericBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SemanticsGenericBuilderAdapter((ISemanticsBuilder) strategy, entityContext);
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, SpecificBuilderAdapterOperation.ID, new IBuilderFactory() {

        public IBuilder create(IBuilder strategy, IEntityContext entityContext) {
            return new SemanticsSpecificBuilderAdapter(strategy, entityContext);
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, InterpreterOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new SemanticsInterpreterVisitor();
            else
                return null;
        }
    });
    platform.addOperationFactory(SemanticsLanguageKit.URI, DynamicCompilerOperation.ID, new IVisitorFactory() {

        public IVisitor create(IOperation operation, int stage) {
            if (stage == 0)
                return new SemanticsDynamicCompilerVisitor();
            else
                return null;
        }
    });
}
Also used : IBuilder(org.whole.lang.builders.IBuilder) IOperation(org.whole.lang.operations.IOperation) IVisitor(org.whole.lang.visitors.IVisitor) IEntityContext(org.whole.lang.contexts.IEntityContext) ISemanticsBuilder(org.whole.lang.semantics.builders.ISemanticsBuilder) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) SemanticsSpecificBuilderAdapter(org.whole.lang.semantics.builders.SemanticsSpecificBuilderAdapter) SemanticsInterpreterVisitor(org.whole.lang.semantics.visitors.SemanticsInterpreterVisitor) SemanticsDynamicCompilerVisitor(org.whole.lang.semantics.visitors.SemanticsDynamicCompilerVisitor) SemanticsGenericBuilderAdapter(org.whole.lang.semantics.builders.SemanticsGenericBuilderAdapter)

Aggregations

IBuilder (org.whole.lang.builders.IBuilder)42 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)42 IEntityContext (org.whole.lang.contexts.IEntityContext)42 IOperation (org.whole.lang.operations.IOperation)20 IVisitor (org.whole.lang.visitors.IVisitor)20 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)20 PrettyPrinterOperation (org.whole.lang.operations.PrettyPrinterOperation)11 IRedBlackTreeBuilder (org.whole.examples.datatypes.redblacktree.builders.IRedBlackTreeBuilder)1 RedBlackTreeGenericBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeGenericBuilderAdapter)1 RedBlackTreeSpecificBuilderAdapter (org.whole.examples.datatypes.redblacktree.builders.RedBlackTreeSpecificBuilderAdapter)1 IImpBuilder (org.whole.examples.lang.imp.builders.IImpBuilder)1 ImpGenericBuilderAdapter (org.whole.examples.lang.imp.builders.ImpGenericBuilderAdapter)1 ImpSpecificBuilderAdapter (org.whole.examples.lang.imp.builders.ImpSpecificBuilderAdapter)1 BytecodeGeneratorOperation (org.whole.examples.lang.imp.visitors.BytecodeGeneratorOperation)1 ImpBytecodeGeneratorVisitor (org.whole.examples.lang.imp.visitors.ImpBytecodeGeneratorVisitor)1 ImpDefUseValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpDefUseValidatorVisitor)1 ImpInterpreterVisitor (org.whole.examples.lang.imp.visitors.ImpInterpreterVisitor)1 ImpPrettyPrinterVisitor (org.whole.examples.lang.imp.visitors.ImpPrettyPrinterVisitor)1 ImpResolverValidatorVisitor (org.whole.examples.lang.imp.visitors.ImpResolverValidatorVisitor)1 ActionsGenericBuilderAdapter (org.whole.lang.actions.builders.ActionsGenericBuilderAdapter)1