2 * Copyright (c) 2021 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 java.io.Externalizable;
11 import java.io.IOException;
12 import java.io.ObjectInput;
13 import java.io.ObjectOutput;
14 import java.io.Serial;
17 * Externalizable proxy for {@link ErrorTag}.
19 final class ETv1 implements Externalizable {
21 private static final long serialVersionUID = 1L;
23 private String elementBody;
25 @SuppressWarnings("checkstyle:redundantModifier")
27 // visible for Externalizable
30 ETv1(final ErrorTag tag) {
31 elementBody = tag.elementBody();
35 public void writeExternal(final ObjectOutput out) throws IOException {
36 out.writeUTF(elementBody);
40 public void readExternal(final ObjectInput in) throws IOException {
41 elementBody = in.readUTF();
45 Object readResolve() {
46 return new ErrorTag(elementBody);