@Override
    public Serializer getSerializer(Class cl) throws HessianProtocolException {

        if (GenericObject.class == cl) {
            return GenericObjectSerializer.getInstance();
        }

        if (GenericArray.class == cl) {
            return GenericArraySerializer.getInstance();
        }

        if (GenericCollection.class == cl) {
            return GenericCollectionSerializer.getInstance();
        }

        if (GenericMap.class == cl) {
            return GenericMapSerializer.getInstance();
        }

        if (GenericClass.class == cl) {
            return GenericClassSerializer.getInstance();
        }

        return super.getSerializer(cl);
    }
@author <a href="mailto:caojie.cj@antfin.com">CaoJie</a>
codec/codec-sofa-hessian/src/main/java/com/alipay/sofa/rpc/codec/sofahessian/GenericSingleClassLoaderSofaSerializerFactory.java