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.yangtools.yang.parser.api;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ImmutableMap;
13 import com.google.common.collect.ImmutableSet;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.yangtools.yang.common.UnresolvedQName.Unqualified;
16 import org.opendaylight.yangtools.yang.common.XMLNamespace;
17 import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
18 import org.opendaylight.yangtools.yang.model.api.source.SourceRepresentation;
21 * A single <a href="https://www.rfc-editor.org/rfc/rfc8525">RFC8525</a> {@code module} or {@code import-only-module}
22 * list entry. Note that the YANG definition has two dissimilar instances, but that really is an artifact of how indexes
25 * @param identifier {@link SourceIdentifier} of this module, e.g. the combination of {@code name} and {@code revision}
26 * @param namespace {@link XMLNamespace} of this module
27 * @param submodules Submodules of this module
28 * @param features The set of supported features in this module
29 * @param deviationModuleNames Names of modules containing {@code deviate} statements targetting this module
30 * @param source A {@link SourceRepresentation} of the module
32 public record YangLibModule(@NonNull SourceIdentifier identifier, @NonNull XMLNamespace namespace,
33 @NonNull ImmutableMap<Unqualified, YangLibSubmodule> submodules, @NonNull ImmutableSet<Unqualified> features,
34 @NonNull ImmutableSet<Unqualified> deviationModuleNames, @NonNull SourceRepresentation source) {
35 public YangLibModule {
36 requireNonNull(identifier);
37 requireNonNull(namespace);
38 requireNonNull(submodules);
39 requireNonNull(features);
40 requireNonNull(deviationModuleNames);