Hide NormalizedNodeBuilderWrapper 48/81248/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Mar 2019 07:48:02 +0000 (08:48 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Mar 2019 11:02:20 +0000 (12:02 +0100)
This class is not instantiable outside of the package is it does
not leak from NormalizedNodePruner -- therefore it cannot be used
by anyone else. Make sure it's package-private and clean it up
a bit.

JIRA: CONTROLLER-1887
Change-Id: I17911508273d68c2795d38e2156c9407522f55fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodeBuilderWrapper.java

index 4654ec9..e39e012 100644 (file)
@@ -5,41 +5,40 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.datastore.node.utils.transformer;
 
 import com.google.common.base.Optional;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
+import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.NormalizedNodeContainerBuilder;
 import org.opendaylight.yangtools.yang.data.util.DataSchemaContextNode;
 
-public class NormalizedNodeBuilderWrapper {
-    private final NormalizedNodeContainerBuilder<?,?,?,?> builder;
-    private final YangInstanceIdentifier.PathArgument identifier;
+final class NormalizedNodeBuilderWrapper {
+    private final NormalizedNodeContainerBuilder<?, ?, ?, ?> builder;
+    private final PathArgument identifier;
     private final Optional<DataSchemaContextNode<?>> schemaNode;
 
-    NormalizedNodeBuilderWrapper(NormalizedNodeContainerBuilder<?,?,?,?> builder,
-            YangInstanceIdentifier.PathArgument identifier, Optional<DataSchemaContextNode<?>> schemaNode) {
+    NormalizedNodeBuilderWrapper(final NormalizedNodeContainerBuilder<?, ?, ?, ?> builder,
+            final PathArgument identifier, final Optional<DataSchemaContextNode<?>> schemaNode) {
         this.builder = builder;
         this.identifier = identifier;
         this.schemaNode = schemaNode;
     }
 
     @SuppressWarnings("rawtypes")
-    public NormalizedNodeContainerBuilder builder() {
+    NormalizedNodeContainerBuilder builder() {
         return builder;
     }
 
-    public QName nodeType() {
+    QName nodeType() {
         return identifier.getNodeType();
     }
 
-    public YangInstanceIdentifier.PathArgument identifier() {
+    PathArgument identifier() {
         return identifier;
     }
 
-    public Optional<DataSchemaContextNode<?>> getSchema() {
+    Optional<DataSchemaContextNode<?>> getSchema() {
         return schemaNode;
     }
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.