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 ActionRuntimeTypegetActionDefinition(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 RpcRuntimeTypegetRpcDefinition(Class<? extends Rpc<?, ?>> cls) getRpcInput(QName rpcName) getRpcOutput(QName rpcName) final CompositeRuntimeTypegetSchemaDefinition(Class<?> cls) Returns definingDataSchemaNodefor supplied class.final RuntimeTypegetTypeWithSchema(Class<?> type) Returns schema (DataSchemaNode,AugmentationSchemaNodeorTypeDefinition) 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, waitMethods 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:BindingRuntimeContextReturns 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:
getAugmentationDefinitionin 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:BindingRuntimeContextReturns 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
BindingRuntimeContext.getAugmentationDefinition(Class)instead.- Specified by:
getSchemaDefinitionin interfaceBindingRuntimeContext- Parameters:
cls- Class which represents list, container, choice or case.- Returns:
- Schema node, from which class was generated.
-
getActionDefinition
- Specified by:
getActionDefinitionin interfaceBindingRuntimeContext
-
getRpcDefinition
- Specified by:
getRpcDefinitionin interfaceBindingRuntimeContext
-
getTypeWithSchema
Description copied from interface:BindingRuntimeContextReturns 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).- Specified by:
getTypeWithSchemain interfaceBindingRuntimeContext- 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.
-
getClassForSchema
- Specified by:
getClassForSchemain interfaceBindingRuntimeContext
-
getIdentityClass
- Specified by:
getIdentityClassin interfaceBindingRuntimeContext
-
getRpcInput
- Specified by:
getRpcInputin interfaceBindingRuntimeContext
-
getRpcOutput
- Specified by:
getRpcOutputin interfaceBindingRuntimeContext
-
getYangDataClass
- Specified by:
getYangDataClassin interfaceBindingRuntimeContext
-