Class ConsoleEventHandler
java.lang.Object
org.ghotibeaun.json.parser.jep.eventhandler.EventHandler
org.ghotibeaun.json.parser.jep.eventhandler.ConsoleEventHandler
- All Implemented Interfaces:
Configurable
,JSONEventHandler
public class ConsoleEventHandler extends EventHandler
-
Constructor Summary
Constructors Constructor Description ConsoleEventHandler()
-
Method Summary
Modifier and Type Method Description void
documentEnd()
The document end eventvoid
documentStart(JSONValueType type)
The document start eventvoid
handleEvent(JSONEvent event)
void
jsonArrayEnd(String key)
End of a JSONArrayvoid
jsonArrayStart(String key)
Start of new JSONArray.void
jsonObjectEnd(String key)
End of a JSONObjectvoid
jsonObjectStart(String key)
Start of a new JSONObjectvoid
newKey(String key)
void
valueBigDecimal(String key, BigDecimal value)
BigDecimal valuevoid
valueBoolean(String key, boolean value)
Boolean valuevoid
valueDouble(String key, Double value)
Double value valuevoid
valueFloat(String key, Float value)
Float valuevoid
valueInt(String key, Integer value)
Integer valuevoid
valueLong(String key, Long value)
Long valuevoid
valueNull(String key)
null valuevoid
valueString(String key, String value)
String valueMethods inherited from class org.ghotibeaun.json.parser.jep.eventhandler.EventHandler
consoleEventHandler, getCharacterSet, getDataValue, getParserSettings, setParserSettings
-
Constructor Details
-
ConsoleEventHandler
public ConsoleEventHandler()
-
-
Method Details
-
documentStart
Description copied from interface:JSONEventHandler
The document start event- Specified by:
documentStart
in interfaceJSONEventHandler
- Specified by:
documentStart
in classEventHandler
- Parameters:
type
- the document type, will either be JSONValueType.OBJECT orJSONValueType.ARRAY
-
documentEnd
public void documentEnd()Description copied from interface:JSONEventHandler
The document end event- Specified by:
documentEnd
in interfaceJSONEventHandler
- Specified by:
documentEnd
in classEventHandler
-
jsonArrayStart
Description copied from interface:JSONEventHandler
Start of new JSONArray.- Specified by:
jsonArrayStart
in interfaceJSONEventHandler
- Specified by:
jsonArrayStart
in classEventHandler
- Parameters:
key
- the parent key that is associated with the array
-
jsonArrayEnd
Description copied from interface:JSONEventHandler
End of a JSONArray- Specified by:
jsonArrayEnd
in interfaceJSONEventHandler
- Specified by:
jsonArrayEnd
in classEventHandler
- Parameters:
key
- the parent key associated with the array
-
jsonObjectStart
Description copied from interface:JSONEventHandler
Start of a new JSONObject- Specified by:
jsonObjectStart
in interfaceJSONEventHandler
- Specified by:
jsonObjectStart
in classEventHandler
- Parameters:
key
- the parent key associated with the object
-
jsonObjectEnd
Description copied from interface:JSONEventHandler
End of a JSONObject- Specified by:
jsonObjectEnd
in interfaceJSONEventHandler
- Specified by:
jsonObjectEnd
in classEventHandler
- Parameters:
key
- the parent key associated with this object
-
valueString
Description copied from interface:JSONEventHandler
String value- Specified by:
valueString
in interfaceJSONEventHandler
- Specified by:
valueString
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueLong
Description copied from interface:JSONEventHandler
Long value- Specified by:
valueLong
in interfaceJSONEventHandler
- Specified by:
valueLong
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueInt
Description copied from interface:JSONEventHandler
Integer value- Specified by:
valueInt
in interfaceJSONEventHandler
- Specified by:
valueInt
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueBigDecimal
Description copied from interface:JSONEventHandler
BigDecimal value- Specified by:
valueBigDecimal
in interfaceJSONEventHandler
- Specified by:
valueBigDecimal
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueDouble
Description copied from interface:JSONEventHandler
Double value value- Specified by:
valueDouble
in interfaceJSONEventHandler
- Specified by:
valueDouble
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueFloat
Description copied from interface:JSONEventHandler
Float value- Specified by:
valueFloat
in interfaceJSONEventHandler
- Specified by:
valueFloat
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueBoolean
Description copied from interface:JSONEventHandler
Boolean value- Specified by:
valueBoolean
in interfaceJSONEventHandler
- Specified by:
valueBoolean
in classEventHandler
- Parameters:
key
- the key associated with this valuevalue
- the value
-
valueNull
Description copied from interface:JSONEventHandler
null value- Specified by:
valueNull
in interfaceJSONEventHandler
- Specified by:
valueNull
in classEventHandler
- Parameters:
key
- the key associated with this value
-
newKey
- Specified by:
newKey
in interfaceJSONEventHandler
- Specified by:
newKey
in classEventHandler
-
handleEvent
- Specified by:
handleEvent
in interfaceJSONEventHandler
- Specified by:
handleEvent
in classEventHandler
-