// Path: cachedfield/src/main/java/com/byoutline/cachedfield/ProviderWithArg.java
// public interface ProviderWithArg<RETURN_TYPE, ARG_TYPE> {
// 
//     RETURN_TYPE get(ARG_TYPE arg);
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/internal/DefaultExecutors.java
// public final class DefaultExecutors {
// 
//     public static Executor createDefaultStateListenerExecutor() {
//         // Execute on same thread.
//         return new Executor() {
//             @Override
//             public void execute(Runnable command) {
//                 command.run();
//             }
//         };
//     }
// 
//     public static ExecutorService createDefaultValueGetterExecutor() {
//         return Executors.newCachedThreadPool();
//     }
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/internal/StubErrorListener.java
// public class StubErrorListener implements ErrorListener {
// 
//     @Override
//     public void valueLoadingFailed(Exception ex) {
//         // ignore
//     }
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/utils/SameSessionIdProvider.java
// public class SameSessionIdProvider implements Provider<String> {
//     @Override
//     public String get() {
//         return "";
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/NullArgumentException.java
// public class NullArgumentException extends IllegalArgumentException {
//     private final static String NULL_EXECUTOR = "Null executors are not allowed. Please set defaults by calling OttoCachedField.init or pass non null executors directly.";
// 
//     public NullArgumentException() {
//         super(NULL_EXECUTOR);
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubErrorListenerWithArg.java
// public class StubErrorListenerWithArg<ARG_TYPE> implements com.byoutline.cachedfield.ErrorListenerWithArg<ARG_TYPE> {
//     @Override
//     public void valueLoadingFailed(Exception ex, ARG_TYPE arg) {
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubSuccessListener.java
// public class StubSuccessListener<RETURN_TYPE> implements SuccessListener<RETURN_TYPE> {
//     @Override
//     public void valueLoaded(RETURN_TYPE return_type) {
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubSuccessListenerWithArg.java
// public class StubSuccessListenerWithArg<RETURN_TYPE, ARG_TYPE> implements SuccessListenerWithArg<RETURN_TYPE, ARG_TYPE> {
//     @Override
//     public void valueLoaded(RETURN_TYPE value, ARG_TYPE arg) {
//     }
// }


import com.byoutline.cachedfield.ProviderWithArg;
import com.byoutline.cachedfield.internal.DefaultExecutors;
import com.byoutline.cachedfield.internal.StubErrorListener;
import com.byoutline.cachedfield.utils.SameSessionIdProvider;
import com.byoutline.observablecachedfield.internal.NullArgumentException;
import com.byoutline.observablecachedfield.internal.StubErrorListenerWithArg;
import com.byoutline.observablecachedfield.internal.StubSuccessListener;
import com.byoutline.observablecachedfield.internal.StubSuccessListenerWithArg;
import javax.annotation.Nonnull;
import javax.inject.Provider;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
        }

        public OverrideDefaultsSetter<ObservableCachedField<RETURN_TYPE>> withCustomStateListenerExecutor(@Nonnull Executor stateListenerExecutor) {
            return builder().withCustomStateListenerExecutor(stateListenerExecutor);
        }

        private OverrideDefaultsSetter<ObservableCachedField<RETURN_TYPE>> builder() {
            return new OverrideDefaultsSetter<>(new ConstructorWrapper<ObservableCachedField<RETURN_TYPE>>() {
                @Override
                public ObservableCachedField<RETURN_TYPE> build(Provider<String> sessionIdProvider, ExecutorService valueGetterExecutor, Executor stateListenerExecutor) {
                    return new ObservableCachedField<>(
                            sessionIdProvider,
                            provider,
                            new StubSuccessListener<RETURN_TYPE>(),
                            new StubErrorListener(),
                            valueGetterExecutor,
                            stateListenerExecutor
                    );
                }
            });
        }

        public ObservableCachedField<RETURN_TYPE> build() {
            return builder().build();
        }
    }

    public static class AsObservableWithArg<RETURN_TYPE, ARG_TYPE> {
        final ProviderWithArg<RETURN_TYPE, ARG_TYPE> provider;

// Path: cachedfield/src/main/java/com/byoutline/cachedfield/ProviderWithArg.java
// public interface ProviderWithArg<RETURN_TYPE, ARG_TYPE> {
// 
//     RETURN_TYPE get(ARG_TYPE arg);
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/internal/DefaultExecutors.java
// public final class DefaultExecutors {
// 
//     public static Executor createDefaultStateListenerExecutor() {
//         // Execute on same thread.
//         return new Executor() {
//             @Override
//             public void execute(Runnable command) {
//                 command.run();
//             }
//         };
//     }
// 
//     public static ExecutorService createDefaultValueGetterExecutor() {
//         return Executors.newCachedThreadPool();
//     }
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/internal/StubErrorListener.java
// public class StubErrorListener implements ErrorListener {
// 
//     @Override
//     public void valueLoadingFailed(Exception ex) {
//         // ignore
//     }
// }
// 
// Path: cachedfield/src/main/java/com/byoutline/cachedfield/utils/SameSessionIdProvider.java
// public class SameSessionIdProvider implements Provider<String> {
//     @Override
//     public String get() {
//         return "";
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/NullArgumentException.java
// public class NullArgumentException extends IllegalArgumentException {
//     private final static String NULL_EXECUTOR = "Null executors are not allowed. Please set defaults by calling OttoCachedField.init or pass non null executors directly.";
// 
//     public NullArgumentException() {
//         super(NULL_EXECUTOR);
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubErrorListenerWithArg.java
// public class StubErrorListenerWithArg<ARG_TYPE> implements com.byoutline.cachedfield.ErrorListenerWithArg<ARG_TYPE> {
//     @Override
//     public void valueLoadingFailed(Exception ex, ARG_TYPE arg) {
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubSuccessListener.java
// public class StubSuccessListener<RETURN_TYPE> implements SuccessListener<RETURN_TYPE> {
//     @Override
//     public void valueLoaded(RETURN_TYPE return_type) {
//     }
// }
// 
// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/internal/StubSuccessListenerWithArg.java
// public class StubSuccessListenerWithArg<RETURN_TYPE, ARG_TYPE> implements SuccessListenerWithArg<RETURN_TYPE, ARG_TYPE> {
//     @Override
//     public void valueLoaded(RETURN_TYPE value, ARG_TYPE arg) {
//     }
// }


// Path: observablecachedfield/src/main/java/com/byoutline/observablecachedfield/ObservableCachedFieldBuilder.java
import com.byoutline.cachedfield.ProviderWithArg;
import com.byoutline.cachedfield.internal.DefaultExecutors;
import com.byoutline.cachedfield.internal.StubErrorListener;
import com.byoutline.cachedfield.utils.SameSessionIdProvider;
import com.byoutline.observablecachedfield.internal.NullArgumentException;
import com.byoutline.observablecachedfield.internal.StubErrorListenerWithArg;
import com.byoutline.observablecachedfield.internal.StubSuccessListener;
import com.byoutline.observablecachedfield.internal.StubSuccessListenerWithArg;
import javax.annotation.Nonnull;
import javax.inject.Provider;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;

        }

        public OverrideDefaultsSetter<ObservableCachedField<RETURN_TYPE>> withCustomStateListenerExecutor(@Nonnull Executor stateListenerExecutor) {
            return builder().withCustomStateListenerExecutor(stateListenerExecutor);
        }

        private OverrideDefaultsSetter<ObservableCachedField<RETURN_TYPE>> builder() {
            return new OverrideDefaultsSetter<>(new ConstructorWrapper<ObservableCachedField<RETURN_TYPE>>() {
                @Override
                public ObservableCachedField<RETURN_TYPE> build(Provider<String> sessionIdProvider, ExecutorService valueGetterExecutor, Executor stateListenerExecutor) {
                    return new ObservableCachedField<>(
                            sessionIdProvider,
                            provider,
                            new StubSuccessListener<RETURN_TYPE>(),
                            new StubErrorListener(),
                            valueGetterExecutor,
                            stateListenerExecutor
                    );
                }
            });
        }

        public ObservableCachedField<RETURN_TYPE> build() {
            return builder().build();
        }
    }

    public static class AsObservableWithArg<RETURN_TYPE, ARG_TYPE> {
        final ProviderWithArg<RETURN_TYPE, ARG_TYPE> provider;

        public AsObservableWithArg(ProviderWithArg<RETURN_TYPE, ARG_TYPE> provider) {