Package com.asakusafw.utils.java.model.syntax

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


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


        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)
                        .method(selector.getName(), arguments)
                        .toExpression())
                    .toStatement())));
View Full Code Here

            }
            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)
                            .assignFrom(Models.toLiteral(f, true))
                            .toStatement())));
View Full Code Here

            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)
                            .assignFrom(Models.toLiteral(f, true))
                            .toStatement())));
View Full Code Here

        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

        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

            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(
                        cache.createSet(proc),
                        new ExpressionBuilder(f, init)
View Full Code Here

        context.addProcess(input, f.newIfStatement(
                init,
                f.newBlock(new ExpressionBuilder(f, impl)
                    .method(desc.getDeclaration().getName(), arguments)
                    .toStatement()),
                f.newBlock(
                        cache.createSet(proc),
                        new ExpressionBuilder(f, init)
                            .assignFrom(Models.toLiteral(f, true))
                            .toStatement())));
View Full Code Here

                Collections.singletonList(f.newFormalParameterDeclaration(
                        context.resolve(DataOutput.class),
                        parameter)),
                0,
                Collections.singletonList(context.resolve(IOException.class)),
                f.newBlock(statements));
    }

    private MethodDeclaration createReadFields(EmitContext context, ModelDeclaration model) {
        assert context != null;
        assert model != null;
View Full Code Here

                Arrays.asList(f.newFormalParameterDeclaration(
                        context.resolve(DataInput.class),
                        parameter)),
                0,
                Collections.singletonList(context.resolve(IOException.class)),
                f.newBlock(statements));
    }
}
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.