Package com.adobe.acs.commons.json
Class AbstractJSONObjectVisitor
- java.lang.Object
-
- com.adobe.acs.commons.json.AbstractJSONObjectVisitor
-
public abstract class AbstractJSONObjectVisitor extends Object
-
-
Constructor Summary
Constructors Constructor Description AbstractJSONObjectVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaccept(com.google.gson.JsonArray jsonArray)Visit the given JSON Array and all its descendants.voidaccept(com.google.gson.JsonObject jsonObject)Visit the given JSON Object and all its descendants.intgetCurrentDepth()protected voidtraverseJSONArray(com.google.gson.JsonArray jsonArray)Visit each JSON Object in the JSON Array.protected voidtraverseJSONObject(com.google.gson.JsonObject jsonObject)Visit each JSON Object in the JSON Array.protected abstract voidvisit(com.google.gson.JsonObject jsonObject)Implement this method to do actual work on the JSON Object.
-
-
-
Method Detail
-
getCurrentDepth
public int getCurrentDepth()
-
accept
public void accept(com.google.gson.JsonObject jsonObject)
Visit the given JSON Object and all its descendants.- Parameters:
jsonObject- The JSON Object
-
accept
public void accept(com.google.gson.JsonArray jsonArray)
Visit the given JSON Array and all its descendants.- Parameters:
jsonArray- The JSON Object
-
traverseJSONObject
protected final void traverseJSONObject(com.google.gson.JsonObject jsonObject)
Visit each JSON Object in the JSON Array.- Parameters:
jsonObject- The JSON Array
-
traverseJSONArray
protected final void traverseJSONArray(com.google.gson.JsonArray jsonArray)
Visit each JSON Object in the JSON Array.- Parameters:
jsonArray- The JSON Array
-
visit
protected abstract void visit(com.google.gson.JsonObject jsonObject)
Implement this method to do actual work on the JSON Object.- Parameters:
jsonObject- The JSON Object
-
-