All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.raml.ramltopojo.ResultingPojos Maven / Gradle / Ivy

There is a newer version: 1.0.8
Show newest version
package org.raml.ramltopojo;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Created. There, you have it.
 */
public class ResultingPojos {

    private final List results = new ArrayList<>();
    private final GenerationContextImpl generationContext;

    public ResultingPojos(GenerationContextImpl generationContext) {

        this.generationContext = generationContext;
    }

    public void addNewResult(CreationResult spec) {

        this.results.add(spec);
    }

    public List creationResults() {
        return results;
    }

    public void createFoundTypes(String rootDirectory) throws IOException {

        generationContext.createSupportTypes(rootDirectory);

        for (CreationResult result : results) {
            result.createType(rootDirectory);
        }
    }

    public void createAllTypes(String rootDirectory) throws IOException {

        generationContext.createSupportTypes(rootDirectory);

        for (CreationResult result : results) {
            result.createType(rootDirectory);
        }

        generationContext.createTypes(rootDirectory);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy