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;
10 import com.google.common.annotations.Beta;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.concepts.Identifiable;
16 * A {@link java.util.ServiceLoader} factory for instantiating {@link FileGenerator} instances.
18 * @author Robert Varga
22 public interface FileGeneratorFactory extends Identifiable<String> {
27 * This identifier must be a simple string without any whitespace, such as produced by
28 * {@link Class#getSimpleName()}.
31 String getIdentifier();
34 * Create a new {@link FileGenerator}.
36 * @param configuration Configuration properties
37 * @return a new FileGenerator
38 * @throws FileGeneratorException if the configuration is not acceptable, or any other issue occurs.
40 FileGenerator newFileGenerator(Map<String, String> configuration) throws FileGeneratorException;