Rework NormalizedNode type hierarchy
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / builder / impl / ImmutableLeafNodeBuilder.java
index 96c2413040d9e9f3d01629be2fa2fcac9b3562cf..1229b04460ac6e2758f008700b848be221bab333 100644 (file)
@@ -35,15 +35,19 @@ public class ImmutableLeafNodeBuilder<T>
         return createNode(getNodeIdentifier(), getValue());
     }
 
-    private static final class ImmutableLeafNode<T>
-            extends AbstractImmutableNormalizedSimpleValueNode<NodeIdentifier, T> implements LeafNode<T> {
+    private static class ImmutableLeafNode<T>
+            extends AbstractImmutableNormalizedSimpleValueNode<NodeIdentifier, LeafNode<?>, T> implements LeafNode<T> {
         ImmutableLeafNode(final NodeIdentifier nodeIdentifier, final T value) {
             super(nodeIdentifier, value);
         }
+
+        @Override
+        protected final Class<LeafNode<?>> implementedType() {
+            return (Class) LeafNode.class;
+        }
     }
 
-    private static final class ImmutableBinaryLeafNode
-            extends AbstractImmutableNormalizedSimpleValueNode<NodeIdentifier, byte[]> implements LeafNode<byte[]> {
+    private static final class ImmutableBinaryLeafNode extends ImmutableLeafNode<byte[]> {
         ImmutableBinaryLeafNode(final NodeIdentifier nodeIdentifier, final byte[] value) {
             super(nodeIdentifier, value);
         }