Code Review
/
yangtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Propagate @Nonnull and @Nullable annotations
[yangtools.git]
/
yang
/
yang-parser-impl
/
src
/
main
/
java
/
org
/
opendaylight
/
yangtools
/
yang
/
parser
/
spi
/
source
/
PrefixToModule.java
diff --git
a/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/PrefixToModule.java
b/yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/PrefixToModule.java
index 6b409e00ce2216cc25edb8e2967a67aae6b081e1..0298046db10dfb56dd6962860ee0dde21b5b7066 100644
(file)
--- a/
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/PrefixToModule.java
+++ b/
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/spi/source/PrefixToModule.java
@@
-7,22
+7,20
@@
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
*/
package org.opendaylight.yangtools.yang.parser.spi.source;
+import java.net.URISyntaxException;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
/**
import javax.annotation.Nullable;
import org.opendaylight.yangtools.yang.common.QNameModule;
import org.opendaylight.yangtools.yang.model.api.meta.IdentifierNamespace;
/**
- *
* Source-specific mapping of prefixes to namespaces
* Source-specific mapping of prefixes to namespaces
- *
*/
public interface PrefixToModule extends IdentifierNamespace<String, QNameModule> {
*/
public interface PrefixToModule extends IdentifierNamespace<String, QNameModule> {
- public static final String DEFAULT_PREFIX = "";
-
+ String DEFAULT_PREFIX = "";
/**
/**
- *
* Returns QNameModule (namespace + revision) associated with supplied
* prefix.
*
* Returns QNameModule (namespace + revision) associated with supplied
* prefix.
*
@@
-33,10
+31,9
@@
public interface PrefixToModule extends IdentifierNamespace<String, QNameModule>
*
*/
@Override
*
*/
@Override
- @Nullable QNameModule get(String prefix);
+ @Nullable QNameModule get(
@Nonnull
String prefix);
/**
/**
- *
* Returns QNameModule (namespace + revision) associated with XML namespace
* (URI).
*
* Returns QNameModule (namespace + revision) associated with XML namespace
* (URI).
*
@@
-44,8
+41,16
@@
public interface PrefixToModule extends IdentifierNamespace<String, QNameModule>
* XML Namespace
* @return QNameModule associated with supplied namespace, or null if prefix
* is not defined.
* XML Namespace
* @return QNameModule associated with supplied namespace, or null if prefix
* is not defined.
+ * @throws URISyntaxException if the input string is not valid URI
*
*/
*
*/
- @Nullable QNameModule getByNamespace(String namespace);
+ @Nullable QNameModule getByNamespace(String namespace)
throws URISyntaxException
;
+ /**
+ * Pre-linkage map does not consider revision-dates of modules and it contains module namespaces only.
+ *
+ * @return true if it is the pre-linkage map.
+ *
+ */
+ boolean isPreLinkageMap();
}
}