// Path: java2typescript-jackson/src/main/java/java2typescript/jackson/module/grammar/base/AbstractNamedType.java
// abstract public class AbstractNamedType extends AbstractType {
// 
// 	protected final String name;
// 
// 	public AbstractNamedType(String className) {
// 		this.name = className;
// 	}
// 
// 	@Override
// 	public void write(Writer writer) throws IOException {
// 		writer.write(name);
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public void writeDef(Writer writer, WriterPreferences preferences) throws IOException {
// 		if(!preferences.hasCustomWriter(this)) {
// 			writeDefInternal(writer, preferences);
// 		} else {
// 			preferences.writeDef(this, writer);
// 		}
// 	}
// 
// 	abstract public void writeDefInternal(Writer writer, WriterPreferences preferences) throws IOException;
// }


import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import java2typescript.jackson.module.grammar.base.AbstractNamedType;
package java2typescript.jackson.module.writer;



public class WriterPreferences {
	private String indentationStep = "    ";
	private int indentationLevel = 0;

	private List<CustomAbstractTypeWriter> customWriters = new ArrayList<CustomAbstractTypeWriter>();
	private boolean useEnumPattern;
	private boolean enumAsStringLiteralType = false;
	private boolean constantsForStringLiteralTypeEnums = false;
	/** sort types and vars in output */
	private boolean sort;

	public boolean isStringLiteralTypeForEnums() {
		return enumAsStringLiteralType;
	}

	public void useStringLiteralTypeForEnums(boolean withConstants) {
		addWriter(new EnumTypeToStringLiteralTypeWriter());
		this.enumAsStringLiteralType = true;
		this.constantsForStringLiteralTypeEnums = withConstants;
	}

	public void useStringLiteralTypeForEnums() {
		useStringLiteralTypeForEnums(false);
	}

	public boolean isConstantsForStringLiteralTypeEnums() {
		return this.constantsForStringLiteralTypeEnums;
	}
	
	public void useEnumPattern() {
		addWriter(new EnumTypeToEnumPatternWriter());
		useEnumPattern = true;
	}

	public boolean isUseEnumPattern() {
		return useEnumPattern;
	}
	
	public void sort() {
		sort = true;
	}
	
	public boolean isSort() {
		return sort;
	}

	public void addWriter(CustomAbstractTypeWriter writer) {
		this.customWriters.add(writer);
	}

	public List<CustomAbstractTypeWriter> getCustomWriters() {
		return customWriters;
	}

// Path: java2typescript-jackson/src/main/java/java2typescript/jackson/module/grammar/base/AbstractNamedType.java
// abstract public class AbstractNamedType extends AbstractType {
// 
// 	protected final String name;
// 
// 	public AbstractNamedType(String className) {
// 		this.name = className;
// 	}
// 
// 	@Override
// 	public void write(Writer writer) throws IOException {
// 		writer.write(name);
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public void writeDef(Writer writer, WriterPreferences preferences) throws IOException {
// 		if(!preferences.hasCustomWriter(this)) {
// 			writeDefInternal(writer, preferences);
// 		} else {
// 			preferences.writeDef(this, writer);
// 		}
// 	}
// 
// 	abstract public void writeDefInternal(Writer writer, WriterPreferences preferences) throws IOException;
// }


// Path: java2typescript-jackson/src/main/java/java2typescript/jackson/module/writer/WriterPreferences.java
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
import java2typescript.jackson.module.grammar.base.AbstractNamedType;

package java2typescript.jackson.module.writer;



public class WriterPreferences {
	private String indentationStep = "    ";
	private int indentationLevel = 0;

	private List<CustomAbstractTypeWriter> customWriters = new ArrayList<CustomAbstractTypeWriter>();
	private boolean useEnumPattern;
	private boolean enumAsStringLiteralType = false;
	private boolean constantsForStringLiteralTypeEnums = false;
	/** sort types and vars in output */
	private boolean sort;

	public boolean isStringLiteralTypeForEnums() {
		return enumAsStringLiteralType;
	}

	public void useStringLiteralTypeForEnums(boolean withConstants) {
		addWriter(new EnumTypeToStringLiteralTypeWriter());
		this.enumAsStringLiteralType = true;
		this.constantsForStringLiteralTypeEnums = withConstants;
	}

	public void useStringLiteralTypeForEnums() {
		useStringLiteralTypeForEnums(false);
	}

	public boolean isConstantsForStringLiteralTypeEnums() {
		return this.constantsForStringLiteralTypeEnums;
	}
	
	public void useEnumPattern() {
		addWriter(new EnumTypeToEnumPatternWriter());
		useEnumPattern = true;
	}

	public boolean isUseEnumPattern() {
		return useEnumPattern;
	}
	
	public void sort() {
		sort = true;
	}
	
	public boolean isSort() {
		return sort;
	}

	public void addWriter(CustomAbstractTypeWriter writer) {
		this.customWriters.add(writer);
	}

	public List<CustomAbstractTypeWriter> getCustomWriters() {
		return customWriters;
	}

	public boolean hasCustomWriter(AbstractNamedType type) {