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 JSONValueType
getDocumentType()
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 stackString
getTopOfKeyStack()
Return top of key stackJSONValueType
getTopOfObjectStack()
Return the top of the Object stackvoid
handleEvent(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:
handleEvent
in interfaceJSONEventHandler
- Specified by:
handleEvent
in classEventHandler
- Throws:
JSONEventParserException
-