Coding gudilines for class and methods javadocs fixed.
Change-Id: I0153e6391c9ec9eacaac65c3989834b6bf5c65bf
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java
index b1d4580..5a8594a 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java
@@ -59,14 +59,14 @@
import static org.onosproject.yangutils.utils.UtilConstants.STRING_DATA_TYPE;
/**
- * Provides java data types corresponding to YANG type.
+ * Represents java data types info corresponding to YANG type.
*/
public final class AttributesJavaDataType {
private static Set<JavaQualifiedTypeInfo> importInfo = new TreeSet<>();
/**
- * Default constructor.
+ * Creates an instance of attribute java data type.
*/
private AttributesJavaDataType() {
}
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
index ae0c8c4..e1ea084 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
@@ -34,12 +34,12 @@
import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
/**
- * Generates class definition for generated files.
+ * Represents generator for class definition of generated files.
*/
public final class ClassDefinitionGenerator {
/**
- * Default constructor.
+ * Creates an instance of class definition generator.
*/
private ClassDefinitionGenerator() {
}
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
index 99c5c7d..cebad58 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
@@ -32,18 +32,18 @@
import static org.onosproject.yangutils.utils.UtilConstants.SPACE;
/**
- * Utility class to generate the java snippet.
+ * Represents utility class to generate the java snippet.
*/
public final class JavaCodeSnippetGen {
/**
- * Default constructor.
+ * Creates an instance of java code snippet gen.
*/
private JavaCodeSnippetGen() {
}
/**
- * Get the java file header comment.
+ * Returns the java file header comment.
*
* @return the java file header comment
*/
@@ -56,19 +56,18 @@
}
/**
- * Get the textual java code information corresponding to the import list.
+ * Returns the textual java code information corresponding to the import list.
*
* @param importInfo import info
* @return the textual java code information corresponding to the import
* list
*/
public static String getImportText(JavaQualifiedTypeInfo importInfo) {
-
return IMPORT + importInfo.getPkgInfo() + PERIOD + importInfo.getClassInfo() + SEMI_COLAN + NEW_LINE;
}
/**
- * Based on the file type and the YANG name of the file, generate the class
+ * Returns based on the file type and the YANG name of the file, generate the class
* / interface definition start.
*
* @param genFileTypes type of file being generated
@@ -85,7 +84,7 @@
}
/**
- * Get the textual java code for attribute definition in class.
+ * Returns the textual java code for attribute definition in class.
*
* @param javaAttributeTypePkg Package of the attribute type
* @param javaAttributeType java attribute type
@@ -124,18 +123,16 @@
* @return list attribute string
*/
public static String getListAttribute(String type) {
-
return LIST + DIAMOND_OPEN_BRACKET + type + DIAMOND_CLOSE_BRACKET;
}
/**
- * Based on the file type and the YANG name of the file, generate the class
+ * Returns based on the file type and the YANG name of the file, generate the class
* / interface definition close.
*
* @return corresponding textual java code information
*/
public static String getJavaClassDefClose() {
-
return CLOSE_CURLY_BRACKET;
}
}
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
index efcf053..7a30be8 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
@@ -62,12 +62,12 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.partString;
/**
- * Generates java file.
+ * Representation of java file generator.
*/
public final class JavaFileGenerator {
/**
- * Default constructor.
+ * Creates an instance of java file generator.
*/
private JavaFileGenerator() {
}
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
index 589b4e0..4228a2e 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
@@ -57,12 +57,12 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.insertDataIntoJavaFile;
/**
- * Provides utilities for java file generator.
+ * Represents utilities for java file generator.
*/
public final class JavaFileGeneratorUtils {
/**
- * Default constructor.
+ * Creates an instance of java file generator util.
*/
private JavaFileGeneratorUtils() {
}
@@ -82,7 +82,7 @@
}
/**
- * Return data stored in temporary files.
+ * Returns data stored in temporary files.
*
* @param generatedTempFiles temporary file types
* @param curNode current YANG node
@@ -126,7 +126,7 @@
}
/**
- * Initiate generation of file based on generated file type.
+ * Initiates generation of file based on generated file type.
*
* @param file generated file
* @param className generated file class name
@@ -232,7 +232,7 @@
}
/**
- * Write data to the specific generated file.
+ * Writes data to the specific generated file.
*
* @param file generated file
* @param fileName file name
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java
index b1d6ce78d..c71f2d1 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java
@@ -38,7 +38,7 @@
import static org.onosproject.yangutils.utils.UtilConstants.VERSION_PREFIX;
/**
- * Utility Class for translating the name from YANG to java convention.
+ * Represents an utility Class for translating the name from YANG to java convention.
*/
public final class JavaIdentifierSyntax {
@@ -51,13 +51,13 @@
private static final String ZERO = "0";
/**
- * Default constructor.
+ * Create instance of java identifier syntax.
*/
private JavaIdentifierSyntax() {
}
/**
- * Get the root package string.
+ * Returns the root package string.
*
* @param version YANG version
* @param nameSpace name space of the module
@@ -79,7 +79,7 @@
}
/**
- * Get the contained data model parent node.
+ * Returns the contained data model parent node.
*
* @param currentNode current node which parent contained node is required
* @return parent node in which the current node is an attribute
@@ -95,7 +95,7 @@
}
/**
- * Get the node package string.
+ * Returns the node package string.
*
* @param curNode current java node whose package string needs to be set
* @return returns the root package string
@@ -128,12 +128,12 @@
}
/**
- * Get package name from name space.
+ * Returns package name from name space.
*
* @param nameSpace name space of YANG module
* @return java package name as per java rules
*/
- public static String getPkgFromNameSpace(String nameSpace) {
+ private static String getPkgFromNameSpace(String nameSpace) {
ArrayList<String> pkgArr = new ArrayList<String>();
nameSpace = nameSpace.replace(QUOTES, EMPTY_STRING);
@@ -153,7 +153,7 @@
* @return revision string
* @throws TranslatorException when date is invalid.
*/
- public static String getYangRevisionStr(String date) throws TranslatorException {
+ private static String getYangRevisionStr(String date) throws TranslatorException {
String[] revisionArr = date.split(HYPHEN);
@@ -183,7 +183,7 @@
* @param pkgArr package array
* @return package string
*/
- public static String getPkgFrmArr(ArrayList<String> pkgArr) {
+ private static String getPkgFrmArr(ArrayList<String> pkgArr) {
String pkg = EMPTY_STRING;
int size = pkgArr.size();
@@ -203,7 +203,7 @@
}
/**
- * Get package sub name from YANG identifier name.
+ * Returns package sub name from YANG identifier name.
*
* @param name YANG identifier name
* @return java package sub name as per java rules
@@ -220,7 +220,7 @@
}
/**
- * Translate the YANG identifier name to java identifier.
+ * Returns the YANG identifier name as java identifier.
*
* @param yangIdentifier identifier in YANG file
* @return corresponding java identifier
@@ -236,7 +236,7 @@
}
/**
- * Translate the YANG identifier name to java identifier with first letter
+ * Returns the YANG identifier name as java identifier with first letter
* in caps.
*
* @param yangIdentifier identifier in YANG file
@@ -247,7 +247,7 @@
}
/**
- * Translate the YANG identifier name to java identifier with first letter
+ * Returns the YANG identifier name as java identifier with first letter
* in small.
*
* @param yangIdentifier identifier in YANG file.
@@ -258,7 +258,7 @@
}
/**
- * Get the java Package from package path.
+ * Returns the java Package from package path.
*
* @param packagePath package path
* @return java package
@@ -268,7 +268,7 @@
}
/**
- * Get the directory path corresponding to java package.
+ * Returns the directory path corresponding to java package.
*
* @param packagePath package path
* @return java package
diff --git a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
index 4ad483b..6270cd2 100644
--- a/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
+++ b/utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
@@ -83,12 +83,12 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.trimAtLast;
/**
- * Generated methods for generated files based on the file type.
+ * Represents generator for methods of generated files based on the file type.
*/
public final class MethodsGenerator {
/**
- * Default constructor.
+ * Creates an instance of method generator.
*/
private MethodsGenerator() {
}
@@ -506,7 +506,7 @@
}
/**
- * To string method for class.
+ * Returns to string method for class.
*
* @param attr attribute info
* @return to string method
@@ -521,9 +521,9 @@
}
/**
- * Returns to hash code method open strings.
+ * Returns hash code method open strings.
*
- * @return to hash code method open string
+ * @return hash code method open string
*/
public static String getHashCodeMethodOpen() {
@@ -533,7 +533,7 @@
}
/**
- * Returns to hash code methods close string.
+ * Returns hash code methods close string.
*
* @param hashcodeString hash code string
* @return to hash code method close string
@@ -547,7 +547,7 @@
}
/**
- * Hash code method for class.
+ * Returns hash code method for class.
*
* @param attr attribute info
* @return hash code method
@@ -558,10 +558,10 @@
}
/**
- * Returns to equals method open strings.
+ * Returns equals method open strings.
*
* @param className class name
- * @return to equals method open string
+ * @return equals method open string
*/
public static String getEqualsMethodOpen(String className) {
@@ -597,10 +597,10 @@
}
/**
- * Returns to equals methods close string.
+ * Returns equals methods close string.
*
* @param equalMethodString equal method string
- * @return to equals method close string
+ * @return equals method close string
*/
public static String getEqualsMethodClose(String equalMethodString) {
@@ -614,7 +614,7 @@
}
/**
- * Equals method for class.
+ * Returns equals method for class.
*
* @param attr attribute info
* @return equals method