Package com.asakusafw.compiler.directio.OutputPattern

Examples of com.asakusafw.compiler.directio.OutputPattern.RandomNumber


                        .method("setProperty", Models.toLiteral(factory, position), property.createGetter(object))
                        .toStatement());
                    break;
                }
                case RANDOM: {
                    RandomNumber rand = naming.getRandomNumber();
                    statements.add(new ExpressionBuilder(factory, factory.newThis())
                        .field(FIELD_RANDOM_HOLDER)
                        .method("modify", new ExpressionBuilder(factory, factory.newThis())
                            .field(FIELD_RANDOMIZER)
                            .method(
                                    "nextInt",
                                    Models.toLiteral(factory, rand.getUpperBound() - rand.getLowerBound() + 1))
                            .apply(InfixOperator.PLUS, Models.toLiteral(factory, rand.getLowerBound()))
                            .toExpression())
                        .toStatement());
                    statements.add(new ExpressionBuilder(factory, factory.newThis())
                        .method("setProperty",
                                Models.toLiteral(factory, position),
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.directio.OutputPattern.RandomNumber

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.