Interface BindingIdentityCodec

All Superinterfaces:
Immutable

public interface BindingIdentityCodec extends Immutable
A codec capable of translating identity values between their YANG (QName) and Binding (Class) representation.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull QName
    fromBinding(@NonNull BaseIdentity bindingValue)
    Convert a Binding value to its QName equivalent.
    <T extends BaseIdentity>
    @NonNull T
    toBinding(@NonNull QName qname)
    Convert a QNname to its corresponding Binding class.
  • Method Details

    • toBinding

      <T extends BaseIdentity> @NonNull T toBinding(@NonNull QName qname)
      Convert a QNname to its corresponding Binding class.
      Type Parameters:
      T - Expected identity type
      Parameters:
      qname - Identity QName
      Returns:
      A binding value corresponding to the QName
      Throws:
      IllegalArgumentException - if the qname does not map to an identity
      NullPointerException - if qname is null
    • fromBinding

      @NonNull QName fromBinding(@NonNull BaseIdentity bindingValue)
      Convert a Binding value to its QName equivalent.
      Parameters:
      bindingValue - Binding value to convert
      Returns:
      QName corresponding to the binding value
      Throws:
      IllegalArgumentException - if the supplied value does not map to a known identity
      NullPointerException - if bindingClass is null