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

org.raml.ramltopojo.extensions.UnionPluginContextImpl Maven / Gradle / Ivy

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

import org.raml.ramltopojo.CreationResult;
import org.raml.ramltopojo.GenerationContext;
import org.raml.v2.api.model.v10.datamodel.TypeDeclaration;


/**
 * Created. There, you have it.
 */
public class UnionPluginContextImpl implements UnionPluginContext {
    private final GenerationContext generationContext;
    private final CreationResult result;

    public UnionPluginContextImpl(GenerationContext generationContext, CreationResult result) {
        this.generationContext = generationContext;
        this.result = result;
    }

    @Override
    public CreationResult creationResult() {

        return result;
    }

    @Override
    public CreationResult unionClass(TypeDeclaration ramlType) {
        return generationContext.findCreatedType(ramlType.name(), ramlType);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy