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;
16 * Externalizable proxy for {@link ErrorTag}.
18 final class ETv1 implements Externalizable {
19 private static final long serialVersionUID = 1L;
21 private String elementBody;
23 @SuppressWarnings("checkstyle:redundantModifier")
25 // visible for Externalizable
28 ETv1(final ErrorTag tag) {
29 elementBody = tag.elementBody();
33 public void writeExternal(final ObjectOutput out) throws IOException {
34 out.writeUTF(elementBody);
38 public void readExternal(final ObjectInput in) throws IOException {
39 elementBody = in.readUTF();
42 Object readResolve() {
43 return new ErrorTag(elementBody);