Package net.sourceforge.plantuml.json
Class Json.DefaultHandler
- java.lang.Object
-
- net.sourceforge.plantuml.json.JsonHandler<JsonArray,JsonObject>
-
- net.sourceforge.plantuml.json.Json.DefaultHandler
-
- Enclosing class:
- Json
public static class Json.DefaultHandler extends JsonHandler<JsonArray,JsonObject>
-
-
Constructor Summary
Constructors Constructor Description DefaultHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendArray(JsonArray array)Indicates the end of an array in the JSON input.voidendArrayValue(JsonArray array)Indicates the end of an array element in the JSON input.voidendBoolean(boolean bool)Indicates the end of a boolean literal (trueorfalse) in the JSON input.voidendNull()Indicates the end of anullliteral in the JSON input.voidendNumber(String string)Indicates the end of a number in the JSON input.voidendObject(JsonObject object)Indicates the end of an object in the JSON input.voidendObjectValue(JsonObject object, String name)Indicates the end of an object member value in the JSON input.voidendString(String string)Indicates the end of a string in the JSON input.JsonValuegetValue()JsonArraystartArray()Indicates the beginning of an array in the JSON input.JsonObjectstartObject()Indicates the beginning of an object in the JSON input.-
Methods inherited from class net.sourceforge.plantuml.json.JsonHandler
endObjectName, getLocation, startArrayValue, startBoolean, startNull, startNumber, startObjectName, startObjectValue, startString
-
-
-
-
Field Detail
-
value
protected JsonValue value
-
-
Method Detail
-
startArray
public JsonArray startArray()
Description copied from class:JsonHandlerIndicates the beginning of an array in the JSON input. This method will be called when reading the opening square bracket character ('[').This method may return an object to handle subsequent parser events for this array. This array handler will then be provided in all calls to
startArrayValue(),endArrayValue(), andendArray()for this array.- Overrides:
startArrayin classJsonHandler<JsonArray,JsonObject>- Returns:
- a handler for this array, or
nullif not needed
-
startObject
public JsonObject startObject()
Description copied from class:JsonHandlerIndicates the beginning of an object in the JSON input. This method will be called when reading the opening curly bracket character ('{').This method may return an object to handle subsequent parser events for this object. This object handler will be provided in all calls to
startObjectName(),endObjectName(),startObjectValue(),endObjectValue(), andendObject()for this object.- Overrides:
startObjectin classJsonHandler<JsonArray,JsonObject>- Returns:
- a handler for this object, or
nullif not needed
-
endNull
public void endNull()
Description copied from class:JsonHandlerIndicates the end of anullliteral in the JSON input. This method will be called after reading the last character of the literal.- Overrides:
endNullin classJsonHandler<JsonArray,JsonObject>
-
endBoolean
public void endBoolean(boolean bool)
Description copied from class:JsonHandlerIndicates the end of a boolean literal (trueorfalse) in the JSON input. This method will be called after reading the last character of the literal.- Overrides:
endBooleanin classJsonHandler<JsonArray,JsonObject>- Parameters:
bool- the parsed boolean value
-
endString
public void endString(String string)
Description copied from class:JsonHandlerIndicates the end of a string in the JSON input. This method will be called after reading the closing double quote character ('"').- Overrides:
endStringin classJsonHandler<JsonArray,JsonObject>- Parameters:
string- the parsed string
-
endNumber
public void endNumber(String string)
Description copied from class:JsonHandlerIndicates the end of a number in the JSON input. This method will be called after reading the last character of the number.- Overrides:
endNumberin classJsonHandler<JsonArray,JsonObject>- Parameters:
string- the parsed number string
-
endArray
public void endArray(JsonArray array)
Description copied from class:JsonHandlerIndicates the end of an array in the JSON input. This method will be called after reading the closing square bracket character (']').- Overrides:
endArrayin classJsonHandler<JsonArray,JsonObject>- Parameters:
array- the array handler returned fromJsonHandler.startArray(), ornullif not provided
-
endObject
public void endObject(JsonObject object)
Description copied from class:JsonHandlerIndicates the end of an object in the JSON input. This method will be called after reading the closing curly bracket character ('}').- Overrides:
endObjectin classJsonHandler<JsonArray,JsonObject>- Parameters:
object- the object handler returned fromJsonHandler.startObject(), or null if not provided
-
endArrayValue
public void endArrayValue(JsonArray array)
Description copied from class:JsonHandlerIndicates the end of an array element in the JSON input. This method will be called after reading the last character of the element value, just after theendmethod for the specific element type (likeendString(),endNumber(), etc.).- Overrides:
endArrayValuein classJsonHandler<JsonArray,JsonObject>- Parameters:
array- the array handler returned fromJsonHandler.startArray(), ornullif not provided
-
endObjectValue
public void endObjectValue(JsonObject object, String name)
Description copied from class:JsonHandlerIndicates the end of an object member value in the JSON input. This method will be called after reading the last character of the member value, just after theendmethod for the specific member type (likeendString(),endNumber(), etc.).- Overrides:
endObjectValuein classJsonHandler<JsonArray,JsonObject>- Parameters:
object- the object handler returned fromJsonHandler.startObject(), or null if not providedname- the parsed member name
-
getValue
public JsonValue getValue()
-
-