Coding gudilines for class and methods javadocs fixed.
Change-Id: I0153e6391c9ec9eacaac65c3989834b6bf5c65bf
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/ResolutionType.java b/src/main/java/org/onosproject/yangutils/datamodel/ResolutionType.java
index 6b0da18..aa0abbb 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/ResolutionType.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/ResolutionType.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * ENUM to identify the YANG resolution type.
+ * Represents ENUM to identify the YANG resolution type.
*/
public enum ResolutionType {
/**
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangAppErrorInfo.java b/src/main/java/org/onosproject/yangutils/datamodel/YangAppErrorInfo.java
index 9b3ba3f..671aa08 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangAppErrorInfo.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangAppErrorInfo.java
@@ -17,29 +17,30 @@
* Abstraction of error message and application info processing.
*/
public interface YangAppErrorInfo {
+
/**
- * Get the application's error message for data error.
+ * Returns the application's error message for data error.
*
* @return application's error message for data error.
*/
String getGetErrorMessage();
/**
- * Set the application's error message for data error.
+ * Sets the application's error message for data error.
*
* @param errorMessage application's error message for data error.
*/
void setErrorMessage(String errorMessage);
/**
- * Get the application's error tag for data error.
+ * Returns the application's error tag for data error.
*
* @return application's error tag for data error.
*/
String getGetErrorAppTag();
/**
- * Set the application's error tag for data error.
+ * Sets the application's error tag for data error.
*
* @param errorMessage application's error tag for data error.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java b/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
index 9ca828b..374e2ab 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangAugment.java
@@ -76,7 +76,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG augment.
+ * Representation of data model node to maintain information defined in YANG augment.
*/
public class YangAugment extends YangNode
implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
@@ -124,7 +124,7 @@
}
/**
- * Get the augmented node.
+ * Returns the augmented node.
*
* @return the augmented node
*/
@@ -133,7 +133,7 @@
}
/**
- * Set the augmented node.
+ * Sets the augmented node.
*
* @param nodeIdentifiers the augmented node
*/
@@ -142,7 +142,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -176,7 +176,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -186,7 +186,7 @@
}
/**
- * Set the list of leaves.
+ * Sets the list of leaves.
*
* @param leafsList the list of leaf to set
*/
@@ -195,7 +195,7 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@@ -209,7 +209,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -219,7 +219,7 @@
}
/**
- * Set the list of leaf-list.
+ * Sets the list of leaf-list.
*
* @param listOfLeafList the list of leaf-list to set
*/
@@ -228,7 +228,7 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@@ -242,7 +242,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -252,7 +252,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -262,7 +262,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -272,7 +272,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -292,7 +292,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -302,7 +302,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -312,7 +312,7 @@
}
/**
- * Get the target nodes name where the augmentation is being done.
+ * Returns the target nodes name where the augmentation is being done.
*
* @return target nodes name where the augmentation is being done
*/
@@ -322,14 +322,13 @@
}
/**
- * Set the target nodes name where the augmentation is being done.
+ * Sets the target nodes name where the augmentation is being done.
*
* @param name target nodes name where the augmentation is being done
*/
@Override
public void setName(String name) {
this.name = name;
-
}
}
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangBelongsTo.java b/src/main/java/org/onosproject/yangutils/datamodel/YangBelongsTo.java
index 42e8bc6..7fd8a1a 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangBelongsTo.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangBelongsTo.java
@@ -44,7 +44,7 @@
*/
/**
- * Maintains the belongs-to data type information.
+ * Represents the belongs-to data type information.
*/
public class YangBelongsTo implements Parsable {
@@ -73,7 +73,7 @@
}
/**
- * Get the belongs to module name.
+ * Returns the belongs to module name.
*
* @return the belongs to module name
*/
@@ -82,7 +82,7 @@
}
/**
- * Set the belongs to module name.
+ * Sets the belongs to module name.
*
* @param belongsToModuleName the belongs to module name to set
*
@@ -92,7 +92,7 @@
}
/**
- * Get the prefix.
+ * Returns the prefix.
*
* @return the prefix
*/
@@ -101,7 +101,7 @@
}
/**
- * Set the prefix.
+ * Sets the prefix.
*
* @param prefix the prefix to set
*/
@@ -120,7 +120,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -130,7 +130,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangBit.java b/src/main/java/org/onosproject/yangutils/datamodel/YangBit.java
index 68dc985..4449b6a 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangBit.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangBit.java
@@ -16,12 +16,12 @@
package org.onosproject.yangutils.datamodel;
+import java.util.Objects;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
-import java.util.Objects;
-
/*-
* The "bit" statement, which is a sub-statement to the "type" statement,
* MUST be present if the type is "bits". It is repeatedly used to
@@ -44,7 +44,7 @@
*/
/**
- * Maintains the bit data type information.
+ * Represents the bit data type information.
*/
public class YangBit implements YangCommonInfo, Parsable {
@@ -90,7 +90,7 @@
}
/**
- * Set the bit name.
+ * Sets the bit name.
*
* @param bitName the bit name to set
*/
@@ -109,7 +109,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -129,7 +129,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -149,7 +149,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -168,7 +168,7 @@
}
/**
- * Set the bit position.
+ * Sets the bit position.
*
* @param position the position to set
*/
@@ -188,6 +188,7 @@
@Override
public boolean equals(Object obj) {
+
if (this == obj) {
return true;
}
@@ -204,7 +205,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -214,7 +215,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangBits.java b/src/main/java/org/onosproject/yangutils/datamodel/YangBits.java
index 1f53c09..4771aad 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangBits.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangBits.java
@@ -32,7 +32,7 @@
*/
/**
- * Maintains the bits data type information.
+ * Represents the bits data type information.
*/
public class YangBits implements Parsable {
@@ -43,7 +43,7 @@
private String bitsName;
/**
- * Create a YANG bits type object.
+ * Creates a YANG bits type object.
*/
public YangBits() {
setBitSet(new HashSet<YangBit>());
@@ -59,7 +59,7 @@
}
/**
- * Set the bit set.
+ * Sets the bit set.
*
* @param bitSet the bit set
*/
@@ -68,7 +68,7 @@
}
/**
- * Add bit info.
+ * Adds bit info.
*
* @param bitInfo the bit information to be added
* @throws DataModelException due to violation in data model rules
@@ -100,7 +100,7 @@
}
/**
- * Set bits name.
+ * Sets bits name.
*
* @param bitsName bit name to be set
*/
@@ -109,7 +109,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -119,7 +119,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java b/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
index 987e34a..48f5d17 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java
@@ -89,7 +89,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG case.
+ * Represents data model node to maintain information defined in YANG case.
*/
public class YangCase extends YangNode
implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
@@ -127,14 +127,14 @@
private YangStatusType status;
/**
- * Create a choice node.
+ * Creates a choice node.
*/
public YangCase() {
super(YangNodeType.CASE_NODE);
}
/**
- * Get the case name.
+ * Returns the case name.
*
* @return case name
*/
@@ -144,7 +144,7 @@
}
/**
- * Set the case name.
+ * Sets the case name.
*
* @param name case name
*/
@@ -154,7 +154,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -164,7 +164,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -174,7 +174,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -184,7 +184,7 @@
}
/**
- * Set the list of leaves.
+ * Sets the list of leaves.
*
* @param leafsList the list of leaf to set
*/
@@ -193,7 +193,7 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@@ -207,7 +207,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -217,7 +217,7 @@
}
/**
- * Set the list of leaf-list.
+ * Sets the list of leaf-list.
*
* @param listOfLeafList the list of leaf-list to set
*/
@@ -226,7 +226,7 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@@ -240,7 +240,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -250,7 +250,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -260,7 +260,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -270,7 +270,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -290,7 +290,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -300,7 +300,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java b/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
index cfc1445..43a486f 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangChoice.java
@@ -57,7 +57,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG choice.
+ * Represents data model node to maintain information defined in YANG choice.
*/
public class YangChoice extends YangNode implements YangCommonInfo, Parsable, CollisionDetector {
@@ -141,7 +141,7 @@
}
/**
- * Get the choice name.
+ * Returns the choice name.
*
* @return choice name
*/
@@ -151,7 +151,7 @@
}
/**
- * Set the choice name.
+ * Sets the choice name.
*
* @param name choice name
*/
@@ -161,7 +161,7 @@
}
/**
- * Get config flag.
+ * Returns config flag.
*
* @return the config flag
*/
@@ -170,7 +170,7 @@
}
/**
- * Set config flag.
+ * Sets config flag.
*
* @param isCfg the config flag
*/
@@ -179,7 +179,7 @@
}
/**
- * Get the default case.
+ * Returns the default case.
*
* @return the default case
*/
@@ -188,7 +188,7 @@
}
/**
- * Set the default case.
+ * Sets the default case.
*
* @param defaultCase the default case to set
*/
@@ -197,7 +197,7 @@
}
/**
- * Get the mandatory status.
+ * Returns the mandatory status.
*
* @return the mandatory status
*/
@@ -206,7 +206,7 @@
}
/**
- * Set the mandatory status.
+ * Sets the mandatory status.
*
* @param mandatory the mandatory status
*/
@@ -215,7 +215,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -225,7 +225,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -235,7 +235,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -245,7 +245,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -255,7 +255,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -265,7 +265,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -285,7 +285,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -295,7 +295,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java b/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
index a6f4592..5941837 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangContainer.java
@@ -85,7 +85,7 @@
*/
/**
- * Data model node to maintain information defined in YANG container.
+ * Represents data model node to maintain information defined in YANG container.
*/
public class YangContainer extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
@@ -138,7 +138,7 @@
}
/**
- * Get the YANG name of container.
+ * Returns the YANG name of container.
*
* @return the name of container as defined in YANG file
*/
@@ -148,7 +148,7 @@
}
/**
- * Set the YANG name of container.
+ * Sets the YANG name of container.
*
* @param name the name of container as defined in YANG file
*/
@@ -158,7 +158,7 @@
}
/**
- * Get the config flag.
+ * Returns the config flag.
*
* @return the isConfig
*/
@@ -167,7 +167,7 @@
}
/**
- * Set the config flag.
+ * Sets the config flag.
*
* @param isCfg the config flag
*/
@@ -176,7 +176,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -186,7 +186,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -196,7 +196,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -206,7 +206,7 @@
}
/**
- * Set the list of leaves.
+ * Sets the list of leaves.
*
* @param leafsList the list of leaf to set
*/
@@ -215,12 +215,13 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@Override
public void addLeaf(YangLeaf leaf) {
+
if (getListOfLeaf() == null) {
setListOfLeaf(new LinkedList<YangLeaf>());
}
@@ -229,7 +230,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -239,7 +240,7 @@
}
/**
- * Set the list of leaf-list.
+ * Sets the list of leaf-list.
*
* @param listOfLeafList the list of leaf-list to set
*/
@@ -248,12 +249,13 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@Override
public void addLeafList(YangLeafList leafList) {
+
if (getListOfLeafList() == null) {
setListOfLeafList(new LinkedList<YangLeafList>());
}
@@ -262,7 +264,7 @@
}
/**
- * Get the presence string if present.
+ * Returns the presence string if present.
*
* @return the presence
*/
@@ -271,7 +273,7 @@
}
/**
- * Set the presence string.
+ * Sets the presence string.
*
* @param presence the presence flag
*/
@@ -280,7 +282,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -290,7 +292,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -300,7 +302,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -310,7 +312,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -330,7 +332,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -340,7 +342,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangDataTypes.java b/src/main/java/org/onosproject/yangutils/datamodel/YangDataTypes.java
index 18697df..601a831 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangDataTypes.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangDataTypes.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * ENUM to identify the YANG data type.
+ * Represents ENUM to identify the YANG data type.
*/
public enum YangDataTypes {
/**
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java b/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
index 7691e4a..a0e83ec 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangDerivedInfo.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * Maintains the derived information.
+ * Represents the derived information.
*
* @param <T> extended information.
*/
@@ -52,7 +52,7 @@
}
/**
- * Set the referred typedef reference.
+ * Sets the referred typedef reference.
*
* @param referredTypeDef referred typedef reference
*/
@@ -70,7 +70,7 @@
}
/**
- * Set resolved extended information after successful linking.
+ * Sets resolved extended information after successful linking.
*
* @param resolvedExtendedInfo resolved extended information
*/
@@ -88,7 +88,7 @@
}
/**
- * Set extended information.
+ * Sets extended information.
*
* @param extendedInfo extended information
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangDesc.java b/src/main/java/org/onosproject/yangutils/datamodel/YangDesc.java
index c4b81b1..8c9d60e 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangDesc.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangDesc.java
@@ -21,8 +21,9 @@
* parsing and translator processing of description.
*/
public interface YangDesc {
+
/**
- * Get the description of YANG entity.
+ * Returns the description of YANG entity.
*
* @return the description of YANG entity.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java b/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
index 6f04af1..a9f80e3 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangEnum.java
@@ -16,12 +16,12 @@
package org.onosproject.yangutils.datamodel;
+import java.util.Objects;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
-import java.util.Objects;
-
/*-
* The "ENUM" statement, which is a sub-statement to the "type"
* statement, MUST be present if the type is "enumeration". It is
@@ -48,7 +48,7 @@
*/
/**
- * Maintains the ENUM data type information.
+ * Represents the ENUM data type information.
*/
public class YangEnum implements YangCommonInfo, Parsable {
@@ -85,7 +85,7 @@
}
/**
- * Get the named value.
+ * Returns the named value.
*
* @return the named value
*/
@@ -94,7 +94,7 @@
}
/**
- * Set the named value.
+ * Sets the named value.
*
* @param namedValue the named value to set
*/
@@ -103,7 +103,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -113,7 +113,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -123,7 +123,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -133,7 +133,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -143,7 +143,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -153,7 +153,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -163,7 +163,7 @@
}
/**
- * Get the value.
+ * Returns the value.
*
* @return the value
*/
@@ -172,7 +172,7 @@
}
/**
- * Set the value.
+ * Sets the value.
*
* @param value the value to set
*/
@@ -208,7 +208,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -218,7 +218,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java b/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
index 7e597e3..469809c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangEnumeration.java
@@ -29,7 +29,7 @@
*/
/**
- * Maintains the enumeration data type information.
+ * Represents the enumeration data type information.
*/
public class YangEnumeration implements Parsable {
@@ -47,7 +47,7 @@
}
/**
- * Get the ENUM set.
+ * Returns the ENUM set.
*
* @return the ENUM set
*/
@@ -56,7 +56,7 @@
}
/**
- * Set the ENUM set.
+ * Sets the ENUM set.
*
* @param enumSet the ENUM set to set
*/
@@ -65,7 +65,7 @@
}
/**
- * Add ENUM information.
+ * Adds ENUM information.
*
* @param enumInfo the ENUM information to be added
* @throws DataModelException due to violation in data model rules
@@ -86,7 +86,7 @@
}
/**
- * Set the enumeration name.
+ * Sets the enumeration name.
*
* @param enumerationName enumeration name
*/
@@ -105,7 +105,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -115,7 +115,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java b/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
index 36345d5..47abdca 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangGrouping.java
@@ -17,6 +17,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -74,7 +75,7 @@
*/
/**
- * Data model node to maintain information defined in YANG grouping.
+ * Represents data model node to maintain information defined in YANG grouping.
*/
public class YangGrouping extends YangNode
implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
@@ -119,7 +120,7 @@
}
/**
- * Get YANG grouping name.
+ * Returns YANG grouping name.
*
* @return YANG grouping name
*/
@@ -129,7 +130,7 @@
}
/**
- * Set YANG grouping name.
+ * Sets YANG grouping name.
*
* @param name YANG grouping name
*/
@@ -139,7 +140,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -149,7 +150,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -159,7 +160,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -169,7 +170,7 @@
}
/**
- * Set the list of leaves.
+ * Sets the list of leaves.
*
* @param leafsList the list of leaf to set
*/
@@ -178,7 +179,7 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@@ -188,7 +189,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -198,7 +199,7 @@
}
/**
- * Set the list of leaf-list.
+ * Sets the list of leaf-list.
*
* @param listOfLeafList the list of leaf-list to set
*/
@@ -207,7 +208,7 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@@ -217,7 +218,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -227,7 +228,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -237,7 +238,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -247,7 +248,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -267,7 +268,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -277,7 +278,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -299,7 +300,6 @@
*/
@Override
public void detectCollidingChild(String identifierName, YangConstructType dataType) throws DataModelException {
-
// Asks helper to detect colliding child.
detectCollidingChildUtil(identifierName, dataType, this);
}
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java b/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
index 70df4dd..b079d3f 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangImport.java
@@ -60,7 +60,7 @@
* +---------------+---------+-------------+------------------+
*/
/**
- * Maintains the information about the imported modules.
+ * Represents the information about the imported modules.
*/
public class YangImport implements Parsable {
@@ -90,14 +90,14 @@
private String revision;
/**
- * Default constructor.
+ * Creates a YANG import.
*/
public YangImport() {
}
/**
- * Get the imported module name.
+ * Returns the imported module name.
*
* @return the module name
*/
@@ -106,7 +106,7 @@
}
/**
- * Set module name.
+ * Sets module name.
*
* @param moduleName the module name to set
*/
@@ -115,7 +115,7 @@
}
/**
- * Get the prefix used to identify the entities from the imported module.
+ * Returns the prefix used to identify the entities from the imported module.
*
* @return the prefix used to identify the entities from the imported
* module
@@ -125,7 +125,7 @@
}
/**
- * Set prefix identifier.
+ * Sets prefix identifier.
*
* @param prefixId set the prefix identifier of the imported module
*/
@@ -134,7 +134,7 @@
}
/**
- * Get the revision of the imported module.
+ * Returns the revision of the imported module.
*
* @return the revision of the imported module
*/
@@ -143,7 +143,7 @@
}
/**
- * Set the revision of the imported module.
+ * Sets the revision of the imported module.
*
* @param rev set the revision of the imported module
*/
@@ -162,7 +162,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -173,7 +173,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -193,7 +193,7 @@
}
/**
- * Set the dresolution information node.
+ * Sets the dresolution information node.
*
* @param resolutionInfoNode the resolution information node
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java b/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
index 70e7016..9010368 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangInclude.java
@@ -34,8 +34,7 @@
* +---------------+---------+-------------+------------------+
*/
/**
- * Maintains the information about the included sub-modules.
- *
+ * Represents the information about the included sub-modules.
*/
public class YangInclude implements Parsable {
@@ -56,13 +55,13 @@
private HasResolutionInfo resolutionInfoNode;
/**
- * Default constructor.
+ * Creates a YANG include.
*/
public YangInclude() {
}
/**
- * Get the name of included sub-module.
+ * Returns the name of included sub-module.
*
* @return the sub-module name
*/
@@ -71,7 +70,7 @@
}
/**
- * Set the name of included sub-modules.
+ * Sets the name of included sub-modules.
*
* @param subModuleName the sub-module name to set
*/
@@ -80,7 +79,7 @@
}
/**
- * Get the revision.
+ * Returns the revision.
*
* @return the revision
*/
@@ -89,7 +88,7 @@
}
/**
- * Set the revision.
+ * Sets the revision.
*
* @param revision the revision to set
*/
@@ -108,7 +107,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -119,7 +118,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -139,7 +138,7 @@
}
/**
- * Set the dresolution information node.
+ * Sets the dresolution information node.
*
* @param resolutionInfoNode the resolution information node
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangInput.java b/src/main/java/org/onosproject/yangutils/datamodel/YangInput.java
index 2ccd8de..10f1ef4 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangInput.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangInput.java
@@ -18,6 +18,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -65,7 +66,7 @@
*/
/**
- * Data model node to maintain information defined in YANG input.
+ * Represents data model node to maintain information defined in YANG input.
*/
public class YangInput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector {
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
index 8422e14..83091b1 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangLeaf.java
@@ -54,8 +54,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Leaf data represented in YANG.
- *
+ * Represents leaf data represented in YANG.
*/
public class YangLeaf implements YangCommonInfo, Parsable {
@@ -100,13 +99,13 @@
private YangType<?> dataType;
/**
- * Default constructor to create a YANG leaf.
+ * Creates a YANG leaf.
*/
public YangLeaf() {
}
/**
- * Get the name of leaf.
+ * Returns the name of leaf.
*
* @return the leaf name
*/
@@ -115,7 +114,7 @@
}
/**
- * Set the name of leaf.
+ * Sets the name of leaf.
*
* @param leafName the leaf name to set
*/
@@ -124,7 +123,7 @@
}
/**
- * Get the config flag.
+ * Returns the config flag.
*
* @return if config flag
*/
@@ -133,7 +132,7 @@
}
/**
- * Set the config flag.
+ * Sets the config flag.
*
* @param isCfg the flag value to set
*/
@@ -142,7 +141,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -152,7 +151,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -162,7 +161,7 @@
}
/**
- * Get if the leaf is mandatory.
+ * Returns if the leaf is mandatory.
*
* @return if leaf is mandatory
*/
@@ -171,7 +170,7 @@
}
/**
- * Set if the leaf is mandatory.
+ * Sets if the leaf is mandatory.
*
* @param isReq if the leaf is mandatory
*/
@@ -180,7 +179,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -190,7 +189,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -200,7 +199,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -210,7 +209,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -220,7 +219,7 @@
}
/**
- * Get the units.
+ * Returns the units.
*
* @return the units
*/
@@ -229,7 +228,7 @@
}
/**
- * Set the units.
+ * Sets the units.
*
* @param units the units to set
*/
@@ -238,7 +237,7 @@
}
/**
- * Get the data type.
+ * Returns the data type.
*
* @return the data type
*/
@@ -247,7 +246,7 @@
}
/**
- * Set the data type.
+ * Sets the data type.
*
* @param dataType the data type to set
*/
@@ -266,7 +265,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -277,7 +276,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java b/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
index 8ad2cfc..809bb8c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangLeafList.java
@@ -50,7 +50,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Leaf-list data represented in YANG.
+ * Represents leaf-list data represented in YANG.
*/
public class YangLeafList implements YangCommonInfo, Parsable {
@@ -122,13 +122,13 @@
private YangType<?> dataType;
/**
- * Default Constructor to create a YANG leaf-list.
+ * Creates a YANG leaf-list.
*/
public YangLeafList() {
}
/**
- * Get the leaf-list name.
+ * Returns the leaf-list name.
*
* @return the leaf-list name
*/
@@ -137,7 +137,7 @@
}
/**
- * Set the leaf-list name.
+ * Sets the leaf-list name.
*
* @param leafListName the leaf-list name to set
*/
@@ -146,7 +146,7 @@
}
/**
- * Get the config flag.
+ * Returns the config flag.
*
* @return the config flag
*/
@@ -155,7 +155,7 @@
}
/**
- * Set the config flag.
+ * Sets the config flag.
*
* @param isCfg the config flag
*/
@@ -164,7 +164,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -174,7 +174,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -184,7 +184,7 @@
}
/**
- * Get the max elements no.
+ * Returns the max elements no.
*
* @return the max elements no
*/
@@ -193,7 +193,7 @@
}
/**
- * Set the max elements no.
+ * Sets the max elements no.
*
* @param maxElelements max elements no
*/
@@ -202,7 +202,7 @@
}
/**
- * Get the min elements no.
+ * Returns the min elements no.
*
* @return the min elements no
*/
@@ -211,7 +211,7 @@
}
/**
- * Set the min elements no.
+ * Sets the min elements no.
*
* @param minElements the min elements no
*/
@@ -220,7 +220,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -230,7 +230,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -240,7 +240,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -250,7 +250,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -260,7 +260,7 @@
}
/**
- * Get the units.
+ * Returns the units.
*
* @return the units
*/
@@ -269,7 +269,7 @@
}
/**
- * Set the units.
+ * Sets the units.
*
* @param units the units to set
*/
@@ -278,7 +278,7 @@
}
/**
- * Get the data type.
+ * Returns the data type.
*
* @return the data type
*/
@@ -287,7 +287,7 @@
}
/**
- * Set the data type.
+ * Sets the data type.
*
* @param dataType the data type to set
*/
@@ -306,7 +306,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -317,7 +317,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangLeavesHolder.java b/src/main/java/org/onosproject/yangutils/datamodel/YangLeavesHolder.java
index f8fc6b6..fd22a99 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangLeavesHolder.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangLeavesHolder.java
@@ -1,16 +1,19 @@
-/*Copyright 2016.year Open Networking Laboratory
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.*/
package org.onosproject.yangutils.datamodel;
import java.util.List;
@@ -23,7 +26,7 @@
public interface YangLeavesHolder {
/**
- * Get the list of leaves from data holder like container / list.
+ * Returns the list of leaves from data holder like container / list.
*
* @return the list of leaves.
*/
@@ -37,7 +40,7 @@
void addLeaf(YangLeaf leaf);
/**
- * Get the list of leaf-list from data holder like container / list.
+ * Returns the list of leaf-list from data holder like container / list.
*
* @return the list of leaf-list.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangList.java b/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
index 4593939..f743f42 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangList.java
@@ -65,7 +65,7 @@
*/
/**
- * List data represented in YANG.
+ * Represents list data represented in YANG.
*/
public class YangList extends YangNode
implements YangLeavesHolder, YangCommonInfo, Parsable, CollisionDetector {
@@ -166,14 +166,14 @@
private YangStatusType status = YangStatusType.CURRENT;
/**
- * Constructor.
+ * Creates a YANG list object.
*/
public YangList() {
super(YangNodeType.LIST_NODE);
}
/**
- * Get the YANG list name.
+ * Returns the YANG list name.
*
* @return YANG list name
*/
@@ -183,7 +183,7 @@
}
/**
- * Set the YANG list name.
+ * Sets the YANG list name.
*
* @param name YANG list name
*/
@@ -193,7 +193,7 @@
}
/**
- * Get the config flag.
+ * Returns the config flag.
*
* @return the isConfig
*/
@@ -202,7 +202,7 @@
}
/**
- * Set the config flag.
+ * Sets the config flag.
*
* @param isCfg the config flag
*/
@@ -211,7 +211,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -221,7 +221,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -231,7 +231,7 @@
}
/**
- * Get the list of key field names.
+ * Returns the list of key field names.
*
* @return the list of key field names
*/
@@ -240,7 +240,7 @@
}
/**
- * Set the list of key field names.
+ * Sets the list of key field names.
*
* @param keyList the list of key field names
*/
@@ -249,7 +249,7 @@
}
/**
- * Add a key field name.
+ * Adds a key field name.
*
* @param key key field name.
* @throws DataModelException a violation of data model rules
@@ -268,7 +268,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -278,7 +278,7 @@
}
/**
- * Set the list of leaves.
+ * Sets the list of leaves.
*
* @param leafsList the list of leaf to set
*/
@@ -287,7 +287,7 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@@ -301,7 +301,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -311,7 +311,7 @@
}
/**
- * Set the list of leaf-list.
+ * Sets the list of leaf-list.
*
* @param listOfLeafList the list of leaf-list to set
*/
@@ -320,7 +320,7 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@@ -334,7 +334,7 @@
}
/**
- * Get the max elements.
+ * Returns the max elements.
*
* @return the max elements
*/
@@ -343,7 +343,7 @@
}
/**
- * Set the max elements.
+ * Sets the max elements.
*
* @param max the max elements
*/
@@ -352,7 +352,7 @@
}
/**
- * Get the minimum elements.
+ * Returns the minimum elements.
*
* @return the minimum elements
*/
@@ -361,7 +361,7 @@
}
/**
- * Set the minimum elements.
+ * Sets the minimum elements.
*
* @param minElements the minimum elements
*/
@@ -370,7 +370,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -380,7 +380,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -390,7 +390,7 @@
}
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
@@ -400,7 +400,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -420,7 +420,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -430,7 +430,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java b/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
index 3072cad..0c4ec87 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangModule.java
@@ -17,6 +17,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -65,7 +66,7 @@
*/
/**
- * Data model node to maintain information defined in YANG module.
+ * Represents data model node to maintain information defined in YANG module.
*/
public class YangModule extends YangNode
implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo {
@@ -188,7 +189,7 @@
private List<YangResolutionInfo> unresolvedResolutionList;
/**
- * Create a YANG node of module type.
+ * Creates a YANG node of module type.
*/
public YangModule() {
@@ -201,7 +202,7 @@
}
/**
- * Get name of the module.
+ * Returns name of the module.
*
* @return module name
*/
@@ -211,7 +212,7 @@
}
/**
- * Set module name.
+ * Sets module name.
*
* @param moduleName module name
*/
@@ -221,7 +222,7 @@
}
/**
- * Get the contact details of the module owner.
+ * Returns the contact details of the module owner.
*
* @return the contact details of YANG owner
*/
@@ -230,7 +231,7 @@
}
/**
- * Set the contact details of the module owner.
+ * Sets the contact details of the module owner.
*
* @param contact the contact details of YANG owner
*/
@@ -239,7 +240,7 @@
}
/**
- * Get the description of module.
+ * Returns the description of module.
*
* @return the description of YANG module
*/
@@ -249,7 +250,7 @@
}
/**
- * Set the description of module.
+ * Sets the description of module.
*
* @param description set the description of YANG module
*/
@@ -259,7 +260,7 @@
}
/**
- * Get the list of imported modules.
+ * Returns the list of imported modules.
*
* @return the list of imported modules
*/
@@ -268,7 +269,7 @@
}
/**
- * Add the imported module information to the import list.
+ * Adds the imported module information to the import list.
*
* @param importedModule module being imported
*/
@@ -282,7 +283,7 @@
}
/**
- * Get the list of included sub modules.
+ * Returns the list of included sub modules.
*
* @return the included list of sub modules
*/
@@ -291,7 +292,7 @@
}
/**
- * Add the included sub module information to the include list.
+ * Adds the included sub module information to the include list.
*
* @param includeModule submodule being included
*/
@@ -305,7 +306,7 @@
}
/**
- * Get the list of leaves in module.
+ * Returns the list of leaves in module.
*
* @return the list of leaves
*/
@@ -315,7 +316,7 @@
}
/**
- * Add a leaf in module.
+ * Adds a leaf in module.
*
* @param leaf the leaf to be added
*/
@@ -325,7 +326,7 @@
}
/**
- * Get the list of leaf-list from module.
+ * Returns the list of leaf-list from module.
*
* @return the list of leaf-list
*/
@@ -335,7 +336,7 @@
}
/**
- * Add a leaf-list in module.
+ * Adds a leaf-list in module.
*
* @param leafList the leaf-list to be added
*/
@@ -345,7 +346,7 @@
}
/**
- * Get the name space of module elements.
+ * Returns the name space of module elements.
*
* @return the nameSpace
*/
@@ -354,7 +355,7 @@
}
/**
- * Set the name space of module elements.
+ * Sets the name space of module elements.
*
* @param nameSpace the nameSpace to set
*/
@@ -363,7 +364,7 @@
}
/**
- * Get the modules organization.
+ * Returns the modules organization.
*
* @return the organization
*/
@@ -372,7 +373,7 @@
}
/**
- * Set the modules organization.
+ * Sets the modules organization.
*
* @param org the organization to set
*/
@@ -381,7 +382,7 @@
}
/**
- * Get the prefix.
+ * Returns the prefix.
*
* @return the prefix
*/
@@ -390,7 +391,7 @@
}
/**
- * Set the prefix.
+ * Sets the prefix.
*
* @param prefix the prefix to set
*/
@@ -407,7 +408,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -417,7 +418,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -427,7 +428,7 @@
}
/**
- * Get the revision.
+ * Returns the revision.
*
* @return the revision
*/
@@ -436,7 +437,7 @@
}
/**
- * Set the revision.
+ * Sets the revision.
*
* @param revision the revision to set
*/
@@ -445,7 +446,7 @@
}
/**
- * Get the version.
+ * Returns the version.
*
* @return the version
*/
@@ -454,7 +455,7 @@
}
/**
- * Set the version.
+ * Sets the version.
*
* @param version the version to set
*/
@@ -473,7 +474,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -486,7 +487,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java b/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
index 28ccb8e..597a36c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangMust.java
@@ -44,7 +44,7 @@
*/
/**
- * Maintain information defined in YANG must.
+ * Represents information defined in YANG must.
*/
public class YangMust implements YangDesc, YangReference, Parsable {
@@ -64,13 +64,13 @@
private String reference;
/**
- * Create a YANG must restriction.
+ * Creates a YANG must restriction.
*/
public YangMust() {
}
/**
- * Get the constraint.
+ * Returns the constraint.
*
* @return the constraint
*/
@@ -79,7 +79,7 @@
}
/**
- * Set the constraint.
+ * Sets the constraint.
*
* @param constratint the constraint to set
*/
@@ -88,7 +88,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -98,7 +98,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -108,7 +108,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -118,7 +118,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -138,7 +138,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -148,7 +148,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangNameSpace.java b/src/main/java/org/onosproject/yangutils/datamodel/YangNameSpace.java
index 3111773..c27737a 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangNameSpace.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangNameSpace.java
@@ -30,20 +30,20 @@
*/
/**
- * Name space to be used for the XML data tree.
+ * Represents name space to be used for the XML data tree.
*/
public class YangNameSpace implements Parsable {
private String uri;
/**
- * Default constructor.
+ * Creats a YANG name space object.
*/
public YangNameSpace() {
}
/**
- * Get the name space URI.
+ * Returns the name space URI.
*
* @return the URI
*/
@@ -52,7 +52,7 @@
}
/**
- * Set the name space URI.
+ * Sets the name space URI.
*
* @param uri the URI to set
*/
@@ -71,24 +71,22 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@Override
public void validateDataOnEntry() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser
-
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@Override
public void validateDataOnExit() throws DataModelException {
// TODO auto-generated method stub, to be implemented by parser
-
}
}
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java b/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
index 46c2318..beb8aa6 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangNode.java
@@ -18,7 +18,7 @@
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
/**
- * Base class of a node in data model tree.
+ * Represents base class of a node in data model tree.
*/
public abstract class YangNode {
@@ -48,21 +48,21 @@
private YangNode previousSibling;
/**
- * Get the nodes name.
+ * Returns the nodes name.
*
* @return nodes name
*/
public abstract String getName();
/**
- * Set the nodes name.
+ * Sets the nodes name.
*
* @param name nodes name
*/
public abstract void setName(String name);
/**
- * Default constructor is made private to ensure node type is always set.
+ * Creates a YANG node object.
*/
@SuppressWarnings("unused")
private YangNode() {
@@ -70,7 +70,7 @@
}
/**
- * Create a specific type of node.
+ * Creates a specific type of node.
*
* @param type of YANG node
*/
@@ -79,7 +79,7 @@
}
/**
- * Get the node type.
+ * Returns the node type.
*
* @return node type
*/
@@ -88,7 +88,7 @@
}
/**
- * Set the node type.
+ * Sets the node type.
*
* @param nodeType type of node
*/
@@ -97,7 +97,7 @@
}
/**
- * Get the parent of node.
+ * Returns the parent of node.
*
* @return parent of node
*/
@@ -106,7 +106,7 @@
}
/**
- * Set the parent of node.
+ * Sets the parent of node.
*
* @param parent node
*/
@@ -115,7 +115,7 @@
}
/**
- * Get the first child of node.
+ * Returns the first child of node.
*
* @return first child of node
*/
@@ -124,7 +124,7 @@
}
/**
- * Set the first instance of a child node.
+ * Sets the first instance of a child node.
*
* @param child is only child to be set
*/
@@ -133,7 +133,7 @@
}
/**
- * Get the next sibling of node.
+ * Returns the next sibling of node.
*
* @return next sibling of node
*/
@@ -142,7 +142,7 @@
}
/**
- * Set the next sibling of node.
+ * Sets the next sibling of node.
*
* @param sibling YANG node
*/
@@ -151,7 +151,7 @@
}
/**
- * Get the previous sibling.
+ * Returns the previous sibling.
*
* @return previous sibling node
*/
@@ -160,7 +160,7 @@
}
/**
- * Set the previous sibling.
+ * Sets the previous sibling.
*
* @param previousSibling points to predecessor sibling
*/
@@ -169,7 +169,7 @@
}
/**
- * Add a child node, the children sibling list will be sorted based on node
+ * Adds a child node, the children sibling list will be sorted based on node
* type.
*
* @param newChild refers to a child to be added
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangNodeIdentifier.java b/src/main/java/org/onosproject/yangutils/datamodel/YangNodeIdentifier.java
index e5d56fc..871b683 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangNodeIdentifier.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangNodeIdentifier.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * YANG node identifier which is a combination of prefix and name.
+ * Represents YANG node identifier which is a combination of prefix and name.
*/
public class YangNodeIdentifier {
@@ -43,7 +43,7 @@
}
/**
- * Set name of the node identifier.
+ * Sets name of the node identifier.
*
* @param name name of the node identifier
*/
@@ -61,7 +61,7 @@
}
/**
- * Set prefix of the node identifier.
+ * Sets prefix of the node identifier.
*
* @param prefix prefix of the node identifier
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java b/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
index 991f2be..174ca39 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangNodeType.java
@@ -16,7 +16,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * Node type in data model tree corresponding to YANG schema.
+ * Represents node type in data model tree corresponding to YANG schema.
*/
public enum YangNodeType {
/**
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java b/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
index 8a43b07..e7b0241 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangNotification.java
@@ -18,6 +18,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -71,10 +72,10 @@
*/
/**
- * Data model node to maintain information defined in YANG notification.
+ * Represents data model node to maintain information defined in YANG notification.
*/
public class YangNotification extends YangNode implements YangLeavesHolder, YangCommonInfo, Parsable,
- CollisionDetector {
+ CollisionDetector {
/**
* Name of the notification.
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangOutput.java b/src/main/java/org/onosproject/yangutils/datamodel/YangOutput.java
index d3aedaf..e9fa9c3 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangOutput.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangOutput.java
@@ -18,6 +18,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -64,7 +65,7 @@
*/
/**
- * Data model node to maintain information defined in YANG output.
+ * Represents data model node to maintain information defined in YANG output.
*/
public class YangOutput extends YangNode implements YangLeavesHolder, Parsable, CollisionDetector {
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangPatternRestriction.java b/src/main/java/org/onosproject/yangutils/datamodel/YangPatternRestriction.java
index 2d111cb..1233b08 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangPatternRestriction.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangPatternRestriction.java
@@ -47,7 +47,7 @@
* +---------------+---------+-------------+
*/
/**
- * Pattern restriction information. The regular expression restriction on string
+ * Represents pattern restriction information. The regular expression restriction on string
* data type.
*/
public class YangPatternRestriction {
@@ -63,14 +63,14 @@
private List<String> basePattern;
/**
- * Default constructor.
+ * Creates a YANG pattern restriction object.
*/
public YangPatternRestriction() {
setPatternList(new LinkedList<String>());
}
/**
- * Get the pattern restriction defined for the current type.
+ * Returns the pattern restriction defined for the current type.
*
* @return pattern restriction defined for the current type.
*/
@@ -79,7 +79,7 @@
}
/**
- * Set the pattern restriction defined for the current type.
+ * Sets the pattern restriction defined for the current type.
*
* @param pattern pattern restriction defined for the current type..
*/
@@ -88,7 +88,7 @@
}
/**
- * Add a new pattern to the list of pattern restriction.
+ * Adds a new pattern to the list of pattern restriction.
*
* @param newPattern pattern restriction.
*/
@@ -97,7 +97,7 @@
}
/**
- * Get the pattern restriction defined in base type.
+ * Returns the pattern restriction defined in base type.
*
* @return pattern restriction defined in base type.
*/
@@ -106,7 +106,7 @@
}
/**
- * Set the pattern restriction defined in base type.
+ * Sets the pattern restriction defined in base type.
*
* @param basePattern pattern restriction defined in base type.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangRangeInterval.java b/src/main/java/org/onosproject/yangutils/datamodel/YangRangeInterval.java
index d3061a7..442cda0 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangRangeInterval.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangRangeInterval.java
@@ -14,7 +14,7 @@
package org.onosproject.yangutils.datamodel;
/**
- * Single interval information of a range.
+ * Represents single interval information of a range.
*
* @param <T> range type based on the data type.
*/
@@ -31,13 +31,13 @@
private T endValue;
/**
- * Default constructor.
+ * Creates YANG range interval object.
*/
public YangRangeInterval() {
}
/**
- * Get the starting value of the range interval.
+ * Returns the starting value of the range interval.
*
* @return the starting value of the range interval.
*/
@@ -46,7 +46,7 @@
}
/**
- * Set the starting value of the range interval.
+ * Sets the starting value of the range interval.
*
* @param startValue the starting value of the range interval.
*/
@@ -55,7 +55,7 @@
}
/**
- * Get the last value of the range interval.
+ * Returns the last value of the range interval.
*
* @return last value of the range interval.
*/
@@ -64,7 +64,7 @@
}
/**
- * Set the last value of the range interval.
+ * Sets the last value of the range interval.
*
* @param endValue last value of the range interval.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangRangeRestriction.java b/src/main/java/org/onosproject/yangutils/datamodel/YangRangeRestriction.java
index bca548e..09eb796 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangRangeRestriction.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangRangeRestriction.java
@@ -48,7 +48,7 @@
* for the type being restricted, respectively.
*/
/**
- * Ascending range restriction information.
+ * Represents ascending range restriction information.
*
* @param <T> range type (data type)
*/
@@ -81,35 +81,34 @@
private String description;
/**
- * Default constructor.
+ * Creates YANG range restriction object.
*/
public YangRangeRestriction() {
}
/**
- * Get the list of range interval restriction in ascending order.
+ * Returns the list of range interval restriction in ascending order.
*
- * @return list of range interval restriction in ascending order.
+ * @return list of range interval restriction in ascending order
*/
public List<YangRangeInterval<T>> getAscendingRangeIntervals() {
return ascendingRangeIntervals;
}
/**
- * Set the list of range interval restriction in ascending order.
+ * Sets the list of range interval restriction in ascending order.
*
- * @param rangeList list of range interval restriction in ascending order.
+ * @param rangeList list of range interval restriction in ascending order
*/
private void setAscendingRangeIntervals(List<YangRangeInterval<T>> rangeList) {
ascendingRangeIntervals = rangeList;
}
/**
- * Get the minimum valid value as per the restriction.
+ * Returns the minimum valid value as per the restriction.
*
- * @throws DataModelException data model exception for minimum restriction.
- *
- * @return minimum restricted value.
+ * @throws DataModelException data model exception for minimum restriction
+ * @return minimum restricted value
*/
public T getMinRestrictedvalue() throws DataModelException {
if (getAscendingRangeIntervals() == null) {
@@ -122,11 +121,10 @@
}
/**
- * Get the maximum valid value as per the restriction.
+ * Returns the maximum valid value as per the restriction.
*
- * @throws DataModelException data model exception for maximum restriction.
- *
- * @return minimum maximum value.
+ * @throws DataModelException data model exception for maximum restriction
+ * @return minimum maximum value
*/
public T getMaxRestrictedvalue() throws DataModelException {
if (getAscendingRangeIntervals() == null) {
@@ -140,11 +138,11 @@
}
/**
- * Add new interval to extend its range in the last. i.e. newly added
+ * Adds new interval to extend its range in the last. i.e. newly added
* interval needs to be bigger than the biggest interval in the list.
*
- * @param newInterval restricted length interval.
- * @throws DataModelException data model exception for range restriction.
+ * @param newInterval restricted length interval
+ * @throws DataModelException data model exception for range restriction
*/
public void addRangeRestrictionInterval(YangRangeInterval<T> newInterval) throws DataModelException {
@@ -173,9 +171,9 @@
}
/**
- * Get the textual reference of the length restriction.
+ * Returns the textual reference of the length restriction.
*
- * @return textual reference of the length restriction.
+ * @return textual reference of the length restriction
*/
@Override
public String getReference() {
@@ -183,9 +181,9 @@
}
/**
- * Set the textual reference of the length restriction.
+ * Sets the textual reference of the length restriction.
*
- * @param ref textual reference of the length restriction.
+ * @param ref textual reference of the length restriction
*/
@Override
public void setReference(String ref) {
@@ -193,9 +191,9 @@
}
/**
- * Get the description of the length restriction.
+ * Returns the description of the length restriction.
*
- * @return description of the length restriction.
+ * @return description of the length restriction
*/
@Override
public String getDescription() {
@@ -203,9 +201,9 @@
}
/**
- * Set the description of the length restriction.
+ * Sets the description of the length restriction.
*
- * @param desc description of the length restriction.
+ * @param desc description of the length restriction
*/
@Override
public void setDescription(String desc) {
@@ -214,9 +212,9 @@
}
/**
- * Get application's error message, to be used for data error.
+ * Returns application's error message, to be used for data error.
*
- * @return Application's error message, to be used for data error.
+ * @return Application's error message, to be used for data error
*/
@Override
public String getGetErrorMessage() {
@@ -224,9 +222,9 @@
}
/**
- * Set Application's error message, to be used for data error.
+ * Sets Application's error message, to be used for data error.
*
- * @param errMsg Application's error message, to be used for data error.
+ * @param errMsg Application's error message, to be used for data error
*/
@Override
public void setErrorMessage(String errMsg) {
@@ -235,9 +233,9 @@
}
/**
- * Get application's error tag, to be used for data error.
+ * Returns application's error tag, to be used for data error.
*
- * @return application's error tag, to be used for data error.
+ * @return application's error tag, to be used for data error
*/
@Override
public String getGetErrorAppTag() {
@@ -245,7 +243,7 @@
}
/**
- * Set application's error tag, to be used for data error.
+ * Sets application's error tag, to be used for data error.
*
* @param errTag application's error tag, to be used for data error.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangReference.java b/src/main/java/org/onosproject/yangutils/datamodel/YangReference.java
index 8003f60..44397a3 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangReference.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangReference.java
@@ -20,17 +20,18 @@
* parsing and translator processing of reference.
*/
public interface YangReference {
+
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
- * @return the reference.
+ * @return the reference
*/
String getReference();
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
- * @param reference the reference to set.
+ * @param reference the reference to set
*/
void setReference(String reference);
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangResolutionInfo.java b/src/main/java/org/onosproject/yangutils/datamodel/YangResolutionInfo.java
index c9355f7..b6c2f7c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangResolutionInfo.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangResolutionInfo.java
@@ -17,10 +17,11 @@
package org.onosproject.yangutils.datamodel;
import java.util.Stack;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
/**
- * Resolution object which will be resolved by linker.
+ * Represents resolution object which will be resolved by linker.
*/
public class YangResolutionInfo<T> {
@@ -43,8 +44,8 @@
private boolean isResolved;
/*
- * Stack for type/uses is maintained for hierarchical references, this
- * is used during resolution.
+ * Stack for type/uses is maintained for hierarchical references, this is
+ * used during resolution.
*/
private Stack<T> partialResolvedStack;
@@ -72,8 +73,8 @@
* @param charPositionInLine error character position in line
*/
public YangResolutionInfo(T dataNode, ResolutionType resolutionType,
- YangNode holderNode, String prefix, int lineNumber,
- int charPositionInLine) {
+ YangNode holderNode, String prefix, int lineNumber,
+ int charPositionInLine) {
this.setHolderOfEntityToResolve(holderNode);
this.setEntityToResolve(dataNode);
this.setPrefix(prefix);
@@ -92,8 +93,8 @@
* @param charPositionInLine error character position in line
*/
public YangResolutionInfo(T dataNode, ResolutionType resolutionType,
- YangNode holderNode, int lineNumber,
- int charPositionInLine) {
+ YangNode holderNode, int lineNumber,
+ int charPositionInLine) {
this.setHolderOfEntityToResolve(holderNode);
this.setEntityToResolve(dataNode);
this.setLineNumber(lineNumber);
@@ -106,7 +107,7 @@
* @param resolutionInfoNodePrefix module/sub-module prefix
* @throws DataModelException DataModelException a violation of data model rules
*/
- public void resolveLinkingForResolutionInfo(String resolutionInfoNodePrefix) throws DataModelException {
+ public void resolveLinkingForResolutionInfo(String resolutionInfoNodePrefix) throws DataModelException {
this.resolutionInfoRootNodePrefix = resolutionInfoNodePrefix;
@@ -177,8 +178,8 @@
}
if (isMoreReferenceDetected) {
/*
- * If more reference are present, tree traversal must start
- * from first child again, to check the availability of
+ * If more reference are present, tree traversal must start from
+ * first child again, to check the availability of
* typedef/grouping.
*/
node = parentNode.getChild();
@@ -197,14 +198,14 @@
* @return flag to indicate whether resolution is done
* @throws DataModelException a violation of data model rules
*/
- private boolean resolveLinkingForNode(YangNode node, YangNode parentNode) throws
- DataModelException {
+ private boolean resolveLinkingForNode(YangNode node, YangNode parentNode) throws DataModelException {
+
/*
- * Check if name of node name matches with the entity name
- * under resolution.
+ * Check if name of node name matches with the entity name under
+ * resolution.
*/
if (isNodeNameSameAsResolutionInfoName(node)) {
- // Add reference of entity to the node under resolution.
+ // Adds reference of entity to the node under resolution.
addReferredEntityLink(node);
// Check if referred entity has further reference to uses/type.
if (!(isMoreReferencePresent(node))) {
@@ -212,7 +213,7 @@
resolveStackAndAddToStack(node);
return true;
} else {
- // Add referred type/uses to the stack.
+ // Adds referred type/uses to the stack.
addToPartialResolvedStack(node);
/*
* Check whether referred type is resolved, partially resolved
@@ -230,25 +231,25 @@
updateResolutionTypeToPartial();
return true;
} else {
- /*
- * Check if prefix is present to find that the derived
- * reference is for intra file or inter file, if it's
- * inter-file return and stop further processing.
- */
+ /*
+ * Check if prefix is present to find that the derived
+ * reference is for intra file or inter file, if it's
+ * inter-file return and stop further processing.
+ */
if (isExternalPrefixPresent(node)) {
/*
- * Update the resolution type to partially resolved for all
- * type/uses in stack
+ * Update the resolution type to partially resolved for
+ * all type/uses in stack
*/
updateResolutionTypeToPartial();
return true;
} else {
- /*
- * If prefix is not present it indicates intra-file
- * dependency in this case set the node back to first
- * child, as referred entity may appear in any order
- * and continue with the resolution.
- */
+ /*
+ * If prefix is not present it indicates intra-file
+ * dependency in this case set the node back to first
+ * child, as referred entity may appear in any order and
+ * continue with the resolution.
+ */
isMoreReferenceDetected = true;
return false;
}
@@ -265,26 +266,26 @@
*/
private void updateResolutionTypeToPartial() throws DataModelException {
// For all entries in stack calls for the resolution in type/uses.
- for (T entity:getPartialResolvedStack()) {
+ for (T entity : getPartialResolvedStack()) {
if (!(entity instanceof Resolvable)) {
throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
}
if (((Resolvable) entity).getResolvableStatus() == ResolvableStatus.UNRESOLVED) {
- // Set the resolution status in inside the type/uses.
+ // Sets the resolution status in inside the type/uses.
((Resolvable) entity).setResolvableStatus(ResolvableStatus.PARTIALLY_RESOLVED);
}
}
}
/**
- * Add referred type/uses to the stack and resolve the stack.
+ * Adds referred type/uses to the stack and resolve the stack.
*
* @param node typedef/grouping node
* @throws DataModelException a violation of data model rules
*/
private void resolveStackAndAddToStack(YangNode node) throws DataModelException {
if (getEntityToResolve() instanceof YangType) {
- // Add to the stack only for YANG typedef.
+ // Adds to the stack only for YANG typedef.
getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType());
}
// Don't add to stack in case of YANG grouping.
@@ -303,13 +304,13 @@
/*
* Checks if type is partially resolved.
*/
- if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() ==
- ResolvableStatus.PARTIALLY_RESOLVED) {
+ if (((YangType) getPartialResolvedStack().peek())
+ .getResolvableStatus() == ResolvableStatus.PARTIALLY_RESOLVED) {
return true;
}
} else if (getPartialResolvedStack().peek() instanceof YangUses) {
- if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() ==
- ResolvableStatus.PARTIALLY_RESOLVED) {
+ if (((YangUses) getPartialResolvedStack().peek())
+ .getResolvableStatus() == ResolvableStatus.PARTIALLY_RESOLVED) {
return true;
}
}
@@ -326,13 +327,11 @@
/*
* Checks if type is partially resolved.
*/
- if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() ==
- ResolvableStatus.RESOLVED) {
+ if (((YangType) getPartialResolvedStack().peek()).getResolvableStatus() == ResolvableStatus.RESOLVED) {
return true;
}
} else if (getPartialResolvedStack().peek() instanceof YangUses) {
- if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() ==
- ResolvableStatus.RESOLVED) {
+ if (((YangUses) getPartialResolvedStack().peek()).getResolvableStatus() == ResolvableStatus.RESOLVED) {
return true;
}
}
@@ -361,7 +360,6 @@
return false;
}
-
/**
* Check if node name is same as name in resolution info, i.e. name of
* typedef/grouping is same as name of type/uses.
@@ -387,7 +385,7 @@
}
/**
- * Add reference of grouping/typedef in uses/type.
+ * Adds reference of grouping/typedef in uses/type.
*
* @param node grouping/typedef node
* @throws DataModelException a violation of data model rules
@@ -457,30 +455,30 @@
*/
private void resolveCompleteStack() throws DataModelException {
// For all entries in stack calls for the resolution in type/uses.
- for (T entity:getPartialResolvedStack()) {
+ for (T entity : getPartialResolvedStack()) {
if (!(entity instanceof Resolvable)) {
throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
}
((Resolvable) entity).resolve();
- // Set the resolution status in inside the type/uses.
+ // Sets the resolution status in inside the type/uses.
((Resolvable) entity).setResolvableStatus(ResolvableStatus.RESOLVED);
}
/*
- * Set the resolution status in resolution info present in resolution
+ * Sets the resolution status in resolution info present in resolution
* list.
*/
setIsResolved(true);
}
/**
- * Add to partial resolved stack.
+ * Adds to partial resolved stack.
*
* @param node grouping/typedef node
* @throws DataModelException a violation of data model rules
*/
private void addToPartialResolvedStack(YangNode node) throws DataModelException {
if (getPartialResolvedStack().peek() instanceof YangType) {
- // Add to the stack only for YANG typedef.
+ // Adds to the stack only for YANG typedef.
getPartialResolvedStack().push((T) ((YangTypeDef) node).getDataType());
} else if (getPartialResolvedStack().peek() instanceof YangUses) {
getPartialResolvedStack().push((T) getUsesInGrouping(node));
@@ -522,7 +520,7 @@
}
/**
- * Set prefix of imported module.
+ * Sets prefix of imported module.
*
* @param prefix of imported module
*/
@@ -540,7 +538,7 @@
}
/**
- * Set parsable entity to be resolved.
+ * Sets parsable entity to be resolved.
*
* @param entityToResolve YANG entity to be resolved
*/
@@ -558,7 +556,7 @@
}
/**
- * Set parent YANG node holder for the entity to be resolved.
+ * Sets parent YANG node holder for the entity to be resolved.
*
* @param holderOfEntityToResolve parent YANG node holder
*/
@@ -576,7 +574,7 @@
}
/**
- * Set error position.
+ * Sets error position.
*
* @param charPosition position of error
*/
@@ -594,7 +592,7 @@
}
/**
- * Set error character position in line.
+ * Sets error character position in line.
*
* @param lineNumber error character position in line
*/
@@ -612,7 +610,7 @@
}
/**
- * Set status of resolution.
+ * Sets status of resolution.
*
* @param isResolved resolution status
*/
@@ -630,7 +628,7 @@
}
/**
- * Set stack of YANG type with partially resolved YANG construct hierarchy.
+ * Sets stack of YANG type with partially resolved YANG construct hierarchy.
*
* @param partialResolvedStack partial resolved YANG construct stack
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java b/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
index 511f751..26932f4 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangRevision.java
@@ -40,7 +40,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Maintains the information about the revision.
+ * Represents the information about the revision.
*/
public class YangRevision implements YangDesc, YangReference, Parsable {
@@ -60,13 +60,13 @@
private String reference;
/**
- * Default constructor.
+ * Creates a YANG revision object.
*/
public YangRevision() {
}
/**
- * Get the revision date.
+ * Returns the revision date.
*
* @return the revision date
*/
@@ -75,7 +75,7 @@
}
/**
- * Set the revision date.
+ * Sets the revision date.
*
* @param revDate the revision date to set
*/
@@ -84,7 +84,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -94,7 +94,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -104,7 +104,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -114,7 +114,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -134,7 +134,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -145,7 +145,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java b/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
index ff32eff..15a6626 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangRpc.java
@@ -54,10 +54,10 @@
*/
/**
- * Data model node to maintain information defined in YANG rpc.
+ * Represents data model node to maintain information defined in YANG rpc.
*/
public class YangRpc extends YangNode implements YangCommonInfo, Parsable,
- CollisionDetector {
+ CollisionDetector {
/**
* Name of the rpc.
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangStatus.java b/src/main/java/org/onosproject/yangutils/datamodel/YangStatus.java
index 6ff3b55..2b3c626 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangStatus.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangStatus.java
@@ -18,15 +18,16 @@
* translator processing of status.
*/
public interface YangStatus {
+
/**
- * Get the status.
+ * Returns the status.
*
* @return the status
*/
YangStatusType getStatus();
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangStringRestriction.java b/src/main/java/org/onosproject/yangutils/datamodel/YangStringRestriction.java
index 1cdfa15..50a1f83 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangStringRestriction.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangStringRestriction.java
@@ -25,7 +25,7 @@
*
*/
/**
- * The restriction for string data type.
+ * Represents the restriction for string data type.
*/
public class YangStringRestriction {
@@ -75,51 +75,51 @@
private YangPatternRestriction patternRestriction;
/**
- * Default constructor.
+ * Creates a YANG string restriction object.
*/
public YangStringRestriction() {
}
/**
- * Get the length restriction on the string data.
+ * Returns the length restriction on the string data.
*
- * @return length restriction on the string data.
+ * @return length restriction on the string data
*/
public YangRangeRestriction<BigInteger> getLengthRestriction() {
return lengthRestriction;
}
/**
- * Set the length restriction on the string data.
+ * Sets the length restriction on the string data.
*
- * @param lengthRestriction length restriction on the string data.
+ * @param lengthRestriction length restriction on the string data
*/
public void setLengthRestriction(YangRangeRestriction<BigInteger> lengthRestriction) {
this.lengthRestriction = lengthRestriction;
}
/**
- * Get the pattern restriction for the type.
+ * Returns the pattern restriction for the type.
*
- * @return pattern restriction for the type.
+ * @return pattern restriction for the type
*/
public YangPatternRestriction getPatternRestriction() {
return patternRestriction;
}
/**
- * Set the pattern restriction for the type.
+ * Sets the pattern restriction for the type.
*
- * @param patternRestriction pattern restriction for the type.
+ * @param patternRestriction pattern restriction for the type
*/
private void setPatternRestriction(YangPatternRestriction patternRestriction) {
this.patternRestriction = patternRestriction;
}
/**
- * Add a new pattern restriction for the type.
+ * Adds a new pattern restriction for the type.
*
- * @param newPattern new pattern restriction for the type.
+ * @param newPattern new pattern restriction for the type
*/
public void addPattern(String newPattern) {
if (getPatternRestriction() == null) {
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java b/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
index 04da5e4..68c2ea4 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangSubModule.java
@@ -17,6 +17,7 @@
import java.util.LinkedList;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
@@ -72,7 +73,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG sub-module.
+ * Represents data model node to maintain information defined in YANG sub-module.
*/
public class YangSubModule extends YangNode
implements YangLeavesHolder, YangDesc, YangReference, Parsable, CollisionDetector, HasResolutionInfo {
@@ -183,7 +184,7 @@
*/
private List<YangResolutionInfo> unresolvedResolutionList;
/**
- * Create a sub module node.
+ * Creates a sub module node.
*/
public YangSubModule() {
super(YangNodeType.SUB_MODULE_NODE);
@@ -195,7 +196,7 @@
}
/**
- * Get the YANG name of the sub module.
+ * Returns the YANG name of the sub module.
*
* @return YANG name of the sub module
*/
@@ -205,7 +206,7 @@
}
/**
- * Set YANG name of the sub module.
+ * Sets YANG name of the sub module.
*
* @param subModuleName YANG name of the sub module
*/
@@ -215,7 +216,7 @@
}
/**
- * Get the module info.
+ * Returns the module info.
*
* @return the belongs to info
*/
@@ -224,7 +225,7 @@
}
/**
- * Set the module info.
+ * Sets the module info.
*
* @param belongsTo module info to set
*/
@@ -233,7 +234,7 @@
}
/**
- * Get the contact.
+ * Returns the contact.
*
* @return the contact
*/
@@ -242,7 +243,7 @@
}
/**
- * Set the contact.
+ * Sets the contact.
*
* @param contact the contact to set
*/
@@ -251,7 +252,7 @@
}
/**
- * Get the description.
+ * Returns the description.
*
* @return the description
*/
@@ -261,7 +262,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -271,7 +272,7 @@
}
/**
- * Get the list of imported modules.
+ * Returns the list of imported modules.
*
* @return the list of imported modules
*/
@@ -280,7 +281,7 @@
}
/**
- * Add the imported module information to the import list.
+ * Adds the imported module information to the import list.
*
* @param importedModule module being imported
*/
@@ -294,7 +295,7 @@
}
/**
- * Get the list of included sub modules.
+ * Returns the list of included sub modules.
*
* @return the included list of sub modules
*/
@@ -303,7 +304,7 @@
}
/**
- * Add the included sub module information to the include list.
+ * Returns the included sub module information to the include list.
*
* @param includeModule submodule being included
*/
@@ -335,7 +336,7 @@
}
/**
- * Get the list of leaves.
+ * Returns the list of leaves.
*
* @return the list of leaves
*/
@@ -345,7 +346,7 @@
}
/**
- * Add a leaf.
+ * Adds a leaf.
*
* @param leaf the leaf to be added
*/
@@ -355,7 +356,7 @@
}
/**
- * Get the list of leaf-list.
+ * Returns the list of leaf-list.
*
* @return the list of leaf-list
*/
@@ -365,7 +366,7 @@
}
/**
- * Add a leaf-list.
+ * Adds a leaf-list.
*
* @param leafList the leaf-list to be added
*/
@@ -375,7 +376,7 @@
}
/**
- * Get the sub-modules organization.
+ * Returns the sub-modules organization.
*
* @return the organization
*/
@@ -384,7 +385,7 @@
}
/**
- * Set the sub-modules organization.
+ * Sets the sub-modules organization.
*
* @param org the organization to set
*/
@@ -393,7 +394,7 @@
}
/**
- * Get the textual reference.
+ * Returns the textual reference.
*
* @return the reference
*/
@@ -403,7 +404,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -413,7 +414,7 @@
}
/**
- * Get the revision.
+ * Returns the revision.
*
* @return the revision
*/
@@ -422,7 +423,7 @@
}
/**
- * Set the revision.
+ * Sets the revision.
*
* @param revision the revision to set
*/
@@ -431,7 +432,7 @@
}
/**
- * Get the version.
+ * Returns the version.
*
* @return the version
*/
@@ -440,7 +441,7 @@
}
/**
- * Set the version.
+ * Sets the version.
*
* @param version the version to set
*/
@@ -459,7 +460,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -469,7 +470,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangType.java b/src/main/java/org/onosproject/yangutils/datamodel/YangType.java
index 222cad5..37d8a05 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangType.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangType.java
@@ -45,7 +45,7 @@
*/
/**
- * Maintains the data type information.
+ * Represents the data type information.
*
* @param <T> YANG data type info
*/
@@ -94,7 +94,7 @@
private ResolvableStatus resolvableStatus;
/**
- * Default constructor.
+ * Creates a YANG type object.
*/
public YangType() {
@@ -112,7 +112,7 @@
}
/**
- * Set prefix associated with data type name.
+ * Sets prefix associated with data type name.
*
* @param prefix prefix associated with data type name
*/
@@ -121,7 +121,7 @@
}
/**
- * Get the name of data type.
+ * Returns the name of data type.
*
* @return the name of data type
*/
@@ -130,7 +130,7 @@
}
/**
- * Set the name of the data type.
+ * Sets the name of the data type.
*
* @param typeName the name to set
*/
@@ -139,7 +139,7 @@
}
/**
- * Get the Java package where the type is defined.
+ * Returns the Java package where the type is defined.
*
* @return Java package where the type is defined
*/
@@ -148,7 +148,7 @@
}
/**
- * Set Java package where the type is defined.
+ * Sets Java package where the type is defined.
*
* @param javaPackage Java package where the type is defined
*/
@@ -157,7 +157,7 @@
}
/**
- * Get the type of data.
+ * Returns the type of data.
*
* @return the data type
*/
@@ -166,7 +166,7 @@
}
/**
- * Set the type of data.
+ * Sets the type of data.
*
* @param dataType data type
*/
@@ -175,7 +175,7 @@
}
/**
- * Get the data type meta data.
+ * Returns the data type meta data.
*
* @return the data type meta data
*/
@@ -184,7 +184,7 @@
}
/**
- * Set the data type meta data.
+ * Sets the data type meta data.
*
* @param dataTypeInfo the meta data to set
*/
@@ -202,7 +202,7 @@
}
/**
- * Set node identifier.
+ * Sets node identifier.
*
* @param nodeIdentifier the node identifier
*/
@@ -220,7 +220,7 @@
}
/**
- * Set effective built-in type.
+ * Sets effective built-in type.
*
* @param effectiveBuiltInType effective built-in type
*/
@@ -238,7 +238,7 @@
}
/**
- * Set effective pattern restriction.
+ * Sets effective pattern restriction.
*
* @param effectivePatternRestriction effective pattern restriction
*/
@@ -257,7 +257,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -268,7 +268,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java b/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
index 8cd80c3..7b0204c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangTypeDef.java
@@ -49,7 +49,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG typedef.
+ * Represents data model node to maintain information defined in YANG typedef.
*/
public class YangTypeDef extends YangNode implements YangCommonInfo, Parsable {
@@ -90,7 +90,7 @@
private String units;
/**
- * Create a typedef node.
+ * Creates a typedef node.
*/
public YangTypeDef() {
super(YangNodeType.TYPEDEF_NODE);
@@ -106,7 +106,7 @@
}
/**
- * Set the default value.
+ * Sets the default value.
*
* @param defaultValueInString the default value
*/
@@ -125,7 +125,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -145,7 +145,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -165,7 +165,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -184,7 +184,7 @@
}
/**
- * Set the data type.
+ * Sets the data type.
*
* @param dataType the data type
*/
@@ -202,7 +202,7 @@
}
/**
- * Set the unit.
+ * Sets the unit.
*
* @param units the units to set
*/
@@ -221,7 +221,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -231,7 +231,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -251,7 +251,7 @@
}
/**
- * Set YANG name of the typedef.
+ * Sets YANG name of the typedef.
*
* @param name YANG name of the typedef
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangUnion.java b/src/main/java/org/onosproject/yangutils/datamodel/YangUnion.java
index f280bde..5170871 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangUnion.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangUnion.java
@@ -16,13 +16,13 @@
package org.onosproject.yangutils.datamodel;
+import java.util.LinkedList;
+import java.util.List;
+
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.utils.YangConstructType;
-import java.util.LinkedList;
-import java.util.List;
-
/*
* Reference RFC 6020.
*
@@ -46,7 +46,7 @@
*/
/**
- * Data model node to maintain information defined in YANG union.
+ * Represents data model node to maintain information defined in YANG union.
*/
public class YangUnion implements Parsable {
@@ -57,7 +57,7 @@
private String unionName;
/**
- * Create a YANG union node.
+ * Creates a YANG union node.
*/
public YangUnion() {
typeList = new LinkedList<>();
@@ -82,7 +82,7 @@
}
/**
- * Set the list of YANG type.
+ * Sets the list of YANG type.
*
* @param typeList list of YANG type.
*/
@@ -91,7 +91,7 @@
}
/**
- * Add YANG type to type list.
+ * Adds YANG type to type list.
*
* @param yangType YANG type to be added to list
* @throws DataModelException union member type must not be one of the
@@ -106,7 +106,7 @@
}
/**
- * Set the union name.
+ * Sets the union name.
*
* @param unionName name of the union.
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java b/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
index 7d0e7ea..c4025b6 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangUses.java
@@ -49,8 +49,7 @@
* +--------------+---------+-------------+------------------+
*/
/**
- * Data model node to maintain information defined in YANG uses.
- *
+ * Represents data model node to maintain information defined in YANG uses.
*/
public class YangUses extends YangNode implements YangCommonInfo, Parsable, Resolvable {
@@ -88,7 +87,7 @@
private ResolvableStatus resolvableStatus;
/**
- * Create an YANG uses node.
+ * Creates an YANG uses node.
*/
public YangUses() {
super(YangNodeType.USES_NODE);
@@ -106,7 +105,7 @@
}
/**
- * Set the referred group.
+ * Sets the referred group.
*
* @param refGroup the referred group
*/
@@ -125,7 +124,7 @@
}
/**
- * Set the description.
+ * Sets the description.
*
* @param description set the description
*/
@@ -145,7 +144,7 @@
}
/**
- * Set the textual reference.
+ * Sets the textual reference.
*
* @param reference the reference to set
*/
@@ -165,7 +164,7 @@
}
/**
- * Set the status.
+ * Sets the status.
*
* @param status the status to set
*/
@@ -185,7 +184,7 @@
}
/**
- * Validate the data on entering the corresponding parse tree node.
+ * Validates the data on entering the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -195,7 +194,7 @@
}
/**
- * Validate the data on exiting the corresponding parse tree node.
+ * Validates the data on exiting the corresponding parse tree node.
*
* @throws DataModelException a violation of data model rules
*/
@@ -224,7 +223,7 @@
}
/**
- * Set node identifier.
+ * Sets node identifier.
*
* @param nodeIdentifier the node identifier
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java b/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
index 79f6764..b1375a7 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/exceptions/DataModelException.java
@@ -16,7 +16,7 @@
package org.onosproject.yangutils.datamodel.exceptions;
/**
- * Base class for exceptions in data model operations.
+ * Represents base class for exceptions in data model operations.
*/
public class DataModelException extends Exception {
@@ -25,7 +25,7 @@
private int charPositionInLine;
/**
- * Constructor to create a data model exception with message.
+ * Creates a data model exception with message.
*
* @param message the detail of exception in string
*/
@@ -34,7 +34,7 @@
}
/**
- * Constructor to create exception from message and cause.
+ * Creates exception from message and cause.
*
* @param message the detail of exception in string
* @param cause underlying cause of the error
@@ -44,7 +44,7 @@
}
/**
- * Constructor to create exception from cause.
+ * Creates exception from cause.
*
* @param cause underlying cause of the error
*/
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java b/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
index 9c3e5ec..76e8f36 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/utils/DataModelUtils.java
@@ -17,6 +17,7 @@
package org.onosproject.yangutils.datamodel.utils;
import java.util.List;
+
import org.onosproject.yangutils.datamodel.CollisionDetector;
import org.onosproject.yangutils.datamodel.HasResolutionInfo;
import org.onosproject.yangutils.datamodel.YangLeaf;
@@ -28,7 +29,7 @@
import org.onosproject.yangutils.utils.YangConstructType;
/**
- * Utilities for data model tree.
+ * Represents utilities for data model tree.
*/
public final class DataModelUtils {
@@ -49,6 +50,7 @@
*/
public static void detectCollidingChildUtil(String identifierName, YangConstructType dataType, YangNode node)
throws DataModelException {
+
if (dataType == YangConstructType.LEAF_DATA) {
YangLeavesHolder leavesHolder = (YangLeavesHolder) node;
if (leavesHolder.getListOfLeaf() != null) {
@@ -78,8 +80,9 @@
* checked
* @throws DataModelException a violation of data model rules
*/
- private static void detectCollidingLeaf(YangLeavesHolder leavesHolder, String identifierName) throws
- DataModelException {
+ private static void detectCollidingLeaf(YangLeavesHolder leavesHolder, String identifierName)
+ throws DataModelException {
+
for (YangLeaf leaf : leavesHolder.getListOfLeaf()) {
if (leaf.getLeafName().equals(identifierName)) {
throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf \""
@@ -96,8 +99,9 @@
* checked
* @throws DataModelException a violation of data model rules
*/
- private static void detectCollidingLeafList(YangLeavesHolder leavesHolder, String identifierName) throws
- DataModelException {
+ private static void detectCollidingLeafList(YangLeavesHolder leavesHolder, String identifierName)
+ throws DataModelException {
+
for (YangLeafList leafList : leavesHolder.getListOfLeafList()) {
if (leafList.getLeafName().equals(identifierName)) {
throw new DataModelException("YANG file error: Duplicate input identifier detected, same as leaf " +
@@ -114,6 +118,7 @@
* @throws DataModelException a violation of data model rules
*/
public static void addResolutionInfo(YangResolutionInfo resolutionInfo) throws DataModelException {
+
/* get the module node to add maintain the list of nested reference */
YangNode curNode = resolutionInfo.getHolderOfEntityToResolve();
while (!(curNode instanceof HasResolutionInfo)) {
@@ -134,8 +139,9 @@
* @throws DataModelException a violation of data model rules
*/
public static void resolveLinkingForResolutionList(List<YangResolutionInfo> resolutionList,
- HasResolutionInfo resolutionInfoNode)
+ HasResolutionInfo resolutionInfoNode)
throws DataModelException {
+
for (YangResolutionInfo resolutionInfo : resolutionList) {
if (resolutionInfo.getPrefix() == null ||
resolutionInfo.getPrefix().equals(resolutionInfoNode.getPrefix())) {
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/utils/GeneratedLanguage.java b/src/main/java/org/onosproject/yangutils/datamodel/utils/GeneratedLanguage.java
index 96fcbc0..e2471cd 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/utils/GeneratedLanguage.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/utils/GeneratedLanguage.java
@@ -16,7 +16,7 @@
package org.onosproject.yangutils.datamodel.utils;
/**
- * The target language in which the YANG information is modeled.
+ * Represents the target language in which the YANG information is modeled.
*/
public enum GeneratedLanguage {
/**
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/utils/YangDataModelFactory.java b/src/main/java/org/onosproject/yangutils/datamodel/utils/YangDataModelFactory.java
index 2f24bf3..6edd6a6 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/utils/YangDataModelFactory.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/utils/YangDataModelFactory.java
@@ -46,12 +46,12 @@
import org.onosproject.yangutils.translator.exception.TranslatorException;
/**
- * Factory to create data model objects based on the target file type.
+ *Represents factory to create data model objects based on the target file type.
*/
public final class YangDataModelFactory {
/**
- * Utility class, hence private to prevent creating objects.
+ * Creates a YANG data model factory object.
*/
private YangDataModelFactory() {
}
@@ -75,7 +75,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -93,7 +93,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -111,7 +111,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -129,7 +129,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -147,7 +147,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -165,7 +165,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -183,7 +183,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -201,7 +201,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -219,7 +219,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -237,7 +237,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -255,7 +255,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -273,7 +273,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
@@ -291,7 +291,7 @@
}
/**
- * Based on the target language generate the inherited data model node.
+ * Returns based on the target language generate the inherited data model node.
*
* @param targetLanguage target language in which YANG mapping needs to be
* generated
diff --git a/src/main/java/org/onosproject/yangutils/parser/Parsable.java b/src/main/java/org/onosproject/yangutils/parser/Parsable.java
index 056d56a..05754a1 100644
--- a/src/main/java/org/onosproject/yangutils/parser/Parsable.java
+++ b/src/main/java/org/onosproject/yangutils/parser/Parsable.java
@@ -25,14 +25,14 @@
public interface Parsable {
/**
- * Get the type of YANG construct data.
+ * Returns the type of YANG construct data.
*
* @return the type of YANG construct data.
*/
YangConstructType getYangConstructType();
/**
- * Check if the node is valid as per YANG grammar's syntax and semantics.
+ * Checks if the node is valid as per YANG grammar's syntax and semantics.
* This validation will be performed on entering the node in traversal
*
* @throws DataModelException if there is any violation of the YANG rules
@@ -41,7 +41,7 @@
void validateDataOnEntry() throws DataModelException;
/**
- * Check if the node is valid as per YANG grammar's syntax and semantics.
+ * Checks if the node is valid as per YANG grammar's syntax and semantics.
* This validation will be performed on exiting the node in traversal
*
* @throws DataModelException if there is any violation of the YANG rules
diff --git a/src/main/java/org/onosproject/yangutils/parser/YangUtilsParser.java b/src/main/java/org/onosproject/yangutils/parser/YangUtilsParser.java
index 46e1649..ba119f6 100644
--- a/src/main/java/org/onosproject/yangutils/parser/YangUtilsParser.java
+++ b/src/main/java/org/onosproject/yangutils/parser/YangUtilsParser.java
@@ -16,18 +16,18 @@
package org.onosproject.yangutils.parser;
+import java.io.IOException;
+
import org.onosproject.yangutils.datamodel.YangNode;
import org.onosproject.yangutils.parser.exceptions.ParserException;
-import java.io.IOException;
-
/**
* Abstraction of entity which provides parser service of YANG files for yangutils-maven-plugin.
*/
public interface YangUtilsParser {
/**
- * It is an entry function to initiate the YANG file parsing.
+ * Returns the data model node. It is an entry function to initiate the YANG file parsing.
*
* @param file input YANG file
* @return YangNode root node of the data model tree
diff --git a/src/main/java/org/onosproject/yangutils/parser/antlrgencode/GeneratedYangListener.java b/src/main/java/org/onosproject/yangutils/parser/antlrgencode/GeneratedYangListener.java
index 7f1c7f9..8304c8e 100644
--- a/src/main/java/org/onosproject/yangutils/parser/antlrgencode/GeneratedYangListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/antlrgencode/GeneratedYangListener.java
@@ -22,9 +22,10 @@
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
- * ANTLR interfaces to be implemented by listener to traverse the parse tree.
+ * Represents ANTLR interfaces to be implemented by listener to traverse the parse tree.
*/
public interface GeneratedYangListener extends ParseTreeListener {
+
/**
* Enter a parse tree produced by GeneratedYangParser for grammar rule
* yangfile.
diff --git a/src/main/java/org/onosproject/yangutils/parser/exceptions/ParserException.java b/src/main/java/org/onosproject/yangutils/parser/exceptions/ParserException.java
index b21e912..6a18b54 100644
--- a/src/main/java/org/onosproject/yangutils/parser/exceptions/ParserException.java
+++ b/src/main/java/org/onosproject/yangutils/parser/exceptions/ParserException.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.parser.exceptions;
/**
- * Base class for exceptions in parser operations.
+ * Represents base class for exceptions in parser operations.
*/
public class ParserException extends RuntimeException {
@@ -27,7 +27,7 @@
private String fileName;
/**
- * Create a new parser exception.
+ * Creates a new parser exception.
*/
public ParserException() {
super();
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
index b6ab595..d315d9b 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/TreeWalkListener.java
@@ -75,7 +75,7 @@
import org.onosproject.yangutils.parser.impl.listeners.VersionListener;
/**
- * ANTLR generates a parse-tree listener interface that responds to events
+ * Represents ANTLR generates parse-tree. ANTLR generates a parse-tree listener interface that responds to events
* triggered by the built-in tree walker. The methods in listener are just
* callbacks. This class implements listener interface and generates the
* corresponding data model tree.
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/YangUtilsParserManager.java b/src/main/java/org/onosproject/yangutils/parser/impl/YangUtilsParserManager.java
index d17cb4e..a1fffb8 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/YangUtilsParserManager.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/YangUtilsParserManager.java
@@ -31,7 +31,7 @@
import org.onosproject.yangutils.parser.impl.parserutils.ParseTreeErrorListener;
/**
- * Manages file parsing, parse tree creation and data model tree creation
+ * Represents file parsing, parse tree creation and data model tree creation
* corresponding to an input YANG file.
*/
public class YangUtilsParserManager implements YangUtilsParser {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseFileListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseFileListener.java
index b590f57..7b41b77 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseFileListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BaseFileListener.java
@@ -22,6 +22,7 @@
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
@@ -41,7 +42,7 @@
*/
/**
- * Implements call back function corresponding to the "base rule" defined in
+ * Representation of call back function corresponding to the "base rule" defined in
* ANTLR grammar file.
*/
public final class BaseFileListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BelongsToListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BelongsToListener.java
index cf840ef..ff25f00 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BelongsToListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BelongsToListener.java
@@ -57,7 +57,7 @@
*/
/**
- * Implements listener based call back function corresponding to the
+ * Represents listener based call back function corresponding to the
* "belongs to" rule defined in ANTLR grammar file for corresponding ABNF rule
* in RFC 6020.
*/
@@ -116,16 +116,16 @@
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.setBelongsTo((YangBelongsTo) tmpBelongstoNode);
- subModule.setPrefix(subModule.getBelongsTo().getPrefix());
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA,
- ctx.identifier().getText(),
- EXIT));
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.setBelongsTo((YangBelongsTo) tmpBelongstoNode);
+ subModule.setPrefix(subModule.getBelongsTo().getPrefix());
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, BELONGS_TO_DATA,
+ ctx.identifier().getText(),
+ EXIT));
}
} else {
throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, BELONGS_TO_DATA,
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitListener.java
index 7f0a3c3..ddd08f3 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitListener.java
@@ -82,7 +82,7 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
/**
- * Implements listener based call back function corresponding to the "bit"
+ * Represents listener based call back function corresponding to the "bit"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class BitListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitsListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitsListener.java
index cc816d1..0501806 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitsListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/BitsListener.java
@@ -61,7 +61,7 @@
import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA;
/**
- * Implements listener based call back function corresponding to the "bits" rule
+ * Represents listener based call back function corresponding to the "bits" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class BitsListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/CaseListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/CaseListener.java
index b059c46..d91bf25 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/CaseListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/CaseListener.java
@@ -67,7 +67,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "case" rule
+ * Represents listener based call back function corresponding to the "case" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class CaseListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ChoiceListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ChoiceListener.java
index a7cadc6..ac14a1c 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ChoiceListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ChoiceListener.java
@@ -86,7 +86,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "choice"
+ * Represents listener based call back function corresponding to the "choice"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ChoiceListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ConfigListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ConfigListener.java
index 792f1cc..b8ab6a1 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ConfigListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ConfigListener.java
@@ -49,7 +49,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "config"
+ * Represents listener based call back function corresponding to the "config"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ConfigListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContactListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContactListener.java
index 933ccc9..069708d 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContactListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContactListener.java
@@ -23,12 +23,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.CONTACT_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.CONTACT_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -71,7 +71,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "contact"
+ * Represents listener based call back function corresponding to the "contact"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ContactListener {
@@ -97,19 +97,19 @@
// Obtain the node of the stack.
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.setContact(ctx.string().getText());
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.setContact(ctx.string().getText());
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA,
- ctx.string().getText(), ENTRY));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.setContact(ctx.string().getText());
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.setContact(ctx.string().getText());
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, CONTACT_DATA,
+ ctx.string().getText(), ENTRY));
}
}
}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListener.java
index 0a12685..f7dbf8c 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ContainerListener.java
@@ -16,15 +16,15 @@
package org.onosproject.yangutils.parser.impl.listeners;
+import org.onosproject.yangutils.datamodel.YangAugment;
import org.onosproject.yangutils.datamodel.YangCase;
import org.onosproject.yangutils.datamodel.YangContainer;
+import org.onosproject.yangutils.datamodel.YangInput;
import org.onosproject.yangutils.datamodel.YangList;
import org.onosproject.yangutils.datamodel.YangModule;
import org.onosproject.yangutils.datamodel.YangNode;
import org.onosproject.yangutils.datamodel.YangNotification;
-import org.onosproject.yangutils.datamodel.YangInput;
import org.onosproject.yangutils.datamodel.YangOutput;
-import org.onosproject.yangutils.datamodel.YangAugment;
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
@@ -83,7 +83,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "container"
+ * Represents listener based call back function corresponding to the "container"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ContainerListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DefaultListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DefaultListener.java
index ed7c6f3..fc9b84a 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DefaultListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DefaultListener.java
@@ -45,7 +45,6 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
@@ -54,7 +53,7 @@
import static org.onosproject.yangutils.utils.YangConstructType.DEFAULT_DATA;
/**
- * Listener implementation for default YANG statement.
+ * Represents listener for default YANG statement.
*/
public final class DefaultListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DescriptionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DescriptionListener.java
index b735b79..32bd3aa 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DescriptionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/DescriptionListener.java
@@ -22,12 +22,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -40,7 +40,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "description"
+ * Represents listener based call back function corresponding to the "description"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class DescriptionListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java
index 4948666..103a7ee 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumListener.java
@@ -64,10 +64,10 @@
import org.onosproject.yangutils.datamodel.YangEnumeration;
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
-import static org.onosproject.yangutils.utils.YangConstructType.ENUM_DATA;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
@@ -77,9 +77,10 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.ENUM_DATA;
/**
- * Implements listener based call back function corresponding to the "enum" rule
+ * Represents listener based call back function corresponding to the "enum" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class EnumListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java
index 2ce05c4..9bca04d 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/EnumerationListener.java
@@ -62,7 +62,7 @@
import static org.onosproject.yangutils.utils.YangConstructType.TYPE_DATA;
/**
- * Implements listener based call back function corresponding to the
+ * Represents listener based call back function corresponding to the
* "enumeration" rule defined in ANTLR grammar file for corresponding ABNF rule
* in RFC 6020.
*/
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/GroupingListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/GroupingListener.java
index 707dfeb..c81e554 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/GroupingListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/GroupingListener.java
@@ -53,7 +53,6 @@
import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA;
-
/*
* Reference: RFC6020 and YANG ANTLR Grammar
*
@@ -77,7 +76,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "grouping"
+ * Represents listener based call back function corresponding to the "grouping"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class GroupingListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ImportListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ImportListener.java
index 15e7805..03938b1 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ImportListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ImportListener.java
@@ -24,13 +24,13 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
import static org.onosproject.yangutils.utils.YangConstructType.IMPORT_DATA;
@@ -57,7 +57,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "import"
+ * Represents listener based call back function corresponding to the "import"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ImportListener {
@@ -111,20 +111,20 @@
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.addToImportList((YangImport) tmpImportNode);
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.addToImportList((YangImport) tmpImportNode);
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA,
- ctx.identifier().getText(),
- EXIT));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.addToImportList((YangImport) tmpImportNode);
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.addToImportList((YangImport) tmpImportNode);
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, IMPORT_DATA,
+ ctx.identifier().getText(),
+ EXIT));
}
} else {
throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, IMPORT_DATA,
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IncludeListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IncludeListener.java
index 0d9f7cc..721b9fe 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IncludeListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/IncludeListener.java
@@ -56,7 +56,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "include"
+ * Represents listener based call back function corresponding to the "include"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class IncludeListener {
@@ -110,20 +110,20 @@
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.addToIncludeList((YangInclude) tmpIncludeNode);
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.addToIncludeList((YangInclude) tmpIncludeNode);
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA,
- ctx.identifier().getText(),
- EXIT));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.addToIncludeList((YangInclude) tmpIncludeNode);
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.addToIncludeList((YangInclude) tmpIncludeNode);
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, INCLUDE_DATA,
+ ctx.identifier().getText(),
+ EXIT));
}
} else {
throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, INCLUDE_DATA,
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/InputListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/InputListener.java
index b4ce827..66233fc 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/InputListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/InputListener.java
@@ -60,7 +60,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "input"
+ * Represents listener based call back function corresponding to the "input"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class InputListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/KeyListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/KeyListener.java
index a3ce22c..81223fd 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/KeyListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/KeyListener.java
@@ -23,15 +23,15 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.KEY_DATA;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.KEY_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -45,7 +45,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "key"
+ * Represesnts listener based call back function corresponding to the "key"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class KeyListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListListener.java
index 675c4ab..6b5afe3 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListListener.java
@@ -23,7 +23,6 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
@@ -31,6 +30,7 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne;
@@ -72,7 +72,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "leaf-list"
+ * Represents listener based call back function corresponding to the "leaf-list"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class LeafListListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListener.java
index 3927236..738ffa9 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/LeafListener.java
@@ -27,7 +27,6 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerCollisionDetector.detectCollidingChildUtil;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
@@ -35,6 +34,7 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityEqualsOne;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne;
@@ -74,7 +74,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "leaf" rule
+ * Represents listener based call back function corresponding to the "leaf" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class LeafListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ListListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ListListener.java
index 6d3036e..a6c5496 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ListListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ListListener.java
@@ -16,15 +16,15 @@
package org.onosproject.yangutils.parser.impl.listeners;
+import org.onosproject.yangutils.datamodel.YangAugment;
import org.onosproject.yangutils.datamodel.YangCase;
import org.onosproject.yangutils.datamodel.YangContainer;
+import org.onosproject.yangutils.datamodel.YangInput;
import org.onosproject.yangutils.datamodel.YangList;
import org.onosproject.yangutils.datamodel.YangModule;
import org.onosproject.yangutils.datamodel.YangNode;
import org.onosproject.yangutils.datamodel.YangNotification;
-import org.onosproject.yangutils.datamodel.YangInput;
import org.onosproject.yangutils.datamodel.YangOutput;
-import org.onosproject.yangutils.datamodel.YangAugment;
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
@@ -89,7 +89,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "list" rule
+ * Represents listener based call back function corresponding to the "list" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ListListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MandatoryListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MandatoryListener.java
index 610cb66..1363091 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MandatoryListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MandatoryListener.java
@@ -22,13 +22,13 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidBooleanValue;
-import static org.onosproject.yangutils.utils.YangConstructType.MANDATORY_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidBooleanValue;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.MANDATORY_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -48,7 +48,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "mandatory"
+ * Represents listener based call back function corresponding to the "mandatory"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class MandatoryListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MaxElementsListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MaxElementsListener.java
index ea8e83d..efec3d1 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MaxElementsListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MaxElementsListener.java
@@ -47,7 +47,7 @@
*/
/**
- * Implements listener based call back function corresponding to the
+ * Represents listener based call back function corresponding to the
* "max-elements" rule defined in ANTLR grammar file for corresponding ABNF rule
* in RFC 6020.
*/
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MinElementsListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MinElementsListener.java
index 634862b..c037106 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MinElementsListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/MinElementsListener.java
@@ -23,13 +23,13 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNonNegativeIntegerValue;
-import static org.onosproject.yangutils.utils.YangConstructType.MIN_ELEMENT_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidNonNegativeIntegerValue;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.MIN_ELEMENT_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -47,7 +47,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "min-elements"
+ * Represents listener based call back function corresponding to the "min-elements"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class MinElementsListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
index 44332cb..2cb6187 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ModuleListener.java
@@ -57,7 +57,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "module"
+ * Represents listener based call back function corresponding to the "module"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ModuleListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NamespaceListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NamespaceListener.java
index 1c018da..8278137 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NamespaceListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NamespaceListener.java
@@ -55,7 +55,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "namespace"
+ * Represents listener based call back function corresponding to the "namespace"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class NamespaceListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NotificationListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NotificationListener.java
index 729422c..58daefb 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NotificationListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/NotificationListener.java
@@ -16,10 +16,10 @@
package org.onosproject.yangutils.parser.impl.listeners;
-import org.onosproject.yangutils.datamodel.YangNotification;
import org.onosproject.yangutils.datamodel.YangModule;
-import org.onosproject.yangutils.datamodel.YangSubModule;
import org.onosproject.yangutils.datamodel.YangNode;
+import org.onosproject.yangutils.datamodel.YangNotification;
+import org.onosproject.yangutils.datamodel.YangSubModule;
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
@@ -33,17 +33,20 @@
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructExtendedListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.*;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.UNHANDLED_PARSED_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateCardinalityMaxOne;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.validateMutuallyExclusiveChilds;
-import static org.onosproject.yangutils.utils.YangConstructType.NOTIFICATION_DATA;
-import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
import static org.onosproject.yangutils.utils.YangConstructType.DESCRIPTION_DATA;
-import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA;
-import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA;
import static org.onosproject.yangutils.utils.YangConstructType.GROUPING_DATA;
+import static org.onosproject.yangutils.utils.YangConstructType.NOTIFICATION_DATA;
+import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA;
+import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
+import static org.onosproject.yangutils.utils.YangConstructType.TYPEDEF_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -70,7 +73,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "notification"
+ * Represents listener based call back function corresponding to the "notification"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class NotificationListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OrganizationListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OrganizationListener.java
index 99d6157..19a1e64 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OrganizationListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OrganizationListener.java
@@ -23,12 +23,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.ORGANIZATION_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.ORGANIZATION_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -72,7 +72,7 @@
*/
/**
- * Implements listener based call back function corresponding to the
+ * Represents listener based call back function corresponding to the
* "organization" rule defined in ANTLR grammar file for corresponding ABNF rule
* in RFC 6020.
*/
@@ -101,19 +101,19 @@
// Obtain the node of the stack.
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.setOrganization(ctx.string().getText());
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.setOrganization(ctx.string().getText());
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, ORGANIZATION_DATA,
- ctx.string().getText(), ENTRY));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.setOrganization(ctx.string().getText());
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.setOrganization(ctx.string().getText());
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, ORGANIZATION_DATA,
+ ctx.string().getText(), ENTRY));
}
}
}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
index 069a09a..f0df739 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/OutputListener.java
@@ -57,7 +57,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "output"
+ * Represents listener based call back function corresponding to the "output"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class OutputListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PositionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PositionListener.java
index d754cb3..92c08ca 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PositionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PositionListener.java
@@ -50,7 +50,7 @@
import static org.onosproject.yangutils.utils.YangConstructType.POSITION_DATA;
/**
- * Implements listener based call back function corresponding to the "position"
+ * Represents listener based call back function corresponding to the "position"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class PositionListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PrefixListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PrefixListener.java
index 4a8f20a..90e278b 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PrefixListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PrefixListener.java
@@ -24,13 +24,13 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
-import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.getValidIdentifier;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.PREFIX_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -56,7 +56,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "prefix"
+ * Represents listener based call back function corresponding to the "prefix"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class PrefixListener {
@@ -84,24 +84,24 @@
// Obtain the node of the stack.
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.setPrefix(identifier);
- break;
- }
- case IMPORT_DATA: {
- YangImport importNode = (YangImport) tmpNode;
- importNode.setPrefixId(identifier);
- break;
- }
- case BELONGS_TO_DATA: {
- YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode;
- belongstoNode.setPrefix(identifier);
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA,
- ctx.identifier().getText(), ENTRY));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.setPrefix(identifier);
+ break;
+ }
+ case IMPORT_DATA: {
+ YangImport importNode = (YangImport) tmpNode;
+ importNode.setPrefixId(identifier);
+ break;
+ }
+ case BELONGS_TO_DATA: {
+ YangBelongsTo belongstoNode = (YangBelongsTo) tmpNode;
+ belongstoNode.setPrefix(identifier);
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, PREFIX_DATA,
+ ctx.identifier().getText(), ENTRY));
}
}
}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PresenceListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PresenceListener.java
index e0c272b..45b411b 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PresenceListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/PresenceListener.java
@@ -22,13 +22,13 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.PRESENCE_DATA;
-import static org.onosproject.yangutils.utils.YangConstructType.CONTAINER_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.CONTAINER_DATA;
+import static org.onosproject.yangutils.utils.YangConstructType.PRESENCE_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -41,7 +41,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "presence"
+ * Represents listener based call back function corresponding to the "presence"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class PresenceListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RangeRestrictionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RangeRestrictionListener.java
index 6563178..dfb9458 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RangeRestrictionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RangeRestrictionListener.java
@@ -59,7 +59,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "range"
+ * Represents listener based call back function corresponding to the "range"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class RangeRestrictionListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListener.java
index e8421bd..a90ab3c 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ReferenceListener.java
@@ -22,12 +22,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.REFERENCE_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -40,7 +40,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "reference"
+ * Represents listener based call back function corresponding to the "reference"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ReferenceListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionDateListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionDateListener.java
index ca1d588..72c5987 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionDateListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionDateListener.java
@@ -23,12 +23,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATE_DATA;
@@ -61,7 +61,7 @@
*/
/**
- * Implements listener based call back function corresponding to the
+ * Represents listener based call back function corresponding to the
* "revision date" rule defined in ANTLR grammar file for corresponding ABNF
* rule in RFC 6020.
*/
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionListener.java
index 27515c0..6573a43 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RevisionListener.java
@@ -24,16 +24,16 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
-import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_CURRENT_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.isDateValid;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.REVISION_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -64,7 +64,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "revision"
+ * Represents listener based call back function corresponding to the "revision"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class RevisionListener {
@@ -132,20 +132,20 @@
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.setRevision((YangRevision) tmpRevisionNode);
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.setRevision((YangRevision) tmpRevisionNode);
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA,
- ctx.dateArgumentString().getText(),
- EXIT));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.setRevision((YangRevision) tmpRevisionNode);
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.setRevision((YangRevision) tmpRevisionNode);
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, REVISION_DATA,
+ ctx.dateArgumentString().getText(),
+ EXIT));
}
} else {
throw new ParserException(constructListenerErrorMessage(MISSING_CURRENT_HOLDER, REVISION_DATA,
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RpcListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RpcListener.java
index e72323b..ae9e04c 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RpcListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/RpcListener.java
@@ -72,7 +72,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "rpc"
+ * Represents listener based call back function corresponding to the "rpc"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class RpcListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ShortCaseListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ShortCaseListener.java
index 6d2bd82..7744866 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ShortCaseListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ShortCaseListener.java
@@ -57,7 +57,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "short
+ * Represents listener based call back function corresponding to the "short
* case" rule defined in ANTLR grammar file for corresponding ABNF rule in RFC
* 6020.
*/
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/StatusListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/StatusListener.java
index 0a3e3e5..b91003b 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/StatusListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/StatusListener.java
@@ -23,14 +23,14 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
-import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_CONTENT;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerUtil.removeQuotesAndHandleConcat;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.STATUS_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -48,7 +48,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "status"
+ * Represents listener based call back function corresponding to the "status"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class StatusListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
index bcece84..d20f90a 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/SubModuleListener.java
@@ -58,7 +58,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "submodule"
+ * Represents listener based call back function corresponding to the "submodule"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class SubModuleListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeDefListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeDefListener.java
index 8b9d772..bfa22a4 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeDefListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeDefListener.java
@@ -87,7 +87,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "typedef"
+ * Represents listener based call back function corresponding to the "typedef"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class TypeDefListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
index fee102f..c953be5 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/TypeListener.java
@@ -62,7 +62,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "type" rule
+ * Represents listener based call back function corresponding to the "type" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class TypeListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnionListener.java
index fa94f80..79ce0b9 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnionListener.java
@@ -60,10 +60,11 @@
import static org.onosproject.yangutils.utils.YangConstructType.UNION_DATA;
/**
- * Implements listener based call back function corresponding to the "union" rule
+ * Represents listener based call back function corresponding to the "union" rule
* defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class UnionListener {
+
/**
* Creates a new union listener.
*/
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnitsListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnitsListener.java
index bc99843..c284fc2 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnitsListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UnitsListener.java
@@ -23,12 +23,12 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.UNITS_DATA;
/*
* Reference: RFC6020 and YANG ANTLR Grammar
@@ -41,7 +41,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "units"
+ * Represents listener based call back function corresponding to the "units"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class UnitsListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UsesListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UsesListener.java
index d537fb8..4e2925a 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UsesListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/UsesListener.java
@@ -90,7 +90,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "uses"
+ * Represents listener based call back function corresponding to the "uses"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class UsesListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java
index ec5482d..92a0d42 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/ValueListener.java
@@ -29,18 +29,19 @@
import org.onosproject.yangutils.datamodel.YangEnum;
import org.onosproject.yangutils.datamodel.YangEnumeration;
import org.onosproject.yangutils.parser.Parsable;
-import static org.onosproject.yangutils.utils.YangConstructType.VALUE_DATA;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.ENTRY;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.MISSING_HOLDER;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerValidation.checkStackIsNotEmpty;
+import static org.onosproject.yangutils.utils.YangConstructType.VALUE_DATA;
/**
- * Implements listener based call back function corresponding to the "value"
+ * Represents listener based call back function corresponding to the "value"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class ValueListener {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/VersionListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/VersionListener.java
index 35b2917..62dfb70 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/listeners/VersionListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/listeners/VersionListener.java
@@ -65,7 +65,7 @@
*/
/**
- * Implements listener based call back function corresponding to the "version"
+ * Represents listener based call back function corresponding to the "version"
* rule defined in ANTLR grammar file for corresponding ABNF rule in RFC 6020.
*/
public final class VersionListener {
@@ -94,19 +94,19 @@
// Obtain the node of the stack.
Parsable tmpNode = listener.getParsedDataStack().peek();
switch (tmpNode.getYangConstructType()) {
- case MODULE_DATA: {
- YangModule module = (YangModule) tmpNode;
- module.setVersion(version);
- break;
- }
- case SUB_MODULE_DATA: {
- YangSubModule subModule = (YangSubModule) tmpNode;
- subModule.setVersion(version);
- break;
- }
- default:
- throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA,
- ctx.version().getText(), ENTRY));
+ case MODULE_DATA: {
+ YangModule module = (YangModule) tmpNode;
+ module.setVersion(version);
+ break;
+ }
+ case SUB_MODULE_DATA: {
+ YangSubModule subModule = (YangSubModule) tmpNode;
+ subModule.setVersion(version);
+ break;
+ }
+ default:
+ throw new ParserException(constructListenerErrorMessage(INVALID_HOLDER, VERSION_DATA,
+ ctx.version().getText(), ENTRY));
}
}
}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerCollisionDetector.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerCollisionDetector.java
index 1e2d225..98b3429 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerCollisionDetector.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerCollisionDetector.java
@@ -20,13 +20,14 @@
import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
+import org.onosproject.yangutils.utils.YangConstructType;
+
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.EXIT;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.INVALID_HOLDER;
-import org.onosproject.yangutils.utils.YangConstructType;
/**
- * Check the YANG construct collision in a YANG file.
+ * Represents the detector of YANG construct collision in a YANG file.
*/
public final class ListenerCollisionDetector {
@@ -52,7 +53,7 @@
*/
public static void detectCollidingChildUtil(TreeWalkListener listener, int line, int charPosition,
String identifierName, YangConstructType constructType)
- throws ParserException {
+ throws ParserException {
if (listener.getParsedDataStack().peek() instanceof CollisionDetector) {
try {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorLocation.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorLocation.java
index 1c29fa6..c1c2888 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorLocation.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorLocation.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.parser.impl.parserutils;
/**
- * Maintains listener error location.
+ * Represents listener error location.
*/
public enum ListenerErrorLocation {
/**
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorMessageConstruction.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorMessageConstruction.java
index 7064e3b..141e3dc 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorMessageConstruction.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorMessageConstruction.java
@@ -18,17 +18,17 @@
import org.onosproject.yangutils.utils.YangConstructType;
-import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorLocation.getErrorLocationMessage;
import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorType.getErrorType;
+import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType;
/**
- * It's a utility to help construct detailed error message.
+ * Represents a utility to help construct detailed error message.
*/
public final class ListenerErrorMessageConstruction {
/**
- * Private constructor.
+ * Creates a object of listen error message.
*/
private ListenerErrorMessageConstruction() {
}
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
index 6b520d9..f1cb284 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerErrorType.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.parser.impl.parserutils;
/**
- * Maintains listener error type.
+ * Represents listener error type.
*/
public enum ListenerErrorType {
/**
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
index fd81898..ffb50e9 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerUtil.java
@@ -26,13 +26,14 @@
import org.antlr.v4.runtime.ParserRuleContext;
import org.onosproject.yangutils.datamodel.YangNodeIdentifier;
import org.onosproject.yangutils.parser.antlrgencode.GeneratedYangParser;
-import org.onosproject.yangutils.utils.YangConstructType;
import org.onosproject.yangutils.parser.exceptions.ParserException;
+import org.onosproject.yangutils.utils.YangConstructType;
/**
- * It's a utility for listener.
+ * Represents an utility for listener.
*/
public final class ListenerUtil {
+
private static final Pattern IDENTIFIER_PATTERN = Pattern.compile("[a-zA-Z_][a-zA-Z0-9_.-]*");
private static final String NON_NEGATIVE_INTEGER_PATTERN = "[0-9]+";
private static final String PLUS = "+";
@@ -154,7 +155,7 @@
* @return valid non negative integer value
*/
public static int getValidNonNegativeIntegerValue(String integerValue, YangConstructType yangConstruct,
- ParserRuleContext ctx) {
+ ParserRuleContext ctx) {
String value = removeQuotesAndHandleConcat(integerValue);
if (!value.matches(NON_NEGATIVE_INTEGER_PATTERN)) {
@@ -178,7 +179,7 @@
* @return boolean value either true or false
*/
public static boolean getValidBooleanValue(String booleanValue, YangConstructType yangConstruct,
- ParserRuleContext ctx) {
+ ParserRuleContext ctx) {
String value = removeQuotesAndHandleConcat(booleanValue);
if (value.equals(TRUE_KEYWORD)) {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerValidation.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerValidation.java
index 26d3088..f2c0e7c 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerValidation.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ListenerValidation.java
@@ -16,6 +16,9 @@
package org.onosproject.yangutils.parser.impl.parserutils;
+import java.util.Iterator;
+import java.util.List;
+
import org.antlr.v4.runtime.ParserRuleContext;
import org.onosproject.yangutils.datamodel.YangContainer;
import org.onosproject.yangutils.datamodel.YangList;
@@ -23,15 +26,13 @@
import org.onosproject.yangutils.parser.Parsable;
import org.onosproject.yangutils.parser.exceptions.ParserException;
import org.onosproject.yangutils.parser.impl.TreeWalkListener;
-import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import org.onosproject.yangutils.utils.YangConstructType;
+
+import static org.onosproject.yangutils.parser.impl.parserutils.ListenerErrorMessageConstruction.constructListenerErrorMessage;
import static org.onosproject.yangutils.utils.YangConstructType.getYangConstructType;
-import java.util.Iterator;
-import java.util.List;
-
/**
- * It's a utility to carry out listener validation.
+ * Represents a utility to carry out listener validation.
*/
public final class ListenerValidation {
@@ -54,6 +55,7 @@
public static void checkStackIsNotEmpty(TreeWalkListener listener, ListenerErrorType errorType,
YangConstructType yangConstructType, String parsableDataTypeName,
ListenerErrorLocation errorLocation) {
+
if (listener.getParsedDataStack().empty()) {
/*
* If stack is empty it indicates error condition, value of
@@ -100,6 +102,7 @@
* @return true/false parent's config value
*/
public static boolean getParentNodeConfig(TreeWalkListener listener) {
+
YangNode parentNode;
Parsable curData = listener.getParsedDataStack().peek();
if (curData instanceof YangNode) {
@@ -125,7 +128,7 @@
* @throws ParserException exception if cardinality check fails
*/
public static void validateCardinalityMaxOne(List<?> childContext, YangConstructType yangChildConstruct,
- YangConstructType yangParentConstruct, String parentName)
+ YangConstructType yangParentConstruct, String parentName)
throws ParserException {
if (!childContext.isEmpty() && childContext.size() != 1) {
@@ -152,8 +155,8 @@
* @throws ParserException exception if cardinality check fails
*/
public static void validateCardinalityEqualsOne(List<?> childContext, YangConstructType yangChildConstruct,
- YangConstructType yangParentConstruct, String parentName,
- ParserRuleContext parentContext)
+ YangConstructType yangParentConstruct, String parentName,
+ ParserRuleContext parentContext)
throws ParserException {
if (childContext.isEmpty()) {
@@ -187,8 +190,8 @@
* @throws ParserException exception if cardinality check fails
*/
public static void validateCardinalityNonZero(List<?> childContext, YangConstructType yangChildConstruct,
- YangConstructType yangParentConstruct, String parentName,
- ParserRuleContext parentContext)
+ YangConstructType yangParentConstruct, String parentName,
+ ParserRuleContext parentContext)
throws ParserException {
if (childContext.isEmpty()) {
@@ -216,8 +219,8 @@
* @throws ParserException exception if cardinality check fails
*/
public static void validateMutuallyExclusiveChilds(List<?> child1Context, YangConstructType yangChild1Construct,
- List<?> child2Context, YangConstructType yangChild2Construct,
- YangConstructType yangParentConstruct, String parentName)
+ List<?> child2Context, YangConstructType yangChild2Construct,
+ YangConstructType yangParentConstruct, String parentName)
throws ParserException {
if (!child1Context.isEmpty() && !child2Context.isEmpty()) {
diff --git a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ParseTreeErrorListener.java b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ParseTreeErrorListener.java
index 89afb78..af81d6f 100644
--- a/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ParseTreeErrorListener.java
+++ b/src/main/java/org/onosproject/yangutils/parser/impl/parserutils/ParseTreeErrorListener.java
@@ -22,6 +22,7 @@
import org.onosproject.yangutils.parser.exceptions.ParserException;
/**
+ * Represent the parse tree error listener.
* By default, ANTLR sends all errors to standard error, this is changed by
* providing this new implementation of interface ANTLRErrorListener. The
* interface has a syntaxError() method that applies to both lexer and parser.
diff --git a/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java b/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
index b1b45ce..8895560 100644
--- a/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
+++ b/src/main/java/org/onosproject/yangutils/plugin/manager/YangUtilManager.java
@@ -49,7 +49,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getDirectory;
/**
- * ONOS YANG utility maven plugin.
+ * Represents ONOS YANG utility maven plugin.
* Goal of plugin is yang2java Execution phase in generate-sources requiresDependencyResolution at compile time.
*/
@Mojo(name = "yang2java", defaultPhase = GENERATE_SOURCES, requiresDependencyResolution = COMPILE,
diff --git a/src/main/java/org/onosproject/yangutils/translator/exception/TranslatorException.java b/src/main/java/org/onosproject/yangutils/translator/exception/TranslatorException.java
index 9484b1e..cf2c07d 100644
--- a/src/main/java/org/onosproject/yangutils/translator/exception/TranslatorException.java
+++ b/src/main/java/org/onosproject/yangutils/translator/exception/TranslatorException.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.translator.exception;
/**
- * Provides custom translator exception for translator's operations.
+ * Represents custom translator exception for translator's operations.
*/
public class TranslatorException extends RuntimeException {
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java b/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
index 67fe733..f23aec7 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedJavaFileType.java
@@ -17,12 +17,12 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Type of files generated.
+ * Represents type of java files generated.
*/
public final class GeneratedJavaFileType {
/**
- * prevent creating attributes.
+ * Creates an instance of generate java file type.
*/
private GeneratedJavaFileType() {
}
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedTempFileType.java b/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedTempFileType.java
index 22753af..537ba47 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedTempFileType.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/GeneratedTempFileType.java
@@ -17,12 +17,12 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Type of files generated.
+ * Represents type of temporary files generated.
*/
public final class GeneratedTempFileType {
/**
- * prevent creating attributes.
+ * Creates an instance of generated temp file type.
*/
private GeneratedTempFileType() {
}
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaFileInfo.java b/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaFileInfo.java
index 20dd63d..c73258e 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaFileInfo.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaFileInfo.java
@@ -16,19 +16,20 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Data model nodes which are required to generate java classes, need to support
+ * Represents data model nodes which are required to generate java classes, need to support
* java file info.
*/
public interface HasJavaFileInfo {
+
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
public JavaFileInfo getJavaFileInfo();
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaImportData.java b/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaImportData.java
index 2bc67f0..4ae28dd 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaImportData.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/HasJavaImportData.java
@@ -16,18 +16,19 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Maintains the information of the java import data.
+ * Represents the information of the java import data.
*/
public interface HasJavaImportData {
+
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
public JavaImportData getJavaImportData();
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/HasTempJavaCodeFragmentFiles.java b/src/main/java/org/onosproject/yangutils/translator/tojava/HasTempJavaCodeFragmentFiles.java
index 1e5b20d..9b67ccf 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/HasTempJavaCodeFragmentFiles.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/HasTempJavaCodeFragmentFiles.java
@@ -16,18 +16,19 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Has temporary file handle.
+ * Represents Has temporary file handle.
*/
public interface HasTempJavaCodeFragmentFiles {
+
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
TempJavaCodeFragmentFiles getTempJavaCodeFragmentFiles();
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaAttributeInfo.java b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaAttributeInfo.java
index 8e79dfe..63ebe07 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaAttributeInfo.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaAttributeInfo.java
@@ -27,7 +27,7 @@
import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getCamelCase;
/**
- * Maintains the attribute info corresponding to class/interface generated.
+ * Represents the attribute info corresponding to class/interface generated.
*/
public final class JavaAttributeInfo {
@@ -58,7 +58,7 @@
private JavaQualifiedTypeInfo importInfo;
/**
- * Default constructor.
+ * Creates a java attribute info object.
*/
private JavaAttributeInfo() {
}
@@ -79,7 +79,7 @@
}
/**
- * Get the data type info of attribute.
+ * Returns the data type info of attribute.
*
* @return the data type info of attribute
*/
@@ -92,7 +92,7 @@
}
/**
- * Set the data type info of attribute.
+ * Sets the data type info of attribute.
*
* @param type the data type info of attribute
*/
@@ -101,7 +101,7 @@
}
/**
- * Get name of the attribute.
+ * Returns name of the attribute.
*
* @return name of the attribute
*/
@@ -114,7 +114,7 @@
}
/**
- * Set name of the attribute.
+ * Sets name of the attribute.
*
* @param attrName name of the attribute
*/
@@ -123,7 +123,7 @@
}
/**
- * Get if the added attribute is a list of info.
+ * Returns if the added attribute is a list of info.
*
* @return the if the added attribute is a list of info
*/
@@ -132,7 +132,7 @@
}
/**
- * Set if the added attribute is a list of info.
+ * Sets if the added attribute is a list of info.
*
* @param isList if the added attribute is a list of info
*/
@@ -141,7 +141,7 @@
}
/**
- * Get if the added attribute has to be accessed in a fully qualified
+ * Returns if the added attribute has to be accessed in a fully qualified
* manner.
*
* @return the if the added attribute has to be accessed in a fully
@@ -152,7 +152,7 @@
}
/**
- * Set if the added attribute has to be accessed in a fully qualified
+ * Sets if the added attribute has to be accessed in a fully qualified
* manner.
*
* @param isQualified if the added attribute has to be accessed in a fully
@@ -163,7 +163,7 @@
}
/**
- * Get the import info for the attribute type. It will be null, of the type
+ * Returns the import info for the attribute type. It will be null, of the type
* is basic built-in java type.
*
* @return import info
@@ -173,7 +173,7 @@
}
/**
- * Set the import info for the attribute type.
+ * Sets the import info for the attribute type.
*
* @param importInfo import info for the attribute type
*/
@@ -182,7 +182,7 @@
}
/**
- * Create an attribute info object corresponding to the passed leaf
+ * Creates an attribute info object corresponding to the passed leaf
* information and return it.
*
* @param curNode current data model node for which the java file is being
@@ -208,7 +208,7 @@
}
/**
- * Create an attribute info object corresponding to a data model node and
+ * Creates an attribute info object corresponding to a data model node and
* return it.
*
* @param curNode current data model node for which the java code generation
@@ -234,7 +234,7 @@
}
/**
- * Create an attribute info object corresponding to the passed type def attribute
+ * Creates an attribute info object corresponding to the passed type def attribute
* information and return it.
*
* @param curNode current data model node for which the java file is being
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaCodeGeneratorUtil.java b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaCodeGeneratorUtil.java
index 3abf5d9..f0e700f 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaCodeGeneratorUtil.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaCodeGeneratorUtil.java
@@ -28,7 +28,7 @@
import static org.onosproject.yangutils.translator.tojava.TraversalType.SIBILING;
/**
- * Implementation of Java code generator based on application schema.
+ * Representation of Java code generator based on application schema.
*/
public final class JavaCodeGeneratorUtil {
@@ -38,7 +38,7 @@
private static YangNode curNode;
/**
- * Default constructor.
+ * Creates a java code generator util object.
*/
private JavaCodeGeneratorUtil() {
}
@@ -57,13 +57,12 @@
*
* @param node current YANG node
*/
-
public static void setCurNode(YangNode node) {
curNode = node;
}
/**
- * Generate Java code files corresponding to the YANG schema.
+ * Generates Java code files corresponding to the YANG schema.
*
* @param rootNode root node of the data model tree
* @param codeGenDir code generation directory
@@ -173,6 +172,7 @@
YangNode parent = node.getParent();
parent.setChild(null);
+
if (node.getNextSibling() != null) {
parent.setChild(node.getNextSibling());
} else if (node.getPreviousSibling() != null) {
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java
index 685cd0e..0b892f9 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaFileInfo.java
@@ -19,7 +19,7 @@
import org.onosproject.yangutils.translator.exception.TranslatorException;
/**
- * Cached java file handle, which supports the addition of member attributes and
+ * Represents cached java file handle, which supports the addition of member attributes and
* methods.
*/
public class JavaFileInfo {
@@ -51,7 +51,7 @@
private String codeGenDirFilePath;
/**
- * Get the types of files being generated corresponding to the YANG
+ * Returns the types of files being generated corresponding to the YANG
* definition.
*
* @return the types of files being generated corresponding to the YANG
@@ -62,7 +62,7 @@
}
/**
- * Set the types of files being generated corresponding to the YANG
+ * Sets the types of files being generated corresponding to the YANG
* definition.
*
* @param fileTypes the types of files being generated corresponding to the
@@ -73,7 +73,7 @@
}
/**
- * Get the java name of the node.
+ * Returns the java name of the node.
*
* @return the java name of node
*/
@@ -82,7 +82,7 @@
}
/**
- * Set the java name of the node.
+ * Sets the java name of the node.
*
* @param name the java name of node
*/
@@ -91,7 +91,7 @@
}
/**
- * Get the mapped java package.
+ * Returns the mapped java package.
*
* @return the java package
*/
@@ -104,7 +104,7 @@
}
/**
- * Set the node's package.
+ * Sets the node's package.
*
* @param nodePackage node's package
*/
@@ -122,7 +122,7 @@
}
/**
- * Gets directory package path for code generation.
+ * Returns directory package path for code generation.
*
* @return directory package path for code generation
*/
@@ -131,7 +131,7 @@
}
/**
- * Gets base directory package path for code generation.
+ * Returns base directory package path for code generation.
*
* @return directory package path for code generation
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
index 75fcf7f..469e416 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaImportData.java
@@ -37,7 +37,7 @@
import static org.onosproject.yangutils.utils.UtilConstants.SEMI_COLAN;
/**
- * Generated Java file can contain imports.
+ * Represents that generated Java file can contain imports.
*/
public class JavaImportData {
@@ -53,14 +53,14 @@
private SortedSet<JavaQualifiedTypeInfo> importSet;
/**
- * Default constructor.
+ * Creates java import data object.
*/
public JavaImportData() {
setImportSet(new TreeSet<JavaQualifiedTypeInfo>());
}
/**
- * Get if the list needs to be imported.
+ * Returns if the list needs to be imported.
*
* @return true if any of the attribute needs to be maintained as a list.
*/
@@ -69,7 +69,7 @@
}
/**
- * Set the status of importing list.
+ * Sets the status of importing list.
*
* @param isList status to mention list is bing imported.
*/
@@ -78,7 +78,7 @@
}
/**
- * Get the set containing the imported class/interface info.
+ * Returns the set containing the imported class/interface info.
*
* @return the set containing the imported class/interface info
*/
@@ -149,7 +149,7 @@
}
if (attr.isListAttr()) {
- imports.add(setImportForList());
+ imports.add(getImportForList());
}
java.util.Collections.sort(imports);
@@ -157,7 +157,7 @@
}
/**
- * Gets import for hash and equals method.
+ * Returns import for hash and equals method.
*
* @return import for hash and equals method
*/
@@ -166,7 +166,7 @@
}
/**
- * Gets import for to string method.
+ * Returns import for to string method.
*
* @return import for to string method
*/
@@ -175,9 +175,12 @@
}
/**
- * Sets import for the list attribute.
+ * Returns import for list attribute.
+ *
+ * @return import for for list attribute
*/
- private static String setImportForList() {
+
+ private static String getImportForList() {
return IMPORT + COLLECTION_IMPORTS + PERIOD + LIST + SEMI_COLAN + NEW_LINE;
}
}
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaQualifiedTypeInfo.java b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaQualifiedTypeInfo.java
index caa9860..e695b58 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/JavaQualifiedTypeInfo.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/JavaQualifiedTypeInfo.java
@@ -26,7 +26,7 @@
import com.google.common.base.MoreObjects;
/**
- * Maintains the information about individual imports in the generated file.
+ * Represents the information about individual imports in the generated file.
*/
public class JavaQualifiedTypeInfo implements Comparable<JavaQualifiedTypeInfo> {
@@ -41,13 +41,13 @@
private String classInfo;
/**
- * Default constructor.
+ * Creates a java qualified type info object.
*/
public JavaQualifiedTypeInfo() {
}
/**
- * Get the imported package info.
+ * Returns the imported package info.
*
* @return the imported package info
*/
@@ -56,7 +56,7 @@
}
/**
- * Set the imported package info.
+ * Sets the imported package info.
*
* @param pkgInfo the imported package info
*/
@@ -65,7 +65,7 @@
}
/**
- * Get the imported class/interface info.
+ * Returns the imported class/interface info.
*
* @return the imported class/interface info
*/
@@ -74,7 +74,7 @@
}
/**
- * Set the imported class/interface info.
+ * Sets the imported class/interface info.
*
* @param classInfo the imported class/interface info
*/
@@ -83,7 +83,7 @@
}
/**
- * Get the import info for an attribute, which needs to be used for code
+ * Returns the import info for an attribute, which needs to be used for code
* generation for import or for qualified access.
*
* @param curNode current data model node for which the java file is being
@@ -136,7 +136,7 @@
}
/**
- * Get the import info for an attribute, which needs to be used for code
+ * Returns the import info for an attribute, which needs to be used for code
* generation for import or for qualified access.
*
* @param curNode current data model node for which the java file is being
@@ -168,7 +168,7 @@
}
/**
- * Get if the attribute needs to be accessed in a qualified manner or not,
+ * Returns if the attribute needs to be accessed in a qualified manner or not,
* if it needs to be imported, then the same needs to be done.
*
* @param curNode current cache of the data model node for which java file
@@ -226,7 +226,7 @@
}
/**
- * Check if the import info is same as the package of the current generated
+ * Checks if the import info is same as the package of the current generated
* java file.
*
* @param curNode Java identifier of the current data model node
@@ -265,7 +265,7 @@
}
/**
- * check if the import info matches.
+ * checks if the import info matches.
*
* @param importInfo matched import
* @return if equal or not
@@ -284,7 +284,7 @@
}
/**
- * Check that there is no 2 objects with the same class name.
+ * Checks that there is no 2 objects with the same class name.
*
* @param other compared import info.
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
index 50362e5..25ed389 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaCodeFragmentFiles.java
@@ -95,7 +95,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.mergeJavaFiles;
/**
- * Provides implementation of java code fragments temporary implementations.
+ * Represents implementation of java code fragments temporary implementations.
*/
public class TempJavaCodeFragmentFiles {
@@ -292,7 +292,7 @@
private boolean isAttributePresent = false;
/**
- * Construct an object of temporary java code fragment.
+ * Creates an instance of temporary java code fragment.
*
* @param genFileType file generation type
* @param genDir file generation directory
@@ -913,7 +913,7 @@
}
/**
- * Parse attribute to get the attribute string.
+ * Parses attribute to get the attribute string.
*
* @param attr attribute info
* @return attribute string
@@ -934,7 +934,7 @@
}
/**
- * Append content to temporary file.
+ * Appends content to temporary file.
*
* @param file temporary file
* @param data data to be appended
@@ -1061,7 +1061,7 @@
}
/**
- * Add the new attribute info to the target generated temporary files.
+ * Adds the new attribute info to the target generated temporary files.
*
* @param newAttrInfo the attribute info that needs to be added to temporary
* files
@@ -1112,7 +1112,7 @@
}
/**
- * Return java file info.
+ * Returns java file info.
*
* @return java file info
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/TraversalType.java b/src/main/java/org/onosproject/yangutils/translator/tojava/TraversalType.java
index 28ae5ff..dd7db35 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/TraversalType.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/TraversalType.java
@@ -17,7 +17,7 @@
package org.onosproject.yangutils.translator.tojava;
/**
- * Data model tree traversal types.
+ * Represents data model tree traversal types.
*/
public enum TraversalType {
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
index 1e24770..ee1ad27 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaAugment.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Augment information extended to support java code generation.
+ * Represents augment information extended to support java code generation.
*/
public class YangJavaAugment extends YangAugment
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -59,7 +59,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates a YANG java augment object.
*/
public YangJavaAugment() {
super();
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaCase.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaCase.java
index 6daab7b..113e133 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaCase.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaCase.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Case information extended to support java code generation.
+ * Represents case information extended to support java code generation.
*/
public class YangJavaCase extends YangCase
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -59,7 +59,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java case object.
*/
public YangJavaCase() {
super();
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaChoice.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaChoice.java
index a098a2d..4cec959 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaChoice.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaChoice.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Choice information extended to support java code generation.
+ * Represents choice information extended to support java code generation.
*/
public class YangJavaChoice extends YangChoice
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -59,7 +59,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java choice object.
*/
public YangJavaChoice() {
super();
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaContainer.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaContainer.java
index 0d1c6e1..e045c89 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaContainer.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaContainer.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Container information extended to support java code generation.
+ * Represents container information extended to support java code generation.
*/
public class YangJavaContainer extends YangContainer
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -59,7 +59,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java container object.
*/
public YangJavaContainer() {
super();
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaGrouping.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaGrouping.java
index 50ea649..d8b7c6e 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaGrouping.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaGrouping.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Grouping information extended to support java code generation.
+ * Represents grouping information extended to support java code generation.
*/
public class YangJavaGrouping extends YangGrouping
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -59,7 +59,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java grouping object.
*/
public YangJavaGrouping() {
super();
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaInput.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaInput.java
index e18d03d..5a935da 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaInput.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaInput.java
@@ -37,7 +37,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Input information extended to support java code generation.
+ * Represents input information extended to support java code generation.
*/
public class YangJavaInput extends YangInput
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -85,7 +85,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -105,7 +105,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -126,7 +126,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaList.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaList.java
index 4e844aa..6886990 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaList.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaList.java
@@ -36,7 +36,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * YANG List information extended to support java code generation.
+ * Represents YANG List information extended to support java code generation.
*/
public class YangJavaList extends YangList
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -60,7 +60,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java list object.
*/
public YangJavaList() {
super();
@@ -70,7 +70,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -84,7 +84,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -94,7 +94,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -104,7 +104,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -115,7 +115,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -125,7 +125,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
index 78211e6..9b53391 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaModule.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Module information extended to support java code generation.
+ * Represents module information extended to support java code generation.
*/
public class YangJavaModule extends YangModule
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -69,7 +69,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -83,7 +83,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -93,7 +93,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -103,7 +103,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -114,7 +114,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -124,7 +124,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
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 d12a676..bfa9dc1 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
@@ -17,8 +17,9 @@
package org.onosproject.yangutils.translator.tojava.javamodel;
import java.io.IOException;
-import org.onosproject.yangutils.translator.exception.TranslatorException;
+
import org.onosproject.yangutils.datamodel.YangNotification;
+import org.onosproject.yangutils.translator.exception.TranslatorException;
import org.onosproject.yangutils.translator.tojava.HasJavaFileInfo;
import org.onosproject.yangutils.translator.tojava.HasJavaImportData;
import org.onosproject.yangutils.translator.tojava.HasTempJavaCodeFragmentFiles;
@@ -35,7 +36,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Notification information extended to support java code generation.
+ * Represents notification information extended to support java code generation.
*/
public class YangJavaNotification extends YangNotification
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -83,7 +84,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -103,7 +104,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -124,7 +125,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaOutput.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaOutput.java
index 90928c9..4228a4a 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaOutput.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaOutput.java
@@ -37,7 +37,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Output information extended to support java code generation.
+ * Represents output information extended to support java code generation.
*/
public class YangJavaOutput extends YangOutput
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -85,7 +85,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -105,7 +105,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -126,7 +126,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaRpc.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaRpc.java
index 6c9f18e..b109789 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaRpc.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaRpc.java
@@ -21,7 +21,7 @@
import org.onosproject.yangutils.translator.tojava.JavaCodeGenerator;
/**
- * Rpc information extended to support java code generation.
+ * Represents rpc information extended to support java code generation.
*/
public class YangJavaRpc extends YangRpc implements JavaCodeGenerator {
@@ -32,7 +32,7 @@
}
/**
- * Prepare the information for java code generation corresponding to YANG
+ * Prepares the information for java code generation corresponding to YANG
* rpc info.
*
* @param codeGenDir code generation directory
@@ -44,7 +44,7 @@
}
/**
- * Create a java file using the YANG rpc info.
+ * Creates a java file using the YANG rpc info.
*
* @throws IOException IO operation fail
*/
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 592a9e6..34de136 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
@@ -36,7 +36,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Sub module information extended to support java code generation.
+ * Represents Sub module information extended to support java code generation.
*/
public class YangJavaSubModule extends YangSubModule
implements JavaCodeGenerator, HasJavaFileInfo,
@@ -60,7 +60,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates YANG java sub module object.
*/
public YangJavaSubModule() {
super();
@@ -70,7 +70,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -84,7 +84,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -94,7 +94,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -104,7 +104,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -115,7 +115,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -125,7 +125,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
@@ -135,7 +135,7 @@
}
/**
- * Get the name space of the module to which the sub module belongs to.
+ * Returns the name space of the module to which the sub module belongs to.
*
* @param belongsToInfo Information of the module to which the sub module
* belongs
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaTypeDef.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaTypeDef.java
index 9906c59..67ee326 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaTypeDef.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaTypeDef.java
@@ -35,7 +35,7 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.getAbsolutePackagePath;
/**
- * Type define information extended to support java code generation.
+ * Represents type define information extended to support java code generation.
*/
public class YangJavaTypeDef extends YangTypeDef
implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData, HasTempJavaCodeFragmentFiles {
@@ -58,7 +58,7 @@
private TempJavaCodeFragmentFiles tempFileHandle;
/**
- * Default constructor.
+ * Creates a YANG java typedef object.
*/
public YangJavaTypeDef() {
super();
@@ -68,7 +68,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -82,7 +82,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -92,7 +92,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -102,7 +102,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
@@ -113,7 +113,7 @@
}
/**
- * Get the temporary file handle.
+ * Returns the temporary file handle.
*
* @return temporary file handle
*/
@@ -123,7 +123,7 @@
}
/**
- * Set temporary file handle.
+ * Sets temporary file handle.
*
* @param fileHandle temporary file handle
*/
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaUses.java b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaUses.java
index 6531eb4..32b96c2 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaUses.java
+++ b/src/main/java/org/onosproject/yangutils/translator/tojava/javamodel/YangJavaUses.java
@@ -30,7 +30,7 @@
import static org.onosproject.yangutils.translator.tojava.utils.JavaIdentifierSyntax.getPackageDirPathFromJavaJPackage;
/**
- * Uses information extended to support java code generation.
+ * Represents uses information extended to support java code generation.
*/
public class YangJavaUses extends YangUses implements JavaCodeGenerator, HasJavaFileInfo, HasJavaImportData {
@@ -46,7 +46,7 @@
private JavaImportData javaImportData;
/**
- * Default constructor.
+ * Creates YANG java uses object.
*/
public YangJavaUses() {
super();
@@ -56,7 +56,7 @@
}
/**
- * Get the generated java file information.
+ * Returns the generated java file information.
*
* @return generated java file information
*/
@@ -70,7 +70,7 @@
}
/**
- * Set the java file info object.
+ * Sets the java file info object.
*
* @param javaInfo java file info object
*/
@@ -80,7 +80,7 @@
}
/**
- * Get the data of java imports to be included in generated file.
+ * Returns the data of java imports to be included in generated file.
*
* @return data of java imports to be included in generated file
*/
@@ -90,7 +90,7 @@
}
/**
- * Set the data of java imports to be included in generated file.
+ * Sets the data of java imports to be included in generated file.
*
* @param javaImportData data of java imports to be included in generated
* file
diff --git a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java
index b1d4580..5a8594a 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/AttributesJavaDataType.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
index ae0c8c4..e1ea084 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/ClassDefinitionGenerator.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
index 99c5c7d..cebad58 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaCodeSnippetGen.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
index efcf053..7a30be8 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
index 589b4e0..4228a2e 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGeneratorUtils.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java
index b1d6ce7..c71f2d1 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaIdentifierSyntax.java
+++ b/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/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java b/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
index 4ad483b..6270cd2 100644
--- a/src/main/java/org/onosproject/yangutils/translator/tojava/utils/MethodsGenerator.java
+++ b/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
diff --git a/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java b/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
index 8b0cfc7..6a994c9 100644
--- a/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
+++ b/src/main/java/org/onosproject/yangutils/utils/UtilConstants.java
@@ -21,12 +21,12 @@
import java.util.List;
/**
- * Provides utility constants while generating java files.
+ * Represents utilities constants which are used while generating java files.
*/
public final class UtilConstants {
/**
- * Default constructor.
+ * Creates an instance of util constants.
*/
private UtilConstants() {
}
diff --git a/src/main/java/org/onosproject/yangutils/utils/YangConstructType.java b/src/main/java/org/onosproject/yangutils/utils/YangConstructType.java
index 3bae072..f60b650 100644
--- a/src/main/java/org/onosproject/yangutils/utils/YangConstructType.java
+++ b/src/main/java/org/onosproject/yangutils/utils/YangConstructType.java
@@ -16,7 +16,7 @@
package org.onosproject.yangutils.utils;
/**
- * ENUM to represent the type of data in parse tree.
+ * Represents ENUM to represent the type of data in parse tree.
*/
public enum YangConstructType {
/**
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/CopyrightHeader.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/CopyrightHeader.java
index ff4a1ce..0a385ac 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/CopyrightHeader.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/CopyrightHeader.java
@@ -27,7 +27,7 @@
import static org.onosproject.yangutils.utils.UtilConstants.NEW_LINE;
/**
- * Provides the license header for the generated files.
+ * Represents the license header for the generated files.
*/
public final class CopyrightHeader {
@@ -39,7 +39,7 @@
private static String copyrightHeader;
/**
- * Default constructor.
+ * Creates an instance of copyright header.
*/
private CopyrightHeader() {
}
@@ -69,11 +69,11 @@
}
/**
- * parse Copyright to the temporary file.
+ * parses Copyright to the temporary file.
*
* @throws IOException when fails to get the copyright header
*/
- public static void parseCopyrightHeader() throws IOException {
+ private static void parseCopyrightHeader() throws IOException {
File temp = new File(TEMP_FILE);
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/FileSystemUtil.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/FileSystemUtil.java
index 6955bb5..3765f71 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/FileSystemUtil.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/FileSystemUtil.java
@@ -36,18 +36,18 @@
import static org.onosproject.yangutils.utils.io.impl.YangIoUtils.createDirectories;
/**
- * Utility to handle file system operations.
+ * Represents utility to handle file system operations.
*/
public final class FileSystemUtil {
/**
- * Hiding constructor of a utility class.
+ * Creates an instance of file system util.
*/
private FileSystemUtil() {
}
/**
- * Check if the package directory structure created.
+ * Checks if the package directory structure created.
*
* @param pkg Package to check if it is created
* @return existence status of package
@@ -63,7 +63,7 @@
}
/**
- * Create a package structure with package info java file if not present.
+ * Creates a package structure with package info java file if not present.
*
* @param pkg java package string
* @param pkgInfo description of package
@@ -82,7 +82,7 @@
}
/**
- * Read the contents from source file and append its contents to append
+ * Reads the contents from source file and append its contents to append
* file.
*
* @param toAppend destination file in which the contents of source file is
@@ -133,7 +133,7 @@
}
/**
- * Update the generated file handle.
+ * Updates the generated file handle.
*
* @param inputFile input file
* @param contentTobeAdded content to be appended to the file
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/JavaDocGen.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/JavaDocGen.java
index 651873c..c25c947 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/JavaDocGen.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/JavaDocGen.java
@@ -49,12 +49,12 @@
import static org.onosproject.yangutils.utils.UtilConstants.VALUE;
/**
- * Provides javadoc for the generated classes.
+ * Represents javadoc for the generated classes.
*/
public final class JavaDocGen {
/**
- * Default Constructor.
+ * Creates an instance of java doc gen.
*/
private JavaDocGen() {
}
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
index 412aefd..6da8bcd 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangFileScanner.java
@@ -23,7 +23,7 @@
import java.util.Stack;
/**
- * Provides utility for searching the files in a directory.
+ * Represents utility for searching the files in a directory.
*/
public final class YangFileScanner {
@@ -31,7 +31,7 @@
private static final String YANG_FILE_EXTENTION = ".yang";
/**
- * Default constructor.
+ * Creates an instance of YANG file scanner.
*/
private YangFileScanner() {
}
diff --git a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangIoUtils.java b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangIoUtils.java
index 78a3aef..c15d580 100644
--- a/src/main/java/org/onosproject/yangutils/utils/io/impl/YangIoUtils.java
+++ b/src/main/java/org/onosproject/yangutils/utils/io/impl/YangIoUtils.java
@@ -48,7 +48,7 @@
import static org.slf4j.LoggerFactory.getLogger;
/**
- * Provides common utility functionalities for code generation.
+ * Represents common utility functionalities for code generation.
*/
public final class YangIoUtils {
@@ -56,7 +56,7 @@
private static final String TARGET_RESOURCE_PATH = SLASH + TEMP + SLASH + YANG_RESOURCES + SLASH;
/**
- * Default constructor.
+ * Creates an instance of YANG io utils.
*/
private YangIoUtils() {
}
@@ -68,7 +68,6 @@
* @return directory structure
*/
public static File createDirectories(String path) {
-
File generatedDir = new File(path);
generatedDir.mkdirs();
return generatedDir;
@@ -114,7 +113,6 @@
* @throws IOException when failed to delete directory
*/
public static void clean(String dir) throws IOException {
-
File generatedDirectory = new File(dir);
if (generatedDirectory.exists()) {
try {
@@ -133,7 +131,6 @@
* @param context current build context
*/
public static void addToSource(String source, MavenProject project, BuildContext context) {
-
project.addCompileSourceRoot(source);
context.refresh(project.getBasedir());
log.info("Source directory added to compilation root: " + source);
@@ -147,7 +144,6 @@
* @return new string
*/
public static String trimAtLast(String valueString, String removealStirng) {
-
StringBuilder stringBuilder = new StringBuilder(valueString);
int index = valueString.lastIndexOf(removealStirng);
stringBuilder.deleteCharAt(index);
@@ -161,7 +157,6 @@
* @return parted string
*/
public static String partString(String partString) {
-
String[] strArray = partString.split(COMMA);
String newString = EMPTY_STRING;
for (int i = 0; i < strArray.length; i++) {
@@ -176,7 +171,7 @@
}
/**
- * Get the directory path of the package in canonical form.
+ * Returns the directory path of the package in canonical form.
*
* @param baseCodeGenPath base path where the generated files needs to be
* put
@@ -197,7 +192,7 @@
}
/**
- * Get the absolute path of the package in canonical form.
+ * Returns the absolute path of the package in canonical form.
*
* @param baseCodeGenPath base path where the generated files needs to be
* put
@@ -205,12 +200,11 @@
* @return absolute path of the package in canonical form
*/
public static String getAbsolutePackagePath(String baseCodeGenPath, String pathOfJavaPkg) {
-
return baseCodeGenPath + pathOfJavaPkg;
}
/**
- * Copy YANG files to the current project's output directory.
+ * Copies YANG files to the current project's output directory.
*
* @param yangFiles list of YANG files
* @param outputDir project's output directory
@@ -243,7 +237,6 @@
* @return list of files
*/
private static List<File> getListOfFile(List<String> strings) {
-
List<File> files = new ArrayList<>();
for (String file : strings) {
files.add(new File(file));
@@ -252,14 +245,13 @@
}
/**
- * Merge the temp java files to main java files.
+ * Merges the temp java files to main java files.
*
* @param appendFile temp file
* @param srcFile main file
* @throws IOException when fails to append contents
*/
public static void mergeJavaFiles(File appendFile, File srcFile) throws IOException {
-
try {
appendFileContents(appendFile, srcFile);
} catch (IOException e) {
@@ -268,14 +260,13 @@
}
/**
- * Insert data in the generated file.
+ * Inserts data in the generated file.
*
* @param file file in which need to be inserted
* @param data data which need to be inserted
* @throws IOException when fails to insert into file
*/
public static void insertDataIntoJavaFile(File file, String data) throws IOException {
-
try {
updateFileHandle(file, data, false);
} catch (IOException e) {