-
- // Backwards compatibility: Union types used to be instantiated in YANG namespace, which is no longer
- // the case, as unions are emitted to their correct schema path. Create a proxy instance to meet the
- // codepath's expectations
- final SchemaPath typePath;
- if (type instanceof UnionType) {
- typePath = type.getPath();
- } else {
- typePath = UnionType.create(((UnionTypeDefinition)type).getTypes()).getPath();
- }
-
- String packageName = BindingGeneratorUtil.packageNameForGeneratedType(basePackageName, typePath);