import org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilder;
import org.opendaylight.mdsal.binding.model.util.ReferencedTypeImpl;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.mdsal.binding.model.api.type.builder.GeneratedTypeBuilder;
import org.opendaylight.mdsal.binding.model.util.ReferencedTypeImpl;
import org.opendaylight.yangtools.concepts.Immutable;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.BindingMapping;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.binding.Augmentation;
import org.opendaylight.yangtools.yang.binding.BindingMapping;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationSchemaNode;
import org.opendaylight.yangtools.yang.model.api.AugmentationTarget;
import org.opendaylight.yangtools.yang.model.api.CaseSchemaNode;
* binding classes and underlying YANG schema, it contains
* runtime information, which could not be derived from generated
* binding classes and underlying YANG schema, it contains
* runtime information, which could not be derived from generated
- * classes alone using {@link org.opendaylight.yangtools.yang.binding.util.BindingReflections}.
- * <p>
- * Some of this information are for example list of all available
+ * classes alone using {@link org.opendaylight.mdsal.binding.spec.reflect.BindingReflections}.
+ *
+ * <p>Some of this information are for example list of all available
* children for cases {@link #getChoiceCaseChildren(DataNodeContainer)}, since
* choices are augmentable and new choices may be introduced by additional models.
* children for cases {@link #getChoiceCaseChildren(DataNodeContainer)}, since
* choices are augmentable and new choices may be introduced by additional models.
private static final Logger LOG = LoggerFactory.getLogger(BindingRuntimeContext.class);
private static final char DOT = '.';
private static final Logger LOG = LoggerFactory.getLogger(BindingRuntimeContext.class);
private static final char DOT = '.';
* Creates Binding Runtime Context from supplied class loading strategy and schema context.
*
* @param strategy Class loading strategy to retrieve generated Binding classes
* @param ctx Schema Context which describes YANG model and to which Binding classes should be mapped
* @return Instance of BindingRuntimeContext for supplied schema context.
*/
* Creates Binding Runtime Context from supplied class loading strategy and schema context.
*
* @param strategy Class loading strategy to retrieve generated Binding classes
* @param ctx Schema Context which describes YANG model and to which Binding classes should be mapped
* @return Instance of BindingRuntimeContext for supplied schema context.
*/
- * Returns schema of augmentation
- * <p>
- * Returned schema is schema definition from which augmentation class was generated.
+ * Returns schema of augmentation.
+ *
+ * <p>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.
* This schema is isolated from other augmentations. This means it contains
* augmentation definition as was present in original YANG module.
* which may be present in runtime for them, thus returned schema is unsuitable
* for use for validation of data.
* which may be present in runtime for them, thus returned schema is unsuitable
* for use for validation of data.
- * <p>
- * For retrieving {@link AugmentationSchemaNode}, which will contains
- * full model for child nodes, you should use method {@link #getResolvedAugmentationSchema(DataNodeContainer, Class)}
+ *
+ * <p>For retrieving {@link AugmentationSchemaNode}, which will contains
+ * full model for child nodes, you should use method
+ * {@link #getResolvedAugmentationSchema(DataNodeContainer, Class)}
* This schema may be isolated from augmentations, if supplied class
* represent node, which was child of grouping or augmentation.
* This schema may be isolated from augmentations, if supplied class
* represent node, which was child of grouping or augmentation.
* {@link #getAugmentationDefinition(Class)} instead.
*
* @param cls Class which represents list, container, choice or case.
* @return Schema node, from which class was generated.
*/
public DataSchemaNode getSchemaDefinition(final Class<?> cls) {
* {@link #getAugmentationDefinition(Class)} instead.
*
* @param cls Class which represents list, container, choice or case.
* @return Schema node, from which class was generated.
*/
public DataSchemaNode getSchemaDefinition(final Class<?> cls) {
- checkArgument(!Augmentation.class.isAssignableFrom(cls), "Supplied class must not be augmentation (%s is)",
+ checkArgument(!Augmentation.class.isAssignableFrom(cls), "Supplied class must not be an augmentation (%s is)",
public Entry<AugmentationIdentifier, AugmentationSchemaNode> getResolvedAugmentationSchema(
final DataNodeContainer target, final Class<? extends Augmentation<?>> aug) {
final AugmentationSchemaNode origSchema = getAugmentationDefinition(aug);
public Entry<AugmentationIdentifier, AugmentationSchemaNode> getResolvedAugmentationSchema(
final DataNodeContainer target, final Class<? extends Augmentation<?>> aug) {
final AugmentationSchemaNode origSchema = getAugmentationDefinition(aug);
*
* @param enumClass enum generated class
* @return mapped enum constants from yang with their corresponding values in generated binding classes
*
* @param enumClass enum generated class
* @return mapped enum constants from yang with their corresponding values in generated binding classes
*
* @param enumClassName enum generated class name
* @return mapped enum constants from yang with their corresponding values in generated binding classes
*
* @param enumClassName enum generated class name
* @return mapped enum constants from yang with their corresponding values in generated binding classes
public Set<Class<?>> getCases(final Class<?> choice) {
final Collection<Type> cazes = runtimeTypes.findCases(referencedType(choice));
final Set<Class<?>> ret = new HashSet<>(cazes.size());
public Set<Class<?>> getCases(final Class<?> choice) {
final Collection<Type> cazes = runtimeTypes.findCases(referencedType(choice));
final Set<Class<?>> ret = new HashSet<>(cazes.size());