// 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/Env.java
// public class Env {
//     private final Types types;
//     private final Elements elements;
//     private final Messager messager;
//     private final Filer filer;
// 
//     public Env(Types types, Elements elements, Messager messager, Filer filer) {
//         this.types = types;
//         this.elements = elements;
//         this.messager = messager;
//         this.filer = filer;
//     }
// 
//     public void printError(Element element, String message, Object... args) {
//         printMessage(Diagnostic.Kind.ERROR, element, message, args);
//     }
// 
//     private void printMessage(Diagnostic.Kind level, Element element, String message, Object... args) {
//         messager.printMessage(level, String.format(message, args), element);
//     }
// 
//     public Types getTypes() {
//         return types;
//     }
// 
//     public Filer getFiler() {
//         return filer;
//     }
// 
//     public String getPackageName(Element element) {
//         return elements.getPackageOf(element).getQualifiedName().toString();
//     }
// 
//     public TypeMirror asType(Class<?> clazz) {
//         return elements.getTypeElement(clazz.getCanonicalName())
//                 .asType();
//     }
// 
//     public Elements getElements() {
//         return elements;
//     }
// }
// 
// Path: compiller/src/main/java/com/yheriatovych/reductor/processor/ValidationException.java
// public class ValidationException extends Exception {
//     private final Element element;
//     private final String message;
// 
//     public ValidationException(Element element, String message, Object... args) {
//         this.element = element;
//         this.message = String.format(message, args);
//     }
// 
//     public Element getElement() {
//         return element;
//     }
// 
//     @Override
//     public String getMessage() {
//         return message;
//     }
// 
// }


import com.google.auto.common.MoreTypes;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.yheriatovych.reductor.Reducer;
import com.yheriatovych.reductor.processor.Env;
import com.yheriatovych.reductor.processor.ValidationException;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
package com.yheriatovych.reductor.processor.combinedstate;



public class StateProperty {
    public final String name;
    public final TypeMirror stateType;
    public final ExecutableElement executableElement;

    private StateProperty(String name, TypeMirror stateType, ExecutableElement executableElement) {
        this.name = name;
        this.stateType = stateType;
        this.executableElement = executableElement;
    }

// 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/Env.java
// public class Env {
//     private final Types types;
//     private final Elements elements;
//     private final Messager messager;
//     private final Filer filer;
// 
//     public Env(Types types, Elements elements, Messager messager, Filer filer) {
//         this.types = types;
//         this.elements = elements;
//         this.messager = messager;
//         this.filer = filer;
//     }
// 
//     public void printError(Element element, String message, Object... args) {
//         printMessage(Diagnostic.Kind.ERROR, element, message, args);
//     }
// 
//     private void printMessage(Diagnostic.Kind level, Element element, String message, Object... args) {
//         messager.printMessage(level, String.format(message, args), element);
//     }
// 
//     public Types getTypes() {
//         return types;
//     }
// 
//     public Filer getFiler() {
//         return filer;
//     }
// 
//     public String getPackageName(Element element) {
//         return elements.getPackageOf(element).getQualifiedName().toString();
//     }
// 
//     public TypeMirror asType(Class<?> clazz) {
//         return elements.getTypeElement(clazz.getCanonicalName())
//                 .asType();
//     }
// 
//     public Elements getElements() {
//         return elements;
//     }
// }
// 
// Path: compiller/src/main/java/com/yheriatovych/reductor/processor/ValidationException.java
// public class ValidationException extends Exception {
//     private final Element element;
//     private final String message;
// 
//     public ValidationException(Element element, String message, Object... args) {
//         this.element = element;
//         this.message = String.format(message, args);
//     }
// 
//     public Element getElement() {
//         return element;
//     }
// 
//     @Override
//     public String getMessage() {
//         return message;
//     }
// 
// }


// Path: compiller/src/main/java/com/yheriatovych/reductor/processor/combinedstate/StateProperty.java
import com.google.auto.common.MoreTypes;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.yheriatovych.reductor.Reducer;
import com.yheriatovych.reductor.processor.Env;
import com.yheriatovych.reductor.processor.ValidationException;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.Modifier;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;

package com.yheriatovych.reductor.processor.combinedstate;



public class StateProperty {
    public final String name;
    public final TypeMirror stateType;
    public final ExecutableElement executableElement;

    private StateProperty(String name, TypeMirror stateType, ExecutableElement executableElement) {
        this.name = name;
        this.stateType = stateType;
        this.executableElement = executableElement;
    }

    public TypeMirror boxedStateType(Env env) {