Merge branch 'master' of ../controller
[yangtools.git] / yang / yang-maven-plugin-spi / src / test / java / org / opendaylight / yangtools / yang2sources / spi / CodeGeneratorTestImpl.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang2sources.spi;
9
10 import java.io.File;
11 import java.io.IOException;
12 import java.util.Collection;
13 import java.util.Map;
14 import java.util.Optional;
15 import java.util.Set;
16 import java.util.function.Function;
17 import org.apache.maven.project.MavenProject;
18 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
19 import org.opendaylight.yangtools.yang.model.api.Module;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
22
23 public class CodeGeneratorTestImpl implements BasicCodeGenerator, MavenProjectAware {
24
25     private static final Logger LOG = LoggerFactory.getLogger(CodeGeneratorTestImpl.class);
26
27     @Override
28     public Collection<File> generateSources(final EffectiveModelContext context, final File outputBaseDir,
29             final Set<Module> currentModules, final Function<Module, Optional<String>> moduleResourcePathResolver)
30                     throws IOException {
31         LOG.debug("{} generateSources:context: {}", getClass().getCanonicalName(), context);
32         LOG.debug("{} generateSources:outputBaseDir: {}", getClass().getCanonicalName(), outputBaseDir);
33         LOG.debug("{} generateSources:currentModules: {}", getClass().getCanonicalName(), currentModules);
34         return null;
35     }
36
37     @Override
38     public void setAdditionalConfig(final Map<String, String> additionalConfiguration) {
39         LOG.debug("{} additionalConfig: {}", getClass().getCanonicalName(), additionalConfiguration);
40     }
41
42     @Override
43     public void setResourceBaseDir(final File resourceBaseDir) {
44         LOG.debug("{} resourceBaseDir: {}", getClass().getCanonicalName(), resourceBaseDir);
45     }
46
47     @Override
48     public void setMavenProject(final MavenProject project) {
49         LOG.debug("{} maven project: {}", getClass().getCanonicalName(), project);
50     }
51 }