Package com.asakusafw.compiler.flow.FlowElementProcessor

Examples of com.asakusafw.compiler.flow.FlowElementProcessor.DataObjectMirror


        ModelFactory f = context.getModelFactory();
        OperatorDescription desc = context.getOperatorDescription();
        FlowElementPortDescription master = desc.getInputPorts().get(0);

        Expression hasMaster = context.createField(boolean.class, "sawMaster");
        DataObjectMirror masterCache = context.createModelCache(master.getDataType());
        context.addBegin(new ExpressionBuilder(f, hasMaster)
            .assignFrom(Models.toLiteral(f, false))
            .toStatement());
        context.addProcess(master, f.newIfStatement(
                new ExpressionBuilder(f, hasMaster)
                    .apply(InfixOperator.EQUALS, Models.toLiteral(f, false))
                    .toExpression(),
                f.newBlock(new Statement[] {
                        masterCache.createSet(context.getProcessInput(master)),
                        new ExpressionBuilder(f, hasMaster)
                            .assignFrom(Models.toLiteral(f, true))
                            .toStatement()
                }),
                null));

        this.hasMasterExpresion = hasMaster;
        this.getMasterExpression = masterCache.get();
        this.getCheckedMasterExpression = f.newConditionalExpression(
                hasMasterExpresion,
                getMasterExpression,
                Models.toNullLiteral(f));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.FlowElementProcessor.DataObjectMirror

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.