Class AbstractBindingRuntimeContext
java.lang.Object
org.opendaylight.yangtools.binding.runtime.api.AbstractBindingRuntimeContext
- All Implemented Interfaces:
BindingRuntimeContext
,Immutable
- Direct Known Subclasses:
DefaultBindingRuntimeContext
@Beta
public abstract class AbstractBindingRuntimeContext
extends Object
implements BindingRuntimeContext
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
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ActionRuntimeType
getActionDefinition
(Class<? extends Action<?, ?, ?>> cls) final <T extends Augmentation<?>>
AugmentRuntimeTypegetAugmentationDefinition
(Class<T> augClass) Returns schema of augmentation.final Class
<?> final Class
<? extends BaseIdentity> getIdentityClass
(QName input) final RpcRuntimeType
getRpcDefinition
(Class<? extends Rpc<?, ?>> cls) getRpcInput
(QName rpcName) getRpcOutput
(QName rpcName) final CompositeRuntimeType
getSchemaDefinition
(Class<?> cls) Returns definingDataSchemaNode
for supplied class.final RuntimeType
getTypeWithSchema
(Class<?> type) Returns schema (DataSchemaNode
,AugmentationSchemaNode
orTypeDefinition
) from which supplied class was generated.getYangDataClass
(YangDataName templateName) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opendaylight.yangtools.binding.runtime.api.BindingRuntimeContext
getTypes, loadClass, loadClass, modelContext
-
Constructor Details
-
AbstractBindingRuntimeContext
public AbstractBindingRuntimeContext()
-
-
Method Details
-
getAugmentationDefinition
public final <T extends Augmentation<?>> AugmentRuntimeType getAugmentationDefinition(Class<T> augClass) Description copied from interface:BindingRuntimeContext
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.
- Specified by:
getAugmentationDefinition
in interfaceBindingRuntimeContext
- Type Parameters:
T
- Augmentation class type- Parameters:
augClass
- Augmentation class- Returns:
- Schema of augmentation or null if augmentation is not known in this context
-
getSchemaDefinition
Description copied from interface:BindingRuntimeContext
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
BindingRuntimeContext.getAugmentationDefinition(Class)
instead.- Specified by:
getSchemaDefinition
in interfaceBindingRuntimeContext
- Parameters:
cls
- Class which represents list, container, choice or case.- Returns:
- Schema node, from which class was generated.
-
getActionDefinition
- Specified by:
getActionDefinition
in interfaceBindingRuntimeContext
-
getRpcDefinition
- Specified by:
getRpcDefinition
in interfaceBindingRuntimeContext
-
getTypeWithSchema
Description copied from interface:BindingRuntimeContext
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).- Specified by:
getTypeWithSchema
in interfaceBindingRuntimeContext
- 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.
-
getClassForSchema
- Specified by:
getClassForSchema
in interfaceBindingRuntimeContext
-
getIdentityClass
- Specified by:
getIdentityClass
in interfaceBindingRuntimeContext
-
getRpcInput
- Specified by:
getRpcInput
in interfaceBindingRuntimeContext
-
getRpcOutput
- Specified by:
getRpcOutput
in interfaceBindingRuntimeContext
-
getYangDataClass
- Specified by:
getYangDataClass
in interfaceBindingRuntimeContext
-