Back to project page JsonPullParser.
The source code is released under:
Apache License
If you think the Android project JsonPullParser listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.vvakame.util.jsonpullparser.builder; /*w w w .ja v a 2 s. co m*/ /** * Router for JsonModelCoder that routed by model. * @author vvakame * @param <T> */ public abstract class JsonCoderRouter<T> { /** * Resolve coder by model. * @param obj * @return custom coder, can't return null. * @author vvakame */ public abstract JsonModelCoder<T> resolve(T obj); /** * Call {@link #resolve(Object)} and checl not null. * @param obj * @return custom coder * @author vvakame */ public JsonModelCoder<T> doResolve(T obj) { JsonModelCoder<T> coder = resolve(obj); if (coder == null) { throw new NullPointerException("resolve method must return coder."); } return coder; } }