Deprecate schema-aware builders
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / builder / impl / ImmutableOrderedLeafSetNodeSchemaAwareBuilder.java
index 562beecc50583f7f8c14d399285c3d4ba7867f6e..0f66531fa7faeb30cf203dc2a386898ae6021b0d 100644 (file)
@@ -11,6 +11,7 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
 import java.util.Collections;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode;
 import org.opendaylight.yangtools.yang.data.api.schema.LeafSetNode;
@@ -18,8 +19,8 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.api.ListNodeBuil
 import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.valid.DataValidationException;
 import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
 
+@Deprecated(since = "6.0.7", forRemoval = true)
 public final class ImmutableOrderedLeafSetNodeSchemaAwareBuilder<T> extends ImmutableOrderedLeafSetNodeBuilder<T> {
-
     private final LeafListSchemaNode schema;
 
     private ImmutableOrderedLeafSetNodeSchemaAwareBuilder(final LeafListSchemaNode schema) {
@@ -35,11 +36,11 @@ public final class ImmutableOrderedLeafSetNodeSchemaAwareBuilder<T> extends Immu
         super.withNodeIdentifier(new NodeIdentifier(schema.getQName()));
     }
 
-    public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema) {
+    public static <T> @NonNull ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema) {
         return new ImmutableOrderedLeafSetNodeSchemaAwareBuilder<>(schema);
     }
 
-    public static <T> ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema,
+    public static <T> @NonNull ListNodeBuilder<T, LeafSetEntryNode<T>> create(final LeafListSchemaNode schema,
             final LeafSetNode<T> node) {
         if (!(node instanceof ImmutableOrderedLeafSetNode<?>)) {
             throw new UnsupportedOperationException(String.format("Cannot initialize from class %s", node.getClass()));
@@ -49,9 +50,9 @@ public final class ImmutableOrderedLeafSetNodeSchemaAwareBuilder<T> extends Immu
     }
 
     @Override
-    public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T value) {
+    public ListNodeBuilder<T, LeafSetEntryNode<T>> withChildValue(final T childValue) {
         // TODO check value type
-        return super.withChildValue(value);
+        return super.withChildValue(childValue);
     }
 
     @Override
@@ -65,7 +66,7 @@ public final class ImmutableOrderedLeafSetNodeSchemaAwareBuilder<T> extends Immu
     }
 
     @Override
-    public ListNodeBuilder<T, LeafSetEntryNode<T>> withNodeIdentifier(final NodeIdentifier nodeIdentifier) {
+    public ListNodeBuilder<T, LeafSetEntryNode<T>> withNodeIdentifier(final NodeIdentifier withNodeIdentifier) {
         throw new UnsupportedOperationException("Node identifier created from schema");
     }
 }