Add comments in Serializer

Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/47865fd3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/47865fd3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/47865fd3

Branch: refs/heads/REEF-395
Commit: 47865fd34a97b1d4e52b55abf4d2a60032167560
Parents: 0e52a16
Author: Yunseong Lee <[email protected]>
Authored: Mon Jun 22 21:08:34 2015 +0900
Committer: Yunseong Lee <[email protected]>
Committed: Mon Jun 22 21:08:34 2015 +0900

----------------------------------------------------------------------
 .../formats/AvroClassHierarchySerializer.java     | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/47865fd3/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
----------------------------------------------------------------------
diff --git 
a/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
 
b/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
index f096021..2f5c0d8 100644
--- 
a/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
+++ 
b/lang/java/reef-tang/tang/src/main/java/org/apache/reef/tang/formats/AvroClassHierarchySerializer.java
@@ -34,12 +34,22 @@ public class AvroClassHierarchySerializer implements 
ClassHierarchySerializer {
   public AvroClassHierarchySerializer() {
   }
 
-  private static ClassHierarchy fromAvro(final AvroNode n) {
-    return new AvroClassHierarchy(n);
+  /**
+   * Serialize the ClassHierarchy into the AvroNode.
+   * This method is set to be Package private for testing.
+   * @param ch ClassHierarchy to serialize
+   */
+  static AvroNode toAvro(final ClassHierarchy ch) {
+    return newAvroNode(ch.getNamespace());
   }
 
-  private static AvroNode toAvro(final ClassHierarchy ch) {
-    return newAvroNode(ch.getNamespace());
+  /**
+   * Deserialize the ClassHierarchy from the AvroNode.
+   * This method is set to be Package private for testing.
+   * @param n AvroNode to deserialize
+   */
+  static ClassHierarchy fromAvro(final AvroNode n) {
+    return new AvroClassHierarchy(n);
   }
 
   private static AvroNode newAvroNode(final Node n) {

Reply via email to