Interface BindingRuntimeContext
- All Superinterfaces:
Immutable
- All Known Implementing Classes:
AbstractBindingRuntimeContext,DefaultBindingRuntimeContext
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 Summary
Modifier and TypeMethodDescription@Nullable ActionRuntimeTypegetActionDefinition(Class<? extends Action<?, ?, ?>> cls) <T extends Augmentation<?>>
@Nullable AugmentRuntimeTypegetAugmentationDefinition(Class<T> augClass) Returns schema of augmentation.@NonNull Class<?> @NonNull Class<? extends BaseIdentity> getIdentityClass(QName input) @Nullable RpcRuntimeTypegetRpcDefinition(Class<? extends Rpc<?, ?>> cls) getRpcInput(QName rpcName) getRpcOutput(QName rpcName) @Nullable CompositeRuntimeTypegetSchemaDefinition(Class<?> cls) Returns definingDataSchemaNodefor supplied class.@NonNull BindingRuntimeTypesgetTypes()@NonNull RuntimeTypegetTypeWithSchema(Class<?> type) Returns schema (DataSchemaNode,AugmentationSchemaNodeorTypeDefinition) from which supplied class was generated.getYangDataClass(YangDataName templateName) <T> @NonNull Class<T> loadClass(org.opendaylight.yangtools.binding.model.api.JavaTypeName type) default <T> @NonNull Class<T> loadClass(org.opendaylight.yangtools.binding.model.api.Type type) default @NonNull EffectiveModelContext
-
Method Details
-
getTypes
@NonNull BindingRuntimeTypes getTypes() -
loadClass
<T> @NonNull Class<T> loadClass(org.opendaylight.yangtools.binding.model.api.JavaTypeName type) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
loadClass
default <T> @NonNull Class<T> loadClass(org.opendaylight.yangtools.binding.model.api.Type type) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
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- ifaugClassis null
-
getSchemaDefinition
Returns definingDataSchemaNodefor 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
-
getRpcDefinition
-
getTypeWithSchema
Returns schema (DataSchemaNode,AugmentationSchemaNodeorTypeDefinition) 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,AugmentationSchemaNodeorTypeDefinitionwhich was used to generate supplied class.
-
getRpcInput
-
getRpcOutput
-
getClassForSchema
-
getIdentityClass
-
getYangDataClass
-