Examples of SimpleName


Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.singletonList(type),
                    Collections.<Comment>emptyList());
        }

        private TypeDeclaration createType() throws IOException {
            SimpleName name = factory.newSimpleName(Naming.getClientClass());
            importer.resolvePackageMember(name);
            List<TypeBodyDeclaration> members = Lists.create();
            members.addAll(createIdMethods());
            members.add(createStageOutputPath());
            members.add(createStageInputsMethod());
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    t(String.class),
                    Models.toLiteral(factory, outputDirectory.toPath(PATH_SEPARATOR)));
        }

        private MethodDeclaration createStageInputsMethod() throws IOException {
            SimpleName list = factory.newSimpleName("results");
            SimpleName attributes = factory.newSimpleName("attributes");

            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageInput.class)))
                .newObject()
                .toLocalVariableDeclaration(t(List.class, t(StageInput.class)), list));
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    statements);
        }


        private MethodDeclaration createStageOutputsMethod() {
            SimpleName list = factory.newSimpleName("results");
            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageOutput.class)))
                .newObject()
                .toLocalVariableDeclaration(t(List.class, t(StageOutput.class)), list));
            for (CopyDescription slot : slots) {
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.singletonList(type),
                    Collections.<Comment>emptyList());
        }

        private TypeDeclaration createType() {
            SimpleName name = factory.newSimpleName(
                    Naming.getReduceFragmentClass(fragment.getSerialNumber()));
            importer.resolvePackageMember(name);
            List<TypeBodyDeclaration> members = Lists.create();
            members.addAll(connection.createFields());
            ConstructorDeclaration ctor = connection.createConstructor(name);
            List<MethodDeclaration> methods = Lists.create();
            SimpleName value = names.create("value");
            methods.add(createProcess(value));
            methods.addAll(emit(value));
            members.addAll(extraFields);
            members.add(ctor);
            members.addAll(methods);
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.singletonList(type),
                    Collections.<Comment>emptyList());
        }

        private TypeDeclaration createType() {
            SimpleName name = factory.newSimpleName(Naming.getClientClass());
            importer.resolvePackageMember(name);
            List<TypeBodyDeclaration> members = Lists.create();
            members.addAll(createIdMethods());
            members.add(createStageOutputPath());
            members.add(createStageInputsMethod());
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    t(String.class),
                    Models.toLiteral(factory, path));
        }

        private MethodDeclaration createStageInputsMethod() {
            SimpleName list = factory.newSimpleName("results");
            SimpleName attributes = factory.newSimpleName("attributes");

            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageInput.class)))
                .newObject()
                .toLocalVariableDeclaration(t(List.class, t(StageInput.class)), list));
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

         * @return 生成したローカル変数を参照するための式
         * @throws IllegalArgumentException 引数に{@code null}が指定された場合
         */
        public Expression createLocalVariable(Type type, Expression initializer) {
            Precondition.checkMustNotBeNull(type, "type"); //$NON-NLS-1$
            SimpleName name = names.create("v");
            add(new ExpressionBuilder(factory, initializer)
                .toLocalVariableDeclaration(importer.resolve(type), name));
            return name;
        }
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.<FormalParameterDeclaration>emptyList(),
                    statements);
        }

        private MethodDeclaration createStageOutputsMethod() {
            SimpleName list = factory.newSimpleName("results");
            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageOutput.class)))
                .newObject()
                .toLocalVariableDeclaration(t(List.class, t(StageOutput.class)), list));
            for (Delivery process : stage.getDeliveries()) {
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.<FormalParameterDeclaration>emptyList(),
                    statements);
        }

        private TypeBodyDeclaration createStageResourcesMethod() {
            SimpleName list = factory.newSimpleName("results");
            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, t(ArrayList.class, t(StageResource.class)))
                .newObject()
                .toLocalVariableDeclaration(t(List.class, t(StageResource.class)), list));
            for (SideData sideData : stage.getSideData()) {
View Full Code Here

Examples of com.asakusafw.utils.java.model.syntax.SimpleName

                    Collections.singletonList(type),
                    Collections.<Comment>emptyList());
        }

        private TypeDeclaration createType() {
            SimpleName name = getClassSimpleName();
            importer.resolvePackageMember(name);

            List<TypeBodyDeclaration> members = Lists.create();
            members.addAll(createFields());
            ConstructorDeclaration ctor = createConstructor();
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.