* 序列化工具{@link ISerializer ISerializer} 注入规则：<br>
如果导入了Hessian的jar包，优先使用Hessian：{@link HessianSerializer
HessianSerializer},否则使用{@link JdkSerializer JdkSerializer}<br>

@return
164180
@Bean
    @ConditionalOnMissingBean(ISerializer.class)
    public ISerializer<Object> autoloadCacheSerializer() {
        ISerializer<Object> res;
        // 推荐优先使用：Hessian
        if (hessianPresent) {
            res = new HessianSerializer();
            log.debug("HessianSerializer auto-configured");
        } else if (kryoPresent) {
            res = new KryoSerializer();
            log.debug("KryoSerializer auto-configured");
        } else {
            res = new JdkSerializer();
            log.debug("JdkSerializer auto-configured");
        }
        return res;
    }
522462
public static Serializer getSerializer(Class<?> type) {
    Class<?> serializable = lookupSerializableType(type);
    Serializer serializer = serializers.get(serializable);
    if (serializer == null) {
      serializer = getInstance().createSerializer(serializable);
      serializers.put(serializable, serializer);
    }
    return serializer;
  }
426342
private static <X extends CopyableValue<X>> CopyableValueSerializer<X> createCopyableValueSerializer(Class<X> clazz) {
		return new CopyableValueSerializer<X>(clazz);
	}
768177
public <T> T deserialize(Class<T> clazz, String stringContainingSerialisedInput) {
        T instance;
        try {
            instance = storageSerializer.deserialize(clazz, stringContainingSerialisedInput);
        } catch (SerializationException e) {
            throw new IllegalStateException("unable to serialise", e);
        }
        return instance;
    }
471551
public Object readObject(AbstractHessianInput in,
                             String type,
                             String[] fieldNames)
        throws HessianProtocolException, IOException {
        Deserializer deserializer = getDeserializer(type);

        if (deserializer != null)
            return deserializer.readObject(in, fieldNames);
        else if (_hashMapDeserializer != null)
            return _hashMapDeserializer.readObject(in, fieldNames);
        else {
            _hashMapDeserializer = new MapDeserializer(HashMap.class);

            return _hashMapDeserializer.readObject(in, fieldNames);
        }
    }
70584
public Deserializer getDeserializer(String type)
        throws HessianProtocolException {
        if (type == null || type.equals(""))
            return null;

        Deserializer deserializer;

        deserializer = (Deserializer) _cachedTypeDeserializerMap.get(type);

        if (deserializer != null)
            return deserializer;

        deserializer = (Deserializer) _staticTypeMap.get(type);
        if (deserializer != null)
            return deserializer;

        if (classNameResolver != null) {
            try {
                type = classNameResolver.resolve(type);
            } catch (Exception e) {
                throw new HessianProtocolException(e);
            }
        }

        if (type.startsWith("[")) {
            Deserializer subDeserializer = getDeserializer(type.substring(1));

            if (subDeserializer != null)
                deserializer = new ArrayDeserializer(subDeserializer.getType());
            else
                deserializer = new ArrayDeserializer(Object.class);
        } else {
            try {
                //Class cl = Class.forName(type, false, getClassLoader());

                Class cl = loadSerializedClass(type);

                deserializer = getDeserializer(cl);
            } catch (Exception e) {
                log.warning("Hessian/Burlap: '" + type + "' is an unknown class in " + getClassLoader() + ":\n" + e);

                log.log(Level.FINER, e.toString(), e);
            }
        }

        if (deserializer != null) {
            _cachedTypeDeserializerMap.put(type, deserializer);
        }

        return deserializer;
    }
1204943
public final byte[] getSerializerBytes()
    {
        if (ivUnversionedSerializerBytes != null)
        {
            return ivUnversionedSerializerBytes;
        }

        BeanId beanId = ivBeanId;
        if (beanId == null)
        {
            beanId = getSerializerBeanId(ivJ2EEName);
        }

        return getSerializerBytes(beanId);
    }
1187588
public static INDArray deserializeRawJson(String serializedRawArray) {

        //String cleanedRawArray = serializedRawArray.replaceAll("(?<=[\\d])(,)(?=[\\d])", "");
        String cleanedRawArray = serializedRawArray;
        JsonArray jsonArray = JSON_PARSER.parse(cleanedRawArray).getAsJsonArray();

        List<Integer> dimensions = new ArrayList<>();
        dimensions.add(jsonArray.size());
        getSizeMultiDimensionalArray(jsonArray, dimensions);

        return buildArray(dimensions, cleanedRawArray);
    }
1165942
public Optional<MapperInstance> getSerializer( JType type ) {
        return Optional.fromNullable( serializers.get( type.getQualifiedSourceName() ) );
    }
1280065
public static <T> AbstractSetJsonDeserializer<T> newInstance( JsonDeserializer<T> deserializer ) {
        return new AbstractSetJsonDeserializer<T>( deserializer );
    }
1212882
public CacheConfigurationBuilder<K, V> withKeySerializer(Serializer<K> keySerializer) {
    return withSerializer(new DefaultSerializerConfiguration<>(requireNonNull(keySerializer, "Null key serializer"), DefaultSerializerConfiguration.Type.KEY));
  }
1264320
public CacheConfigurationBuilder<K, V> withKeySerializer(Class<? extends Serializer<K>> keySerializerClass) {
    return withSerializer(new DefaultSerializerConfiguration<>(requireNonNull(keySerializerClass, "Null key serializer class"), DefaultSerializerConfiguration.Type.KEY));
  }
125647
public Deserializer getCustomDeserializer(Class cl)
    {
        Deserializer deserializer = _customDeserializerMap.get(cl.getName());

        if (deserializer == AbstractDeserializer.NULL)
            return null;
        else if (deserializer != null)
            return deserializer;

        try {
            Class serClass = Class.forName(cl.getName() + "HessianDeserializer",
                false, cl.getClassLoader());

            Deserializer ser = (Deserializer) serClass.newInstance();

            _customDeserializerMap.put(cl.getName(), ser);

            return ser;
        } catch (ClassNotFoundException e) {
            log.log(Level.ALL, e.toString(), e);
        } catch (Exception e) {
            throw new HessianException(e);
        }

        _customDeserializerMap.put(cl.getName(), AbstractDeserializer.NULL);

        return null;
    }
804727
private static function getSerializer(): Serializer
    {
        if (static::$serializer === null) {
            $extractor          = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]);
            static::$serializer = new Serializer(
                [new ObjectNormalizer(null, null, null, $extractor)],
                [new JsonEncoder()]
            );
        }
        return static::$serializer;
    }
86998
private SerializerWrapper getSerializerWrapper(Class cls) {
    SerializerWrapper w = serializers.get(cls);
    if (w != null) {
      return w;
    } else {
      // Try with interfaces implemented
      for (Class c : cls.getInterfaces()) {
        w = serializers.get(c);
        if (w != null) {
          return w;
        }
      }
    }
    return null;
  }
633929
public TypeSerializer<T> getElementSerializer() {
		// call getSerializer() here to get the initialization check and proper error message
		final TypeSerializer<List<T>> rawSerializer = getSerializer();
		if (!(rawSerializer instanceof ListSerializer)) {
			throw new IllegalStateException();
		}

		return ((ListSerializer<T>) rawSerializer).getElementSerializer();
	}
890505
TypeSerializer<?> getSubclassSerializer(Class<?> subclass) {
		TypeSerializer<?> result = subclassSerializerCache.get(subclass);
		if (result == null) {
			result = createSubclassSerializer(subclass);
			subclassSerializerCache.put(subclass, result);
		}
		return result;
	}