X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-jmx-generator-plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyangjmxgenerator%2Fplugin%2Fftl%2Fmodel%2FMethodDefinition.java;h=8a2909d81c3567535a2202742cf51fbc7e135d77;hp=9af011fe7199230d03f7e00a93bcca10e0b96b9b;hb=8cc33e526b0f9ad956dcc96e57cff02679d643b3;hpb=72a2f458d328d443e2a5479ac147c1242a41a70f diff --git a/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/model/MethodDefinition.java b/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/model/MethodDefinition.java index 9af011fe71..8a2909d81c 100644 --- a/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/model/MethodDefinition.java +++ b/opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/model/MethodDefinition.java @@ -9,9 +9,11 @@ package org.opendaylight.controller.config.yangjmxgenerator.plugin.ftl.model; import java.util.Collections; import java.util.List; +import java.util.Optional; +import javax.lang.model.element.Modifier; public class MethodDefinition implements Method { - private final List modifiers; + private final List modifiers; private final String returnType; private final String name; private final List parameters; @@ -29,18 +31,17 @@ public class MethodDefinition implements Method { public MethodDefinition(String returnType, String name, List parameters, String body) { - this(Collections. emptyList(), returnType, name, parameters, - Collections. emptyList(), Collections - . emptyList(), body); + this(Collections.emptyList(), returnType, name, parameters, + Collections.emptyList(), Collections.emptyList(), body); } public MethodDefinition(String returnType, String name, List parameters, List annotations, String body) { - this(Collections. emptyList(), returnType, name, parameters, - Collections. emptyList(), annotations, body); + this(Collections.emptyList(), returnType, name, parameters, + Collections.emptyList(), annotations, body); } - public MethodDefinition(List modifiers, String returnType, + public MethodDefinition(List modifiers, String returnType, String name, List parameters, List throwsExceptions, List annotations, String body) { this.modifiers = modifiers; @@ -66,6 +67,11 @@ public class MethodDefinition implements Method { this.javadoc = javadoc; } + @Override + public Optional getVisibility() { + return Optional.of(Modifier.PUBLIC); + } + @Override public String getReturnType() { return returnType; @@ -81,16 +87,18 @@ public class MethodDefinition implements Method { return parameters; } + @Override public List getThrowsExceptions() { return throwsExceptions; } - public String getBody() { - return body; + @Override + public Optional getBody() { + return Optional.of(body); } @Override - public List getModifiers() { + public List getModifiers() { return modifiers; }