StatementSupport is not a StatementDefinition
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / source / QNameToStatementDefinition.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  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.yangtools.yang.parser.spi.source;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.common.XMLNamespace;
14 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
15
16 /**
17  * Map of fully qualified statement name to statement definition.
18  */
19 public interface QNameToStatementDefinition {
20     /**
21      * Returns StatementDefinition with specified QName.
22      *
23      * @param identifier QName of requested statement
24      * @return StatementDefinition
25      */
26     @Nullable StatementDefinition get(QName identifier);
27
28     /**
29      * Returns StatementDefinition with specified namespace and localName.
30      *
31      * @param namespace namespace of requested statement
32      * @param localName localName of requested statement
33      * @return StatementDefinition
34      */
35     @Nullable StatementDefinition getByNamespaceAndLocalName(@NonNull XMLNamespace namespace,
36         @NonNull String localName);
37 }