Class StackEventHandler
java.lang.Object
org.ghotibeaun.json.parser.jep.eventhandler.EventHandler
org.ghotibeaun.json.parser.jep.eventhandler.StackEventHandler
- All Implemented Interfaces:
Configurable,JSONEventHandler
public abstract class StackEventHandler extends EventHandler
Abstract event handler that holds information about current key and object/array contexts while
traversing a JSON object
- Author:
- Jim Earley (xml.jim@gmail.com)
-
Constructor Summary
Constructors Constructor Description StackEventHandler() -
Method Summary
Modifier and Type Method Description JSONValueTypegetDocumentType()Return the document type (ARRAY or OBJECT)String[]getKeyStack()Return an ordered array of the key stackJSONValueType[]getObjectStack()Return an array containing the ordered object stackStringgetTopOfKeyStack()Return top of key stackJSONValueTypegetTopOfObjectStack()Return the top of the Object stackvoidhandleEvent(JSONEvent event)Methods inherited from class org.ghotibeaun.json.parser.jep.eventhandler.EventHandler
consoleEventHandler, documentEnd, documentStart, getCharacterSet, getDataValue, getParserSettings, jsonArrayEnd, jsonArrayStart, jsonObjectEnd, jsonObjectStart, newKey, setParserSettings, valueBigDecimal, valueBoolean, valueDouble, valueFloat, valueInt, valueLong, valueNull, valueString
-
Constructor Details
-
StackEventHandler
public StackEventHandler()
-
-
Method Details
-
getDocumentType
Return the document type (ARRAY or OBJECT)- Returns:
- the document type
-
getObjectStack
Return an array containing the ordered object stack- Returns:
-
getTopOfObjectStack
Return the top of the Object stack- Returns:
-
getKeyStack
Return an ordered array of the key stack- Returns:
-
getTopOfKeyStack
Return top of key stack- Returns:
-
handleEvent
- Specified by:
handleEventin interfaceJSONEventHandler- Specified by:
handleEventin classEventHandler- Throws:
JSONEventParserException
-