Examples of newIfStatement()


Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        arguments.add(context.getProcessInput(tx));
        for (OperatorDescription.Parameter param : desc.getParameters()) {
            arguments.add(Models.toLiteral(f, param.getValue()));
        }

        context.addProcess(tx, f.newIfStatement(
                masterAnalyzer.getHasMasterExpresion(),
                f.newBlock(new Statement[] {
                        new ExpressionBuilder(f, impl)
                            .method(desc.getDeclaration().getName(), arguments)
                            .toStatement(),
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        FlowElementPortDescription foundPort = context.getOutputPort(MasterCheck.ID_OUTPUT_FOUND);
        FlowElementPortDescription missedPort = context.getOutputPort(MasterCheck.ID_OUTPUT_MISSED);
        ResultMirror found = context.getOutput(foundPort);
        ResultMirror missed = context.getOutput(missedPort);

        context.addProcess(tx, f.newIfStatement(
                masterAnalyzer.getHasMasterExpresion(),
                f.newBlock(found.createAdd(context.getProcessInput(tx))),
                f.newBlock(missed.createAdd(context.getProcessInput(tx)))));
    }
}
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        }
        ResultMirror joined = context.getOutput(joinedPort);
        process.add(joined.createAdd(resultCache.get()));

        ResultMirror missed = context.getOutput(missedPort);
        context.add(f.newIfStatement(
                helper.getHasMasterExpresion(),
                f.newBlock(process),
                f.newBlock(missed.createAdd(context.getInput()))));
    }
}
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        arguments.add(context.getInput());
        for (OperatorDescription.Parameter param : desc.getParameters()) {
            arguments.add(Models.toLiteral(f, param.getValue()));
        }

        context.add(f.newIfStatement(
                helper.getHasMasterExpresion(),
                f.newBlock(new Statement[] {
                        new ExpressionBuilder(f, impl)
                            .method(desc.getDeclaration().getName(), arguments)
                            .toStatement(),
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        FlowElementPortDescription foundPort = context.getOutputPort(SideDataCheck.ID_OUTPUT_FOUND);
        FlowElementPortDescription missedPort = context.getOutputPort(SideDataCheck.ID_OUTPUT_MISSED);
        ResultMirror found = context.getOutput(foundPort);
        ResultMirror missed = context.getOutput(missedPort);

        context.add(f.newIfStatement(
                helper.getHasMasterExpresion(),
                f.newBlock(found.createAdd(context.getInput())),
                f.newBlock(missed.createAdd(context.getInput()))));
    }
}
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        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)),
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        assert selector.getParameterTypes().size() <= arguments.size();
        if (selector.getParameterTypes().size() <= arguments.size()) {
            arguments = arguments.subList(0, selector.getParameterTypes().size());
        }
        Expression impl = context.createImplementation();
        context.add(f.newIfStatement(
                new ExpressionBuilder(f, lookup)
                    .apply(InfixOperator.NOT_EQUALS, Models.toNullLiteral(f))
                    .toExpression(),
                f.newBlock(new ExpressionBuilder(f, selected)
                    .assignFrom(new ExpressionBuilder(f, impl)
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

            if (folding.aggregator() == Aggregator.ANY) {
                continue;
            }
            combine.add(createAddSummarizeFor(context, folding, outputType, cache.get()));
        }
        context.addProcess(input, f.newIfStatement(
                init,
                f.newBlock(combine),
                f.newBlock(
                        cache.createSet(context.getProcessInput(input)),
                        new ExpressionBuilder(f, init)
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        ResultMirror joined = context.getOutput(joinedPort);
        process.add(joined.createAdd(resultCache.get()));

        ResultMirror missed = context.getOutput(missedPort);
        context.addProcess(tx, f.newIfStatement(
                masterAnalyzer.getHasMasterExpresion(),
                f.newBlock(process),
                f.newBlock(missed.createAdd(context.getProcessInput(tx)))));
    }
}
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.ModelFactory.newIfStatement()

        arguments.add(proc);
        for (OperatorDescription.Parameter param : desc.getParameters()) {
            arguments.add(Models.toLiteral(f, param.getValue()));
        }

        context.addProcess(input, f.newIfStatement(
                init,
                f.newBlock(new ExpressionBuilder(f, impl)
                    .method(desc.getDeclaration().getName(), arguments)
                    .toStatement()),
                f.newBlock(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.