private static Deserializer getDeserializer(Class<?> clazz, Type type) {

        Deserializer deserializer;

        if (PrimitiveTypeUtils.isPrimitiveClass(clazz)) {
            deserializer = new PrimitiveTypeDeserializer();
        } else if (clazz.isEnum()) {
            deserializer = new EnumDeserializer(clazz);
        } else if (clazz.isArray()) {
            deserializer = ArrayDeserializer.INSTANCE;
        } else if (clazz == Set.class || clazz == HashSet.class || clazz == Collection.class || clazz == List.class
                || clazz == ArrayList.class) {
            deserializer = CollectionDeserializer.INSTANCE;
        } else if (Collection.class.isAssignableFrom(clazz)) {
            deserializer = CollectionDeserializer.INSTANCE;
        } else if (Map.class.isAssignableFrom(clazz)) {
            deserializer = MapDeserializer.INSTANCE;
        } else {
            deserializer = new JavaBeanDeserializer(clazz);
        }

        deserializerMap.put(type, deserializer);

        return deserializer;
    }
@author Robert HG (254963746@qq.com) on 12/29/15.
lts-core/src/main/java/com/github/ltsopensource/json/JSONParser.java