// Path: substratum-template-patcher/src/main/java/com/pddstudio/substratum/template/patcher/internal/LinePatcher.java
// public abstract class LinePatcher implements Patcher<String, String, String> {
// 
// 	@Override
// 	public String patch(String target, String key, String value) {
// 		return patchLine(target, key, value);
// 	}
// 
// 	public abstract String patchLine(String line, String targetKey, String replacementValue);
// }
// 
// Path: substratum-template-patcher/src/main/java/com/pddstudio/substratum/template/patcher/internal/model/JsonConfigModel.java
// public class JsonConfigModel implements Serializable, ThemeConfiguration {
// 
// 	@SerializedName("themeName")
// 	private String themeName;
// 
// 	@SerializedName("themeAuthor")
// 	private String themeAuthor;
// 
// 	@SerializedName("themeTemplates")
// 	private List<Template> templateList;
// 
// 	@Override
// 	public String getThemeName() {
// 		return themeName;
// 	}
// 
// 	@Override
// 	public String getThemeAuthor() {
// 		return themeAuthor;
// 	}
// 
// 	@Override
// 	public List<TemplateConfiguration> getThemeTemplates() {
// 		List<TemplateConfiguration> configurations = new ArrayList<>();
// 		StreamSupport.stream(templateList).filter(Objects::nonNull).forEach(configurations::add);
// 		return configurations;
// 	}
// 
// }


import android.util.Log;
import com.google.gson.Gson;
import com.pddstudio.substratum.template.patcher.internal.LinePatcher;
import com.pddstudio.substratum.template.patcher.internal.model.JsonConfigModel;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java8.util.stream.Collectors;
import java8.util.stream.StreamSupport;
package com.pddstudio.substratum.template.patcher;






/**
 * Created by pddstudio on 25/04/2017.
 */

public class TemplatePatcher {

	private static final String TAG = TemplatePatcher.class.getSimpleName();

// Path: substratum-template-patcher/src/main/java/com/pddstudio/substratum/template/patcher/internal/LinePatcher.java
// public abstract class LinePatcher implements Patcher<String, String, String> {
// 
// 	@Override
// 	public String patch(String target, String key, String value) {
// 		return patchLine(target, key, value);
// 	}
// 
// 	public abstract String patchLine(String line, String targetKey, String replacementValue);
// }
// 
// Path: substratum-template-patcher/src/main/java/com/pddstudio/substratum/template/patcher/internal/model/JsonConfigModel.java
// public class JsonConfigModel implements Serializable, ThemeConfiguration {
// 
// 	@SerializedName("themeName")
// 	private String themeName;
// 
// 	@SerializedName("themeAuthor")
// 	private String themeAuthor;
// 
// 	@SerializedName("themeTemplates")
// 	private List<Template> templateList;
// 
// 	@Override
// 	public String getThemeName() {
// 		return themeName;
// 	}
// 
// 	@Override
// 	public String getThemeAuthor() {
// 		return themeAuthor;
// 	}
// 
// 	@Override
// 	public List<TemplateConfiguration> getThemeTemplates() {
// 		List<TemplateConfiguration> configurations = new ArrayList<>();
// 		StreamSupport.stream(templateList).filter(Objects::nonNull).forEach(configurations::add);
// 		return configurations;
// 	}
// 
// }


// Path: substratum-template-patcher/src/main/java/com/pddstudio/substratum/template/patcher/TemplatePatcher.java
import android.util.Log;
import com.google.gson.Gson;
import com.pddstudio.substratum.template.patcher.internal.LinePatcher;
import com.pddstudio.substratum.template.patcher.internal.model.JsonConfigModel;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java8.util.stream.Collectors;
import java8.util.stream.StreamSupport;

package com.pddstudio.substratum.template.patcher;






/**
 * Created by pddstudio on 25/04/2017.
 */

public class TemplatePatcher {

	private static final String TAG = TemplatePatcher.class.getSimpleName();

	private final LinePatcher           linePatcher;