BindingRuntimeTypes should be an interface
[mdsal.git] / binding / mdsal-binding-runtime-api / src / main / java / org / opendaylight / mdsal / binding / runtime / api / BindingRuntimeTypes.java
1 /*
2  * Copyright (c) 2018 Pantheon Technologies, s.r.o.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.binding.runtime.api;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.Multimap;
12 import java.util.Collection;
13 import java.util.Optional;
14 import org.opendaylight.mdsal.binding.model.api.Type;
15 import org.opendaylight.yangtools.concepts.Immutable;
16 import org.opendaylight.yangtools.yang.common.QName;
17 import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
18 import org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus;
19 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextProvider;
20
21 /**
22  * The result of BindingGenerator run. Contains mapping between Types and SchemaNodes.
23  */
24 @Beta
25 public interface BindingRuntimeTypes extends EffectiveModelContextProvider, Immutable {
26
27     Optional<AugmentationSchemaNode> findAugmentation(Type type);
28
29     Optional<Type> findIdentity(QName qname);
30
31     Optional<WithStatus> findSchema(Type type);
32
33     Optional<Type> findType(WithStatus schema);
34
35     Optional<Type> findOriginalAugmentationType(AugmentationSchemaNode augment);
36
37     Multimap<Type, Type> getChoiceToCases();
38
39     Collection<Type> findCases(Type choiceType);
40 }