code: public Registration getRegistration (Class type) {
  		if (type == null) throw new IllegalArgumentException("type cannot be null.");
  
  		Registration registration = classResolver.getRegistration(type);
  		if (registration == null) {
  			if (Proxy.isProxyClass(type)) {
  				// If a Proxy class, treat it like an InvocationHandler because the concrete class for a proxy is generated.
  				registration = getRegistration(InvocationHandler.class);
  			} else if (!type.isEnum() && Enum.class.isAssignableFrom(type) && type != Enum.class) {
  				// This handles an enum value that is an inner class, eg: enum A {b{}}
  				registration = getRegistration(type.getEnclosingClass());
  			} else if (EnumSet.class.isAssignableFrom(type))
  				registration = classResolver.getRegistration(EnumSet.class);
  			else if (isClosure(type)) //
  				registration = classResolver.getRegistration(ClosureSerializer.Closure.class);
  			if (registration == null) {
  				if (registrationRequired) throw new IllegalArgumentException(unregisteredClassMessage(type));
  				if (WARN && warnUnregisteredClasses) warn(unregisteredClassMessage(type));
  				registration = classResolver.registerImplicit(type);
  			}
  		}
  		return registration;
  	}
docs: If the class is not registered and {@link Kryo#setRegistrationRequired(boolean)} is false, it is automatically registered
  using the {@link Kryo#addDefaultSerializer(Class, Class) default serializer}.
  @throws IllegalArgumentException if the class is not registered and {@link Kryo#setRegistrationRequired(boolean)} is true.
  @see ClassResolver#getRegistration(Class)