[ONOS-4149],[ONOS-3909] YANG list translator impl and bug fixes.
Change-Id: Ia1a94142a3a114815766f661ed850bf9cacde66f
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
index 6047206..caa05bc 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaSubModule.java
@@ -75,6 +75,7 @@
*/
@Override
public JavaFileInfo getJavaFileInfo() {
+
if (javaFileInfo == null) {
throw new RuntimeException("Missing java info in java datamodel node");
}
@@ -88,6 +89,7 @@
*/
@Override
public void setJavaFileInfo(JavaFileInfo javaInfo) {
+
javaFileInfo = javaInfo;
}
@@ -98,6 +100,7 @@
*/
@Override
public JavaImportData getJavaImportData() {
+
return javaImportData;
}
@@ -109,6 +112,7 @@
*/
@Override
public void setJavaImportData(JavaImportData javaImportData) {
+
this.javaImportData = javaImportData;
}
@@ -119,6 +123,7 @@
*/
@Override
public TempJavaCodeFragmentFiles getTempJavaCodeFragmentFiles() {
+
if (tempFileHandle == null) {
throw new RuntimeException("missing temp file hand for current node "
+ getJavaFileInfo().getJavaName());
@@ -133,6 +138,7 @@
*/
@Override
public void setTempJavaCodeFragmentFiles(TempJavaCodeFragmentFiles fileHandle) {
+
tempFileHandle = fileHandle;
}
@@ -144,6 +150,7 @@
* @return the name space string of the module.
*/
private String getNameSpaceFromModule(YangBelongsTo belongsToInfo) {
+
// TODO Auto-generated method stub
return "";
}
@@ -157,6 +164,7 @@
*/
@Override
public void generateCodeEntry(String codeGenDir) throws IOException {
+
getJavaFileInfo().setJavaName(getCaptialCase(getCamelCase(getName())));
getJavaFileInfo().setPackage(getRootPackage(getVersion(),
getNameSpaceFromModule(getBelongsTo()),