2 * Copyright (c) 2023 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.data.spi.node.impl;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
14 import org.opendaylight.yangtools.yang.data.api.schema.AbstractAnydataNode;
16 final class ImmutableAnydataNode<V> extends AbstractAnydataNode<V> {
17 private final @NonNull NodeIdentifier name;
18 private final @NonNull V body;
19 private final @NonNull Class<V> objectModel;
21 ImmutableAnydataNode(final NodeIdentifier name, final V body, final Class<V> objectModel) {
22 this.name = requireNonNull(name);
23 this.body = requireNonNull(body);
24 this.objectModel = requireNonNull(objectModel);
28 public NodeIdentifier name() {
33 public Class<V> bodyObjectModel() {
43 protected V wrappedValue() {