Examples of SimpleName


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

        CompilationUnit source;
        Engine engine = new Engine(environment, moduleId, slot, prologue);
        source = engine.generate();
        environment.emit(source);
        Name packageName = source.getPackageDeclaration().getName();
        SimpleName simpleName = source.getTypeDeclarations().get(0).getName();
        Name name = environment.getModelFactory().newQualifiedName(packageName, simpleName);
        LOG.debug("Mapper for \"{}\" is {}",
                slot.getName(),
                name);
        return new CompiledType(name);
View Full Code Here

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

        LOG.debug("\"{}\"エピローグ用のレデューサーを生成します", moduleId);
        Engine engine = new Engine(environment, moduleId, slots);
        CompilationUnit source = engine.generate();
        environment.emit(source);
        Name packageName = source.getPackageDeclaration().getName();
        SimpleName simpleName = source.getTypeDeclarations().get(0).getName();
        Name name = environment.getModelFactory().newQualifiedName(packageName, simpleName);
        LOG.debug("エピローグ用レデューサーには{}が利用されます", name);
        return new CompiledType(name);
    }
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.getMapClass(0));
            importer.resolvePackageMember(name);
            return factory.newClassDeclaration(
                    new JavadocBuilder(factory)
                        .text("Mapper for input \"{0}\" in prologue phase.", slot.getName())
                        .toJavadoc(),
View Full Code Here

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

    private List<TypeParameterDeclaration> toTypeParameters(
            List<? extends TypeParameterElement> typeParameters) {
        assert typeParameters != null;
        List<TypeParameterDeclaration> results = Lists.create();
        for (TypeParameterElement typeParameter : typeParameters) {
            SimpleName name = factory.newSimpleName(typeParameter.getSimpleName().toString());
            List<Type> typeBounds = Lists.create();
            for (TypeMirror typeBound : typeParameter.getBounds()) {
                typeBounds.add(t(typeBound));
            }
            results.add(factory.newTypeParameterDeclaration(name, typeBounds));
View Full Code Here

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

    }

    private List<Type> toTypeVariables(List<? extends TypeParameterElement> typeParameters) {
        List<Type> results = Lists.create();
        for (TypeParameterElement typeParameter : typeParameters) {
            SimpleName name = factory.newSimpleName(typeParameter.getSimpleName().toString());
            results.add(factory.newNamedType(name));
        }
        return results;
    }
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.getReduceClass());
            importer.resolvePackageMember(name);
            return factory.newClassDeclaration(
                    new JavadocBuilder(factory)
                        .text("エピローグ用のレデューサー。")
                        .toJavadoc(),
View Full Code Here

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

            results.put("stageId", Models.toLiteral(factory, Naming.getEpilogueName(moduleId)));
            return results;
        }

        private MethodDeclaration createSlotNames() {
            SimpleName resultName = factory.newSimpleName("results");
            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, importer.toType(String.class))
                .array(1)
                .newArray(getSlotCount())
                .toLocalVariableDeclaration(
View Full Code Here

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

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

        private MethodDeclaration createSlotObjects() {
            SimpleName resultName = factory.newSimpleName("results");
            List<Statement> statements = Lists.create();
            statements.add(new TypeBuilder(factory, importer.toType(Writable.class))
                .array(1)
                .newArray(getSlotCount())
                .toLocalVariableDeclaration(
View Full Code Here

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

        Engine engine = new Engine(environment, stageBlock, fragment, shuffle);
        CompilationUnit source = engine.generate();
        environment.emit(source);
        Name packageName = source.getPackageDeclaration().getName();
        SimpleName simpleName = source.getTypeDeclarations().get(0).getName();

        QualifiedName name = environment
            .getModelFactory()
            .newQualifiedName(packageName, simpleName);
View Full Code Here

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

                prologue ? "prologue" : "epilogue");
        Engine engine = new Engine(environment, moduleId, slots, outputDirectory, prologue);
        CompilationUnit source = engine.generate();
        environment.emit(source);
        Name packageName = source.getPackageDeclaration().getName();
        SimpleName simpleName = source.getTypeDeclarations().get(0).getName();
        QualifiedName name = environment
            .getModelFactory()
            .newQualifiedName(packageName, simpleName);
        LOG.debug("\"{}\" will use {}", moduleId, name);
        return new CompiledStage(name, prologue ? Naming.getPrologueName(moduleId) : Naming.getEpilogueName(moduleId));
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.