public interface ResetHook extends JsonHandlerBase
JsonParser.reset() call.
JsonParser is designed to be reused, because it's allocation costs are pretty high,
but parser's handlers couldn't be updated after construction, ResetHook allows to reuse
the handlers implementation too.
Example usage:
class MapConstructor implements ObjectKeyHandler, StringValueHandler, ResetHook {
private Map map = new HashMap();
private String key;
public Map getMap() {
return map;
} | Modifier and Type | Method and Description |
|---|---|
void |
onReset()
Performs an action on
JsonParser.reset() call. |
void onReset()
JsonParser.reset() call.
Unchecked exceptions, that might be thrown in this method, are relayed to
the JsonParser.reset() caller.
Copyright © 2014. All rights reserved.