Search in sources :

Example 1 with ActionsDynamicCompilerVisitor

use of org.whole.lang.actions.visitors.ActionsDynamicCompilerVisitor 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;
        }
    });
}
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) IBuilderFactory(org.whole.lang.builders.IBuilderFactory) ActionsGenericBuilderAdapter(org.whole.lang.actions.builders.ActionsGenericBuilderAdapter) IVisitorFactory(org.whole.lang.visitors.IVisitorFactory) ActionsInterpreterVisitor(org.whole.lang.actions.visitors.ActionsInterpreterVisitor) IActionsBuilder(org.whole.lang.actions.builders.IActionsBuilder) ActionsSpecificBuilderAdapter(org.whole.lang.actions.builders.ActionsSpecificBuilderAdapter) ActionsDynamicCompilerVisitor(org.whole.lang.actions.visitors.ActionsDynamicCompilerVisitor)

Aggregations

ActionsGenericBuilderAdapter (org.whole.lang.actions.builders.ActionsGenericBuilderAdapter)1 ActionsSpecificBuilderAdapter (org.whole.lang.actions.builders.ActionsSpecificBuilderAdapter)1 IActionsBuilder (org.whole.lang.actions.builders.IActionsBuilder)1 ActionsDynamicCompilerVisitor (org.whole.lang.actions.visitors.ActionsDynamicCompilerVisitor)1 ActionsInterpreterVisitor (org.whole.lang.actions.visitors.ActionsInterpreterVisitor)1 IBuilder (org.whole.lang.builders.IBuilder)1 IBuilderFactory (org.whole.lang.builders.IBuilderFactory)1 IEntityContext (org.whole.lang.contexts.IEntityContext)1 IOperation (org.whole.lang.operations.IOperation)1 IVisitor (org.whole.lang.visitors.IVisitor)1 IVisitorFactory (org.whole.lang.visitors.IVisitorFactory)1