2 * Copyright (c) 2022 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.mdsal.binding.generator.impl.rt;
10 import com.google.common.collect.ImmutableList;
11 import java.util.List;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.mdsal.binding.runtime.api.AugmentRuntimeType;
14 import org.opendaylight.mdsal.binding.runtime.api.AugmentableRuntimeType;
15 import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
16 import org.opendaylight.yangtools.binding.model.api.GeneratedType;
17 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
20 * Abstract base class for {@link AbstractCompositeRuntimeType}s which support augmentations.
22 abstract class AbstractAugmentableRuntimeType<S extends EffectiveStatement<?, ?>>
23 extends AbstractCompositeRuntimeType<S> implements AugmentableRuntimeType {
24 private final @NonNull ImmutableList<AugmentRuntimeType> augments;
26 AbstractAugmentableRuntimeType(final GeneratedType bindingType, final S statement, final List<RuntimeType> children,
27 final List<AugmentRuntimeType> augments) {
28 super(bindingType, statement, children);
29 this.augments = ImmutableList.copyOf(augments);
33 public final List<AugmentRuntimeType> augments() {