Class IdentityCodecUtil
java.lang.Object
org.opendaylight.yangtools.yang.data.util.codec.IdentityCodecUtil
Utility methods for implementing string-to-identity codecs.
- Author:
- Robert Varga
-
Method Summary
Modifier and TypeMethodDescriptionstatic IdentitySchemaNode
parseIdentity
(String value, EffectiveModelContext schemaContext, Function<String, QNameModule> prefixToModule) Parse a string into a QName using specified prefix-to-QNameModule mapping function, interpreting the result as an IdentitySchemaNode existing in specified SchemaContext.
-
Method Details
-
parseIdentity
public static IdentitySchemaNode parseIdentity(String value, EffectiveModelContext schemaContext, Function<String, QNameModule> prefixToModule) Parse a string into a QName using specified prefix-to-QNameModule mapping function, interpreting the result as an IdentitySchemaNode existing in specified SchemaContext.- Parameters:
value
- string value to parseschemaContext
- Parent schema contextprefixToModule
- prefix-to-QNameModule mapping function- Returns:
- Corresponding IdentitySchemaNode.
- Throws:
IllegalArgumentException
- if the value is invalid or does not refer to an existing identity
-