private void readObject(ObjectInputStream inputStream) throws IOException, ClassNotFoundException {
            inputStream.defaultReadObject();
            Method methoD = ReflectionUtils.findMethod(this.declaringClass, this.methodName);
            if (methoD == null) {
                throw new IllegalStateException("Cannot find method on deserialization: " + this.methodName);
            }
            if (methoD.getReturnType() != Type.class && methoD.getReturnType() != Type[].class) {
                throw new IllegalStateException(
                    "Invalid return type on deserialized method - needs to be Type or Type[]: " + methoD);
            }
            this.method = methoD;
        }
{link TypeProvider} for {link Type Types} obtained by invoking a no-arg method.
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/SerializableTypeWrapper.java