[ONOS-4351][ONOS-4524] Augment linking and defect fixed.
Change-Id: I7c8e8c90579eea4631e014c4906a543a3c249427
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventListenerFragmentFiles.java b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventListenerFragmentFiles.java
index d1b0176..8009e45 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventListenerFragmentFiles.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaEventListenerFragmentFiles.java
@@ -18,11 +18,12 @@
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.translator.tojava.utils.JavaExtendsListHolder;
import static org.onosproject.yangutils.translator.tojava.utils.JavaFileGenerator.generateEventListenerFile;
+import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getCapitalCase;
import static org.onosproject.yangutils.translator.tojava.utils.TempJavaCodeFragmentFilesUtils.closeFile;
import static org.onosproject.yangutils.utils.io.impl.FileSystemUtil.createPackage;
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
@@ -53,7 +54,7 @@
*/
public TempJavaEventListenerFragmentFiles(JavaFileInfo javaFileInfo)
throws IOException {
- setExtendsList(new ArrayList<>());
+ setJavaExtendsListHolder(new JavaExtendsListHolder());
setJavaImportData(new JavaImportData());
setJavaFileInfo(javaFileInfo);
setAbsoluteDirPath(getAbsolutePackagePath(getJavaFileInfo().getBaseCodeGenPath(),
@@ -90,11 +91,12 @@
throws IOException {
createPackage(curNode);
-
+ String parentInfo = getCapitalCase(((JavaFileInfoContainer) curNode.getParent())
+ .getJavaFileInfo().getJavaName());
/**
* Creates event listener interface file.
*/
- setEventListenerJavaFileHandle(getJavaFileHandle(getJavaClassName(EVENT_LISTENER_FILE_NAME_SUFFIX)));
+ setEventListenerJavaFileHandle(getJavaFileHandle(parentInfo + EVENT_LISTENER_FILE_NAME_SUFFIX));
generateEventListenerFile(getEventListenerJavaFileHandle(), curNode, null);
/**