package it.integry.integrywmsnative.core.settings;

import it.integry.integrywmsnative.core.expansion.RunnableArgs;
import it.integry.integrywmsnative.core.model.StbGestSetup;

public class StbGestSetupReader<T> extends StbGestSetup {

    private RunnableArgs<T> setter;
    private T defaultValue;
    private transient Class<T> clazz;

    public StbGestSetupReader(Class<T> clazz) {
        this.clazz = clazz;
    }

    public StbGestSetupReader<T> setGestName(String gestName) {
        super.setGestName(gestName);
        return this;
    }

    public StbGestSetupReader<T> setSection(String section) {
        super.setSection(section);
        return this;
    }

    public StbGestSetupReader<T> setKeySection(String keySection) {
        super.setKeySection(keySection);
        return this;
    }

    public RunnableArgs<T> getSetter() {
        return setter;
    }

    public StbGestSetupReader<T> setSetter(RunnableArgs<T> setter) {
        this.setter = setter;
        return this;
    }

    public T getDefaultValue() {
        return defaultValue;
    }

    public StbGestSetupReader<T> setDefaultValue(T defaultValue) {
        this.defaultValue = defaultValue;
        return this;
    }

    public Class<T> getClazz() {
        return clazz;
    }

//    public Class<T> reflectClassType() {
//        return ((Class<T>) ((ParameterizedType) getClass()
//                .getGenericSuperclass()).getActualTypeArguments()[0]);
//    }

}
