Revert "Review comments fix for the code in master"
This patch set currently does not build with maven
This reverts commit cbdf0f2b45ed6c1d166d3f595d221e3dc2854427.
Change-Id: Ib49e29bbef1d3592ac1fbbb782ffceb29c0aad83
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java b/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
index ca693c7..d762151 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
@@ -76,8 +76,7 @@
/**
* Represents data model node to maintain information defined in YANG sub-module.
*/
-public class YangSubModule
- extends YangNode
+public class YangSubModule extends YangNode
implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, YangReferenceResolver,
RpcNotificationContainer {
@@ -151,7 +150,6 @@
* Prefix of parent module.
*/
private String prefix;
-
/*-
* Reference RFC 6020.
*
@@ -333,8 +331,7 @@
}
@Override
- public void resolveSelfFileLinking()
- throws DataModelException {
+ public void resolveSelfFileLinking() throws DataModelException {
// Get the list to be resolved.
List<YangResolutionInfo> resolutionList = getUnresolvedResolutionList();
// Resolve linking for a resolution list.
@@ -471,8 +468,7 @@
* @throws DataModelException a violation of data model rules
*/
@Override
- public void validateDataOnEntry()
- throws DataModelException {
+ public void validateDataOnEntry() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser
}
@@ -482,21 +478,18 @@
* @throws DataModelException a violation of data model rules
*/
@Override
- public void validateDataOnExit()
- throws DataModelException {
+ public void validateDataOnExit() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser
}
@Override
- public void detectCollidingChild(String identifierName, YangConstructType dataType)
- throws DataModelException {
+ public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException {
// Asks helper to detect colliding child.
detectCollidingChildUtil(identifierName, dataType, this);
}
@Override
- public void detectSelfCollision(String identifierName, YangConstructType dataType)
- throws DataModelException {
+ public void detectSelfCollision(String identifierName, YangConstructType dataType) throws DataModelException {
// Not required as module doesn't have any parent.
}
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
index 7ae7b28..467ff8a 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
@@ -114,38 +114,31 @@
* Information about the java files being generated.
*/
private JavaFileInfo javaFileInfo;
-
/**
* Imported class info.
*/
private JavaImportData javaImportData;
-
/**
* The variable which guides the types of temporary files generated using
* the temporary generated file types mask.
*/
private int generatedTempFiles;
-
/**
* Absolute path where the target java file needs to be generated.
*/
private String absoluteDirPath;
-
/**
* Contains all the interface(s)/class name which will be extended by generated files.
*/
private List<String> extendsList = new ArrayList<>();
-
/**
* File type extension for java classes.
*/
private static final String JAVA_FILE_EXTENSION = ".java";
-
/**
* File type extension for temporary classes.
*/
private static final String TEMP_FILE_EXTENSION = ".tmp";
-
/**
* Folder suffix for temporary files folder.
*/
@@ -175,17 +168,14 @@
* File name for attributes.
*/
private static final String ATTRIBUTE_FILE_NAME = "Attributes";
-
/**
* File name for to string method.
*/
private static final String TO_STRING_METHOD_FILE_NAME = "ToString";
-
/**
* File name for hash code method.
*/
private static final String HASH_CODE_METHOD_FILE_NAME = "HashCode";
-
/**
* File name for equals method.
*/
@@ -200,17 +190,14 @@
* File name for interface java file name suffix.
*/
private static final String INTERFACE_FILE_NAME_SUFFIX = EMPTY_STRING;
-
/**
* File name for builder interface file name suffix.
*/
private static final String BUILDER_INTERFACE_FILE_NAME_SUFFIX = BUILDER + INTERFACE;
-
/**
* File name for builder class file name suffix.
*/
private static final String BUILDER_CLASS_FILE_NAME_SUFFIX = BUILDER;
-
/**
* File name for impl class file name suffix.
*/
@@ -225,17 +212,14 @@
* Java file handle for interface file.
*/
private File interfaceJavaFileHandle;
-
/**
* Java file handle for builder interface file.
*/
private File builderInterfaceJavaFileHandle;
-
/**
* Java file handle for builder class file.
*/
private File builderClassJavaFileHandle;
-
/**
* Java file handle for impl class file.
*/
@@ -270,17 +254,14 @@
* Temporary file handle for hash code method of class.
*/
private File hashCodeImplTempFileHandle;
-
/**
* Temporary file handle for equals method of class.
*/
private File equalsImplTempFileHandle;
-
/**
* Temporary file handle for to string method of class.
*/
private File toStringImplTempFileHandle;
-
/**
* Temporary file handle for enum class file.
*/
@@ -295,17 +276,18 @@
* Is attribute added.
*/
private boolean isAttributePresent = false;
-
/**
* Current enum's value.
*/
private int enumValue;
-
/*
* Java file handle for enum class.
*/
private File enumClassJavaFileHandle;
+ public TempJavaFragmentFiles() {
+ }
+
/**
* Returns enum class java file handle.
*
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
index b925d89..8af0ecd 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
@@ -60,7 +60,6 @@
* File name for construction for special type like union, typedef.
*/
private static final String CONSTRUCTOR_FOR_TYPE_FILE_NAME = "ConstructorForType";
-
/**
* File name for from string method.
*/
@@ -81,7 +80,6 @@
* Temporary file handle for of string method of class.
*/
private File ofStringImplTempFileHandle;
-
/**
* Temporary file handle for constructor for type class.
*/
@@ -96,7 +94,6 @@
* Java file handle for typedef class file.
*/
private File typedefClassJavaFileHandle;
-
/**
* Java file handle for type class like union, typedef file.
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java
index d463101..34c42e8 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java
@@ -113,7 +113,7 @@
public void generateCodeEntry(YangPluginConfig yangPlugin)
throws IOException {
- /*
+ /**
* As part of the notification support the following files needs to be generated.
* 1) Subject of the notification(event), this is simple interface with builder class.
* 2) Event class extending "AbstractEvent" and defining event type enum.
@@ -121,18 +121,19 @@
*
* The manager class needs to extend the ListenerRegistry.
*/
+
+
+ // Generate subject of the notification(event), this is simple interface with builder class.
generateCodeOfNode(this, yangPlugin);
}
/**
* Creates a java file using the YANG notification info.
- *
- * @throws IOException input output operation fail
*/
@Override
public void generateCodeExit()
throws IOException {
- /*
+ /**
* As part of the notification support the following files needs to be generated.
* 1) Subject of the notification(event), this is simple interface with builder class.
* 2) Event class extending "AbstractEvent" and defining event type enum.