com.github.davidmoten.odata.client.generator.Options Maven / Gradle / Ivy
package com.github.davidmoten.odata.client.generator;
import java.util.List;
public final class Options {
private final String outputDirectory;
private final List schemaOptions;
public Options(String outputDirectory, List schemaOptions) {
this.outputDirectory = outputDirectory;
this.schemaOptions = schemaOptions;
}
public String getOutputDirectory() {
return outputDirectory;
}
public SchemaOptions getSchemaOptions(String namespace) {
return schemaOptions //
.stream() //
.filter(x -> namespace.equals(x.namespace)) //
.findFirst() //
.orElseThrow(() -> {
throw new IllegalArgumentException(
"namespace not found in schemaOptions: " + namespace);
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy