Rework MethodSerializer (+ fallout)
[controller.git] / opendaylight / config / yang-jmx-generator-plugin / src / main / java / org / opendaylight / controller / config / yangjmxgenerator / plugin / ftl / model / MethodDeclaration.java
index be6b23e879e36de82bb1a2abf5f82107a161ea11..958eaba9fcf5bc2cac7fc8a1f5934f289ca7b9c1 100644 (file)
@@ -9,6 +9,8 @@ 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 MethodDeclaration implements Method {
     private final String returnType;
@@ -19,7 +21,7 @@ public class MethodDeclaration implements Method {
 
     public MethodDeclaration(String returnType, String name,
             List<Field> parameters) {
-        this(returnType, name, parameters, Collections.<Annotation> emptyList());
+        this(returnType, name, parameters, Collections.emptyList());
     }
 
     public MethodDeclaration(String returnType, String name,
@@ -35,6 +37,16 @@ public class MethodDeclaration implements Method {
         return annotations;
     }
 
+    @Override
+    public List<String> getThrowsExceptions() {
+        return Collections.emptyList();
+    }
+
+    @Override
+    public Optional<String> getBody() {
+        return Optional.empty();
+    }
+
     @Override
     public String getJavadoc() {
         return javadoc;
@@ -44,6 +56,11 @@ public class MethodDeclaration implements Method {
         this.javadoc = javadoc;
     }
 
+    @Override
+    public Optional<Modifier> getVisibility() {
+        return Optional.empty();
+    }
+
     @Override
     public String getReturnType() {
         return returnType;
@@ -60,7 +77,7 @@ public class MethodDeclaration implements Method {
     }
 
     @Override
-    public List<String> getModifiers() {
+    public List<Modifier> getModifiers() {
         return Collections.emptyList();
     }