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

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


                slot.getName(), moduleId);
        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


    public CompiledType emit(String moduleId, List<ResolvedSlot> slots) throws IOException {
        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

            this.environment = envinronment;
            this.moduleId = moduleId;
            this.prologue = prologue;
            this.slot = slot;
            this.factory = envinronment.getModelFactory();
            Name packageName = Models.append(
                    factory,
                    prologue
                        ? envinronment.getProloguePackageName(moduleId)
                        : envinronment.getEpiloguePackageName(moduleId),
                    JavaName.of(slot.getName()).toMemberName());
View Full Code Here

        ShuffleModel shuffle = model.getShuffleModel();
        if (shuffle == null) {
            return;
        }
        Name keyTypeName = shuffle.getCompiled().getKeyTypeName();
        Name valueTypeName = shuffle.getCompiled().getValueTypeName();
        for (ShuffleModel.Segment segment : shuffle.getSegments()) {
            CompiledShuffleFragment fragment = shuffleFragmentEmitter.emit(
                    segment,
                    keyTypeName,
                    valueTypeName,
View Full Code Here

        assert model != null;
        ShuffleModel shuffle = model.getShuffleModel();
        if (shuffle == null) {
            return;
        }
        Name keyTypeName = shuffleKeyEmitter.emit(shuffle);
        Name valueTypeName = shuffleValueEmitter.emit(shuffle);
        Name groupComparatorTypeName = shuffleGroupingEmitter.emit(shuffle, keyTypeName);
        Name sortComparatorTypeName = shuffleSortingEmitter.emit(shuffle, keyTypeName);
        Name partitionerTypeName = shuffleParitioningEmitter.emit(shuffle, keyTypeName, valueTypeName);
        CompiledShuffle compiled = new CompiledShuffle(
                keyTypeName,
                valueTypeName,
                groupComparatorTypeName,
                sortComparatorTypeName,
View Full Code Here

        LOG.debug("{}に対するフラグメントクラスを生成します", fragment);

        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

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

            this.moduleId = moduleId;
            this.slots = slots;
            this.outputDirectory = outputDirectory;
            this.prologue = prologue;
            this.factory = environment.getModelFactory();
            Name packageName = prologue
                ? environment.getProloguePackageName(moduleId)
                : environment.getEpiloguePackageName(moduleId);
            this.importer = new ImportBuilder(
                    factory,
                    factory.newPackageDeclaration(packageName),
View Full Code Here

            this.environment = environment;
            this.stageBlock = stageBlock;
            this.fragment = fragment;
            this.shuffle = shuffle;
            this.factory = environment.getModelFactory();
            Name packageName = environment.getStagePackageName(stageBlock.getStageNumber());
            this.importer = new ImportBuilder(
                    factory,
                    factory.newPackageDeclaration(packageName),
                    ImportBuilder.Strategy.TOP_LEVEL);
            this.names = new NameGenerator(factory);
View Full Code Here

            assert environment != null;
            assert stage != null;
            this.environment = environment;
            this.stage = stage;
            this.factory = environment.getModelFactory();
            Name packageName = environment.getStagePackageName(stage.getNumber());
            this.importer = new ImportBuilder(
                    factory,
                    factory.newPackageDeclaration(packageName),
                    ImportBuilder.Strategy.TOP_LEVEL);
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.syntax.Name

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.