2 * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.common;
10 import static com.google.common.base.Verify.verifyNotNull;
11 import static java.util.Objects.requireNonNull;
13 import java.io.Externalizable;
14 import java.io.IOException;
15 import java.io.ObjectInput;
16 import java.io.ObjectOutput;
17 import java.io.Serial;
18 import org.opendaylight.yangtools.yang.common.UnresolvedQName.Qualified;
21 * Externalizable proxy for {@link Qualified}.
23 final class QQNv1 implements Externalizable {
25 private static final long serialVersionUID = 1L;
27 private Qualified qname;
29 @SuppressWarnings("checkstyle:redundantModifier")
34 QQNv1(final Qualified qname) {
35 this.qname = requireNonNull(qname);
39 public void writeExternal(final ObjectOutput out) throws IOException {
44 public void readExternal(final ObjectInput in) throws IOException {
45 qname = Qualified.readFrom(in);
49 Object readResolve() {
50 return verifyNotNull(qname);