2 * Copyright (c) 2013 Cisco Systems, Inc. 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.controller.config.yangjmxgenerator.plugin.ftl;
10 import java.util.Collections;
12 import org.opendaylight.controller.config.api.DependencyResolver;
13 import org.opendaylight.controller.config.api.DynamicMBeanWithInstance;
14 import org.opendaylight.controller.config.api.ModuleIdentifier;
15 import org.opendaylight.controller.config.api.annotations.AbstractServiceInterface;
16 import org.opendaylight.controller.config.spi.Module;
17 import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Constructor;
18 import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Field;
19 import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.Header;
20 import org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model.MethodDefinition;
22 import com.google.common.collect.Lists;
27 public class StubModuleTemplate extends GeneralClassTemplate {
29 private final String extendedClass;
31 public StubModuleTemplate(Header header, String packageName,
32 String stubModuleName, String extendedClass) {
33 super(header, packageName, stubModuleName, Lists
34 .newArrayList(extendedClass), Collections.<String> emptyList(),
35 Collections.<Field> emptyList(), Collections
36 .<MethodDefinition> emptyList(), false, true,
37 Collections.<Constructor> emptyList());
38 this.extendedClass = extendedClass;
41 public String getExtendedClass() {
45 public String getInstanceType() {
46 return AutoCloseable.class.getCanonicalName();
49 public String getModuleNameType() {
50 return ModuleIdentifier.class.getCanonicalName();
53 public String getAbstractServiceInterfaceType() {
54 return AbstractServiceInterface.class.getCanonicalName();
57 public String getModuleType() {
58 return Module.class.getCanonicalName();
61 public String getDependencyResolverType() {
62 return DependencyResolver.class.getCanonicalName();
65 public String getDynamicMBeanWithInstanceType() {
66 return DynamicMBeanWithInstance.class.getCanonicalName();
70 public String getFtlTempleteLocation() {
71 return "module_stub_template.ftl";