@@ -0,0 +1,2447 @@
+/*%0A * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.%0A *%0A * This program and the accompanying materials are made available under the%0A * terms of the Eclipse Public License v1.0 which accompanies this distribution,%0A * and is available at http://www.eclipse.org/legal/epl-v10.html%0A */%0Apackage org.opendaylight.yangtools.yang.data.api;%0A%0Aimport static java.util.Objects.requireNonNull;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport com.google.common.collect.ImmutableMap.Builder;%0Aimport java.io.Externalizable;%0Aimport java.io.IOException;%0Aimport java.io.ObjectInput;%0Aimport java.io.ObjectOutput;%0Aimport java.util.Map.Entry;%0Aimport org.opendaylight.yangtools.yang.common.QName;%0Aimport org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;%0A%0A/**%0A * Externalizable proxy for %7B@link NodeIdentifierWithPredicates%7D.%0A */%0Afinal class NIPv2 implements Externalizable %7B%0A    private static final long serialVersionUID = 1L;%0A%0A    private NodeIdentifierWithPredicates nip;%0A%0A    @SuppressWarnings(%22checkstyle:redundantModifier%22)%0A    public NIPv2() %7B%0A        // For Externalizable%0A    %7D%0A%0A    NIPv2(final NodeIdentifierWithPredicates nid) %7B%0A        this.nip = requireNonNull(nid);%0A    %7D%0A%0A    @Override%0A    public void writeExternal(final ObjectOutput out) throws IOException %7B%0A        nip.getNodeType().writeTo(out);%0A%0A        out.writeInt(nip.size());%0A        for (Entry%3CQName, Object%3E entry : nip.entrySet()) %7B%0A            entry.getKey().writeTo(out);%0A            out.writeObject(entry.getValue());%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException %7B%0A        final QName qname = QName.readFrom(in);%0A        final int size = in.readInt();%0A        switch (size) %7B%0A            case 0:%0A                nip = NodeIdentifierWithPredicates.of(qname);%0A                break;%0A            case 1:%0A                nip = NodeIdentifierWithPredicates.of(qname, QName.readFrom(in), in.readObject());%0A                break;%0A            default:%0A                final Builder%3CQName, Object%3E keys = ImmutableMap.builderWithExpectedSize(size);%0A                for (int i = 0; i %3C size; ++i) %7B%0A                    keys.put(QName.readFrom(in), in.readObject());%0A                %7D%0A                nip = NodeIdentifierWithPredicates.of(qname, keys.build());%0A        %7D%0A    %7D%0A%0A    private Object readResolve() %7B%0A        return nip;%0A    %7D%0A%7D%0A

Add explicit serialization format