package com.alibaba.fastjson.parser.deserializer;

import java.lang.reflect.Type;

import com.alibaba.fastjson.parser.DefaultJSONParser;

public interface ObjectDeserializer {
    <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName);
    
    int getFastMatchToken();
}

@@ -130,16 +130,1590 @@
 Parser;%0A
+import com.alibaba.fastjson.parser.JSONToken;%0Aimport com.alibaba.fastjson.parser.ParserConfig;%0Aimport com.alibaba.json.bvt.bug.Bug_for_Issue_603.OrderActionEnum;%0Aimport com.alibaba.json.bvt.bug.Bug_for_Issue_603.OrderActionEnumDeser;%0Aimport com.google.gson.GsonBuilder;%0A%0A/**%0A * %3Cp%3EInterface representing a custom deserializer for Json. You should write a custom%0A * deserializer, if you are not happy with the default deserialization done by Gson. You will%0A * also need to register this deserializer through%0A * %7B@link ParserConfig#putDeserializer(Type, ObjectDeserializer)%7D.%3C/p%3E%0A * %3Cpre%3E%0A * public static enum OrderActionEnum %7B%0A *     FAIL(1), SUCC(0);%0A * %0A *     private int code;%0A * %0A *     OrderActionEnum(int code)%7B%0A *         this.code = code;%0A *     %7D%0A * %7D%0A * %0A * public static class OrderActionEnumDeser implements ObjectDeserializer %7B%0A *     %0A *     public &lt;T&gt; T deserialze(DefaultJSONParser parser, Type type, Object fieldName) %7B%0A *         Integer intValue = parser.parseObject(int.class);%0A *         if (intValue == 1) %7B%0A *             return (T) OrderActionEnum.FAIL;%0A *         %7D else if (intValue == 0) %7B%0A *             return (T) OrderActionEnum.SUCC;%0A *         %7D%0A *         throw new IllegalStateException();%0A *     %7D%0A * %0A *     %0A *     public int getFastMatchToken() %7B%0A *         return JSONToken.LITERAL_INT;%0A *     %7D%0A * %7D%0A * %3C/pre%3E%0A * %0A * %3Cp%3EYou will also need to register %7B@code OrderActionEnumDeser%7D to ParserConfig:%3C/p%3E%0A * %3Cpre%3E%0A * ParserConfig.getGlobalInstance().putDeserializer(OrderActionEnum.class, new OrderActionEnumDeser());%0A * %3C/pre%3E%0A */
 %0Apublic 

add java doc