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

io.polyapi.plugin.model.specification.resolved.ResolvedSpecification Maven / Gradle / Ivy

There is a newer version: 0.15.3
Show newest version
package io.polyapi.plugin.model.specification.resolved;

import java.util.HashSet;
import java.util.Optional;
import java.util.Set;

import io.polyapi.plugin.model.generation.Generable;
import lombok.Getter;

@Getter
public class ResolvedSpecification implements Generable {
    private final String id;
    private final String name;
    private final String packageName;
    private final Set imports;
    private final String className;

    public ResolvedSpecification(ResolvedSpecification base) {
        this(base.id,
                base.name,
                base.packageName,
                base.imports,
                base.className);
    }

    public ResolvedSpecification(String id, String name, String packageName, Set imports, String className) {
        this.id = id;
        this.name = name;
        this.packageName = packageName;
        this.imports = new HashSet<>();
        Optional.ofNullable(imports).ifPresent(this.imports::addAll);
        this.className = className;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy