@ SuppressWarnings ( "rawtypes" ) public void registerTypeWithKryoSerializer ( Class < ? > type , Class < ? extends Serializer > serializerClass ) { if ( type == null || serializerClass == null ) { throw new NullPointerException ( "Cannot register null class or serializer." ) ; } @ SuppressWarnings ( "unchecked" ) Class < ? extends Serializer < ? > > castedSerializerClass = ( Class < ? extends Serializer < ? > > ) serializerClass ; registeredTypesWithKryoSerializerClasses . put ( type , castedSerializerClass ) ; }
Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer