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.model.spi;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
13 import com.google.common.collect.ImmutableList;
14 import java.util.List;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
17 import org.opendaylight.yangtools.yang.model.api.EffectiveStatementInference;
18 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
21 * A simple capture of an {@link EffectiveModelContext} and a list of paths. No further guarantees are made.
24 public abstract class AbstractEffectiveStatementInference extends AbstractEffectiveModelContextProvider
25 implements EffectiveStatementInference {
26 private final @NonNull List<EffectiveStatement<?, ?>> path;
28 protected AbstractEffectiveStatementInference(final @NonNull EffectiveModelContext modelContext,
29 final @NonNull ImmutableList<EffectiveStatement<?, ?>> path) {
31 this.path = requireNonNull(path);
34 protected AbstractEffectiveStatementInference(final @NonNull EffectiveModelContext modelContext,
35 final @NonNull List<? extends EffectiveStatement<?, ?>> path) {
37 this.path = ImmutableList.copyOf(path);
41 public final List<EffectiveStatement<?, ?>> statementPath() {