2020-11-11 00:54:28 +01:00
|
|
|
package speiger.src.builder.processor;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Collection;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Set;
|
|
|
|
import java.util.function.UnaryOperator;
|
|
|
|
|
|
|
|
public class TemplateProcess
|
|
|
|
{
|
2020-11-11 21:33:59 +01:00
|
|
|
UnaryOperator pathBuilder;
|
2020-11-11 00:54:28 +01:00
|
|
|
String fileName;
|
|
|
|
Set<String> parsePool = new HashSet<>();
|
|
|
|
List<UnaryOperator<String>> mappers = new ArrayList<>();
|
|
|
|
|
2020-11-11 21:33:59 +01:00
|
|
|
public TemplateProcess(String fileName)
|
2020-11-11 00:54:28 +01:00
|
|
|
{
|
|
|
|
this.fileName = fileName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void addFlags(String...flags)
|
|
|
|
{
|
|
|
|
parsePool.addAll(Arrays.asList(flags));
|
|
|
|
}
|
|
|
|
|
|
|
|
public void addMapper(UnaryOperator<String> mapper)
|
|
|
|
{
|
|
|
|
mappers.add(mapper);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void addMappers(Collection<UnaryOperator<String>> mappers)
|
|
|
|
{
|
|
|
|
this.mappers.addAll(mappers);
|
|
|
|
}
|
|
|
|
}
|