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.model;
10 import java.util.Collections;
11 import java.util.List;
12 import org.apache.commons.lang3.StringUtils;
14 public class MethodDeclaration implements Method {
15 private final String returnType;
16 private final String name;
17 private final List<Field> parameters;
18 private String javadoc = null;
19 private final List<Annotation> annotations;
21 public MethodDeclaration(String returnType, String name,
22 List<Field> parameters) {
23 this(returnType, name, parameters, Collections.<Annotation> emptyList());
26 public MethodDeclaration(String returnType, String name,
27 List<Field> parameters, List<Annotation> annotations) {
28 this.returnType = returnType;
30 this.parameters = parameters;
31 this.annotations = annotations;
35 public List<Annotation> getAnnotations() {
40 public String getJavadoc() {
44 public void setJavadoc(String javadoc) {
45 this.javadoc = javadoc;
49 public String getVisibility() {
50 return StringUtils.EMPTY;
54 public String getReturnType() {
59 public String getName() {
64 public List<Field> getParameters() {
69 public List<String> getModifiers() {
70 return Collections.emptyList();
74 public String toString() {
75 return MethodSerializer.toString(this);