Review comments fix for the code in master
Change-Id: I7b492cb3060d2eb83667eb52e4cb2fbfafd3415e
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
index d762151..ca693c7 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
@@ -76,7 +76,8 @@
/**
* 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 {
@@ -150,6 +151,7 @@
* Prefix of parent module.
*/
private String prefix;
+
/*-
* Reference RFC 6020.
*
@@ -331,7 +333,8 @@
}
@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.
@@ -468,7 +471,8 @@
* @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
}
@@ -478,18 +482,21 @@
* @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/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
index 467ff8a..7ae7b28 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaFragmentFiles.java
@@ -114,31 +114,38 @@
* 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.
*/
@@ -168,14 +175,17 @@
* 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.
*/
@@ -190,14 +200,17 @@
* 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.
*/
@@ -212,14 +225,17 @@
* 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.
*/
@@ -254,14 +270,17 @@
* 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.
*/
@@ -276,18 +295,17 @@
* 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/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
index 8af0ecd..b925d89 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaTypeFragmentFiles.java
@@ -60,6 +60,7 @@
* 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.
*/
@@ -80,6 +81,7 @@
* Temporary file handle for of string method of class.
*/
private File ofStringImplTempFileHandle;
+
/**
* Temporary file handle for constructor for type class.
*/
@@ -94,6 +96,7 @@
* Java file handle for typedef class file.
*/
private File typedefClassJavaFileHandle;
+
/**
* Java file handle for type class like union, typedef file.
*/
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java
index 34c42e8..d463101 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaNotification.java
+++ b/utils/yangutils/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,19 +121,18 @@
*
* 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.