import org.junit.Before;
import org.junit.Test;
import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.Cont;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.Cont.Ref;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.ContBuilder;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.ContInt32;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.ContInt32.RefUnionInt32;
-import org.opendaylight.yang.gen.v1.bug8449.rev180405.ContInt32Builder;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.Cont;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.Cont.Ref;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.ContBuilder;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.ContInt32;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.ContInt32.RefUnionInt32;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.ContInt32Builder;
import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.yangtools.yang.binding.DataObject;
--- /dev/null
+package org.opendaylight.yang.gen.v1.bug8449.rev170516;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.ContInt32.RefUnionInt32;
+
+/**
+ * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
+ * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
+ *
+ * The reason behind putting it under src/main/java is:
+ * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
+ * loss of user code.
+ *
+ */
+public class ContInt32RefUnionInt32Builder {
+
+ public static RefUnionInt32 getDefaultInstance(java.lang.String defaultValue) {
+ throw new java.lang.UnsupportedOperationException("Not yet implemented");
+ }
+
+}
--- /dev/null
+package org.opendaylight.yang.gen.v1.bug8449.rev170516;
+import org.opendaylight.yang.gen.v1.bug8449.rev170516.Cont.Ref;
+
+/**
+ * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
+ * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
+ *
+ * The reason behind putting it under src/main/java is:
+ * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
+ * loss of user code.
+ *
+ */
+public class ContRefBuilder {
+
+ public static Ref getDefaultInstance(java.lang.String defaultValue) {
+ throw new java.lang.UnsupportedOperationException("Not yet implemented");
+ }
+
+}
namespace "bug8449";
prefix "tst";
- revision "2017-16-05" {
+ revision "2017-05-16" {
}
typedef name1-ref {