// Path: lib/src/main/java/com/yheriatovych/reductor/Reducer.java
// public interface Reducer<State> {
//     /**
//      * Produce new state based on current state and action to dispatch.
//      * <p>
//      * Reducer is responsible to populate initial state if null is passed as 'state' argument
//      * <p>
//      * Note:
//      * This function should be pure. No side effects, no API calls!
//      *
//      * @param state  state to be reduced
//      * @param action minimum representation of change to be performed on state
//      * @return a new state
//      */
//     State reduce(State state, Action action);
// }


import com.google.auto.common.MoreTypes;
import com.squareup.javapoet.AnnotationSpec;
import com.yheriatovych.reductor.Reducer;
import javax.annotation.Generated;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import java.util.ArrayList;
import java.util.List;
package com.yheriatovych.reductor.processor;



public class Utils {

    public interface Func1<T, R> {
        R call(T value);
    }

    public interface Func2<T1, T2, R> {
        R call(T1 value1, T2 value2);
    }

    public static DeclaredType getReducerSuperInterface(DeclaredType reducerType) {
        List<? extends TypeMirror> supertypes = MoreTypes.asTypeElement(reducerType).getInterfaces();

        for (TypeMirror supertype : supertypes) {
// Path: lib/src/main/java/com/yheriatovych/reductor/Reducer.java
// public interface Reducer<State> {
//     /**
//      * Produce new state based on current state and action to dispatch.
//      * <p>
//      * Reducer is responsible to populate initial state if null is passed as 'state' argument
//      * <p>
//      * Note:
//      * This function should be pure. No side effects, no API calls!
//      *
//      * @param state  state to be reduced
//      * @param action minimum representation of change to be performed on state
//      * @return a new state
//      */
//     State reduce(State state, Action action);
// }


// Path: compiller/src/main/java/com/yheriatovych/reductor/processor/Utils.java
import com.google.auto.common.MoreTypes;
import com.squareup.javapoet.AnnotationSpec;
import com.yheriatovych.reductor.Reducer;
import javax.annotation.Generated;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;
import java.util.ArrayList;
import java.util.List;

package com.yheriatovych.reductor.processor;



public class Utils {

    public interface Func1<T, R> {
        R call(T value);
    }

    public interface Func2<T1, T2, R> {
        R call(T1 value1, T2 value2);
    }

    public static DeclaredType getReducerSuperInterface(DeclaredType reducerType) {
        List<? extends TypeMirror> supertypes = MoreTypes.asTypeElement(reducerType).getInterfaces();

        for (TypeMirror supertype : supertypes) {
            boolean isReducer = MoreTypes.isTypeOf(Reducer.class, supertype);