io.ap4k.option.adapter.GeneratorConfigAdapter Maven / Gradle / Ivy
The newest version!
package io.ap4k.option.adapter;
import java.nio.file.Path;
import io.ap4k.project.Project;
import io.ap4k.option.config.GeneratorConfigBuilder;
import io.ap4k.option.annotation.GeneratorOptions;
import io.ap4k.project.BuildInfo;
import java.lang.String;
import io.ap4k.option.config.GeneratorConfig;
import java.util.Map;
import java.util.Comparator;
public class GeneratorConfigAdapter{
public static GeneratorConfig adapt(GeneratorOptions instance){
return newBuilder(instance).build();
}
public static GeneratorConfigBuilder newBuilder(GeneratorOptions instance){
return new GeneratorConfigBuilder(new io.ap4k.option.config.GeneratorConfig(null,
null,
instance.inputPath(),
instance.outputPath()));
}
public static GeneratorConfig adapt(Map map){
return new io.ap4k.option.config.GeneratorConfig(
null,
null,
(String)(map instanceof Map ? ((Map)map).getOrDefault("inputPath", "") : ""),
(String)(map instanceof Map ? ((Map)map).getOrDefault("outputPath", "") : ""));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy