Expose parameter names as String constants
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / PointParam.java
index 1cfc3c01c8293d9404e3f8e92c0609d422836510..9e9c3b9b4b82aa5fb95eb54fedbd1e5247fb5d89 100644 (file)
@@ -18,6 +18,10 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
  */
 @NonNullByDefault
 public final class PointParam implements RestconfQueryParam<PointParam> {
+    // API consistency: must not be confused with enum constants
+    @SuppressWarnings("checkstyle:ConstantName")
+    public static final String uriName = "point";
+
     // FIXME: This should be ApiPath
     private final String value;
 
@@ -32,7 +36,7 @@ public final class PointParam implements RestconfQueryParam<PointParam> {
 
     @Override
     public String paramName() {
-        return uriName();
+        return uriName;
     }
 
     @Override
@@ -44,10 +48,6 @@ public final class PointParam implements RestconfQueryParam<PointParam> {
         return new PointParam(uriValue);
     }
 
-    public static String uriName() {
-        return "point";
-    }
-
     public String value() {
         return value;
     }