Interface BindingRuntimeContext

All Superinterfaces:
Immutable
All Known Implementing Classes:
AbstractBindingRuntimeContext, DefaultBindingRuntimeContext, ForwardingBindingRuntimeContext, GlobalBindingRuntimeContext

@Beta public interface BindingRuntimeContext extends Immutable
Runtime Context for Java YANG Binding classes. It provides information derived from the backing effective model, which is not captured in generated classes (and hence cannot be obtained from BindingReflections.
  • Method Details

    • getTypes

      @NonNull BindingRuntimeTypes getTypes()
    • loadClass

      <T> @NonNull Class<T> loadClass(JavaTypeName type) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • loadClass

      default <T> @NonNull Class<T> loadClass(Type type) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • modelContext

      default @NonNull EffectiveModelContext modelContext()
    • getAugmentationDefinition

      <T extends Augmentation<?>> @Nullable AugmentRuntimeType getAugmentationDefinition(Class<T> augClass)
      Returns schema of augmentation.

      Returned schema is schema definition from which augmentation class was generated. This schema is isolated from other augmentations. This means it contains augmentation definition as was present in original YANG module.

      Children of returned schema does not contain any additional augmentations, which may be present in runtime for them, thus returned schema is unsuitable for use for validation of data.

      Type Parameters:
      T - Augmentation class type
      Parameters:
      augClass - Augmentation class
      Returns:
      Schema of augmentation or null if augmentation is not known in this context
      Throws:
      NullPointerException - if augClass is null
    • getSchemaDefinition

      @Nullable CompositeRuntimeType getSchemaDefinition(Class<?> cls)
      Returns defining DataSchemaNode for supplied class.

      Returned schema is schema definition from which class was generated. This schema may be isolated from augmentations, if supplied class represent node, which was child of grouping or augmentation.

      For getting augmentation schema from augmentation class use getAugmentationDefinition(Class) instead.

      Parameters:
      cls - Class which represents list, container, choice or case.
      Returns:
      Schema node, from which class was generated.
    • getActionDefinition

      @Nullable ActionRuntimeType getActionDefinition(Class<? extends Action<?,?,?>> cls)
    • getRpcDefinition

      @Nullable RpcRuntimeType getRpcDefinition(Class<? extends Rpc<?,?>> cls)
    • getTypeWithSchema

      @NonNull RuntimeType getTypeWithSchema(Class<?> type)
      Returns schema (DataSchemaNode, AugmentationSchemaNode or TypeDefinition) from which supplied class was generated. Returned schema may be augmented with additional information, which was not available at compile type (e.g. third party augmentations).
      Parameters:
      type - Binding Class for which schema should be retrieved.
      Returns:
      Instance of generated type (definition of Java API), along with DataSchemaNode, AugmentationSchemaNode or TypeDefinition which was used to generate supplied class.
    • getRpcInput

      @NonNull Class<? extends RpcInput> getRpcInput(QName rpcName)
    • getRpcOutput

      @NonNull Class<? extends RpcOutput> getRpcOutput(QName rpcName)
    • getClassForSchema

      @NonNull Class<?> getClassForSchema(SchemaNodeIdentifier.Absolute schema)
    • getIdentityClass

      @NonNull Class<? extends BaseIdentity> getIdentityClass(QName input)
    • getYangDataClass

      @NonNull Class<? extends YangData<?>> getYangDataClass(YangDataName templateName)