@@ -85,7 +85,7 @@ private synchronized static Decoder gen(String cacheKey, Type type, Type[] typeA
8585 CtMethod staticMethod = CtNewMethod .make (source , ctClass );
8686 ctClass .addMethod (staticMethod );
8787 CtMethod interfaceMethod = CtNewMethod .make ("" +
88- "public Object decode(com.jsoniter.Jsoniter iter) {" +
88+ "public Object decode(com.jsoniter.JsonIterator iter) {" +
8989 "return decode_(iter);" +
9090 "}" , ctClass );
9191 ctClass .addMethod (interfaceMethod );
@@ -158,7 +158,7 @@ private static String genSource(String cacheKey, Class clazz, Type[] typeArgs) {
158158
159159 private static String genMap (Class clazz , Type valueType ) {
160160 StringBuilder lines = new StringBuilder ();
161- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
161+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
162162 append (lines , "{{clazz}} map = new {{clazz}}();" );
163163 append (lines , "for (String field = iter.readObject(); field != null; field = iter.readObject()) {" );
164164 append (lines , "map.put(field, {{op}});" );
@@ -191,7 +191,7 @@ private static String genNative(String nativeReadKey) {
191191 throw new RuntimeException ("do not know how to read: " + nativeReadKey );
192192 }
193193 StringBuilder lines = new StringBuilder ();
194- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
194+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
195195 append (lines , "return " + op + ";" );
196196 append (lines , "}" );
197197 return lines .toString ();
@@ -216,7 +216,7 @@ private static String genObjectUsingHash(Class clazz, String cacheKey) {
216216 return genObjectUsingSkip (clazz , ctor );
217217 }
218218 StringBuilder lines = new StringBuilder ();
219- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
219+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
220220 append (lines , "if (iter.readNull()) { return null; }" );
221221 for (Binding parameter : ctor .parameters ) {
222222 appendVarDef (lines , parameter );
@@ -299,7 +299,7 @@ private static void appendVarDef(StringBuilder lines, Binding parameter) {
299299
300300 private static String genObjectUsingSkip (Class clazz , CustomizedConstructor ctor ) {
301301 StringBuilder lines = new StringBuilder ();
302- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
302+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
303303 append (lines , "if (iter.readNull()) { return null; }" );
304304 append (lines , "{{clazz}} obj = {{newInst}};" );
305305 append (lines , "iter.skip();" );
@@ -339,7 +339,7 @@ private static void appendInvocation(StringBuilder code, List<Binding> params) {
339339 private static String genObjectUsingSlice (Class clazz , String cacheKey ) {
340340 Map <Integer , Object > trieTree = buildTriTree (clazz );
341341 StringBuilder lines = new StringBuilder ();
342- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
342+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
343343 append (lines , "if (iter.readNull()) { return null; }" );
344344 append (lines , "{{clazz}} obj = {{newInst}};" );
345345 append (lines , "if (!com.jsoniter.CodegenAccess.readObjectStart(iter)) { return obj; }" );
@@ -547,7 +547,7 @@ private static String genArray(Class clazz) {
547547 throw new IllegalArgumentException ("nested array not supported: " + clazz .getCanonicalName ());
548548 }
549549 StringBuilder lines = new StringBuilder ();
550- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
550+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
551551 append (lines , "if (iter.readNull()) { return null; }" );
552552 append (lines , "if (!com.jsoniter.CodegenAccess.readArrayStart(iter)) {" );
553553 append (lines , "return new {{comp}}[0];" );
@@ -591,7 +591,7 @@ private static String genArray(Class clazz) {
591591
592592 private static String genCollectionWithCapacity (Class clazz , Type compType ) {
593593 StringBuilder lines = new StringBuilder ();
594- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
594+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
595595 append (lines , "if (!com.jsoniter.CodegenAccess.readArrayStart(iter)) {" );
596596 append (lines , "return new {{clazz}}(0);" );
597597 append (lines , "}" );
@@ -635,7 +635,7 @@ private static String genCollectionWithCapacity(Class clazz, Type compType) {
635635
636636 private static String genCollection (Class clazz , Type compType ) {
637637 StringBuilder lines = new StringBuilder ();
638- append (lines , "public static Object decode_(com.jsoniter.Jsoniter iter) {" );
638+ append (lines , "public static Object decode_(com.jsoniter.JsonIterator iter) {" );
639639 append (lines , "if (!com.jsoniter.CodegenAccess.readArrayStart(iter)) {" );
640640 append (lines , "return new {{clazz}}();" );
641641 append (lines , "}" );
0 commit comments