multiFileYangTranslator
Change-Id: I2adfef3acaec4bd74ba2c487404d2c655b800988
diff --git a/src/main/java/org/onosproject/yangutils/datamodel/YangEntityToResolveInfo.java b/src/main/java/org/onosproject/yangutils/datamodel/YangEntityToResolveInfo.java
index aa95899..229625c 100644
--- a/src/main/java/org/onosproject/yangutils/datamodel/YangEntityToResolveInfo.java
+++ b/src/main/java/org/onosproject/yangutils/datamodel/YangEntityToResolveInfo.java
@@ -19,6 +19,8 @@
/**
* Represents information about entity being resolved.
+ *
+ * @param <T> type of entity being resolved, uses / grouping
*/
public class YangEntityToResolveInfo<T> {
@@ -58,13 +60,19 @@
/**
* Sets parent node which contains the entity to be resolved.
*
- * @param holderOfEntityToResolve parent node which contains the entity to be resolved
+ * @param holderOfEntityToResolve parent node which contains the entity to
+ * be resolved
*/
public void setHolderOfEntityToResolve(YangNode holderOfEntityToResolve) {
this.holderOfEntityToResolve = holderOfEntityToResolve;
}
-
+ /**
+ * Retrieves the prefix of the entity.
+ *
+ * @return entities prefix
+ * @throws DataModelException data model error
+ */
public String getEntityPrefix()
throws DataModelException {
if (getEntityToResolve() == null) {
@@ -72,11 +80,11 @@
}
String prefix;
- T entityToResolve = getEntityToResolve();
- if (entityToResolve instanceof YangType) {
- prefix = ((YangType<?>) entityToResolve).getPrefix();
- } else if (entityToResolve instanceof YangUses) {
- prefix = ((YangUses) entityToResolve).getPrefix();
+ T entityToBeResolved = getEntityToResolve();
+ if (entityToBeResolved instanceof YangType) {
+ prefix = ((YangType<?>) entityToBeResolved).getPrefix();
+ } else if (entityToBeResolved instanceof YangUses) {
+ prefix = ((YangUses) entityToBeResolved).getPrefix();
} else {
throw new DataModelException("Data Model Exception: Entity to resolved is other than type/uses");
}