Class IdentityCodecUtil

java.lang.Object
org.opendaylight.yangtools.yang.data.util.codec.IdentityCodecUtil

@Beta @NonNullByDefault public final class IdentityCodecUtil extends Object
Utility methods for implementing string-to-identity codecs.
Author:
Robert Varga
  • 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 parse
      schemaContext - Parent schema context
      prefixToModule - prefix-to-QNameModule mapping function
      Returns:
      Corresponding IdentitySchemaNode.
      Throws:
      IllegalArgumentException - if the value is invalid or does not refer to an existing identity