2 * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.plugin.generator.api;
11 import org.eclipse.jdt.annotation.NonNullByDefault;
12 import org.opendaylight.yangtools.concepts.Identifiable;
15 * A {@link java.util.ServiceLoader} factory for instantiating {@link FileGenerator} instances.
18 public interface FileGeneratorFactory extends Identifiable<String> {
23 * This identifier must be a simple string without any whitespace, such as produced by
24 * {@link Class#getSimpleName()}.
27 String getIdentifier();
30 * Create a new {@link FileGenerator}.
32 * @param configuration Configuration properties
33 * @return a new FileGenerator
34 * @throws FileGeneratorException if the configuration is not acceptable, or any other issue occurs.
36 FileGenerator newFileGenerator(Map<String, String> configuration) throws FileGeneratorException;