class GenericSingleClassLoaderSofaSerializerFactory extends SingleClassLoaderSofaSerializerFactory {

    @Override
    public Deserializer getDeserializer(String type) throws HessianProtocolException {

        // 如果类型在过滤列表, 说明是jdk自带类, 直接委托父类处理
        if (StringUtils.isEmpty(type) || ClassFilter.filterExcludeClass(type)) {
            return super.getDeserializer(type);
        }

        // 如果是数组类型, 且在name过滤列表, 说明jdk类, 直接委托父类处理
        if (type.charAt(0) == ARRAY_PREFIX && ClassFilter.arrayFilter(type)) {
            return super.getDeserializer(type);
        }

        // 查看是否已经包含反序列化器
        Deserializer deserializer = DESERIALIZER_MAP.get(type);
        if (deserializer != null) {
            return deserializer;
        }

        // 新建反序列化器, 如果是java.lang.Class使用GenericClassDeserializer,否则使用GenericDeserializer
        if (ClassFilter.CLASS_NAME.equals(type)) {
            deserializer = GenericClassDeserializer.getInstance();
        } else {
            deserializer = new GenericDeserializer(type);
        }

        DESERIALIZER_MAP.putIfAbsent(type, deserializer);
        return deserializer;
    }

}