Interface BindingRuntimeContext
- All Superinterfaces:
Immutable
- All Known Implementing Classes:
AbstractBindingRuntimeContext
,DefaultBindingRuntimeContext
,ForwardingBindingRuntimeContext
,GlobalBindingRuntimeContext
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 ActionRuntimeType
getActionDefinition
(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 RpcRuntimeType
getRpcDefinition
(Class<? extends Rpc<?, ?>> cls) getRpcInput
(QName rpcName) getRpcOutput
(QName rpcName) @Nullable CompositeRuntimeType
getSchemaDefinition
(Class<?> cls) Returns definingDataSchemaNode
for supplied class.@NonNull BindingRuntimeTypes
getTypes()
@NonNull RuntimeType
getTypeWithSchema
(Class<?> type) Returns schema (DataSchemaNode
,AugmentationSchemaNode
orTypeDefinition
) from which supplied class was generated.getYangDataClass
(YangDataName templateName) <T> @NonNull Class
<T> loadClass
(JavaTypeName type) default <T> @NonNull Class
<T> default @NonNull EffectiveModelContext
-
Method Details
-
getTypes
@NonNull BindingRuntimeTypes getTypes() -
loadClass
- Throws:
ClassNotFoundException
-
loadClass
- 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
- ifaugClass
is null
-
getSchemaDefinition
Returns definingDataSchemaNode
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
-
getRpcDefinition
-
getTypeWithSchema
Returns schema (DataSchemaNode
,AugmentationSchemaNode
orTypeDefinition
) 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
orTypeDefinition
which was used to generate supplied class.
-
getRpcInput
-
getRpcOutput
-
getClassForSchema
-
getIdentityClass
-
getYangDataClass
-