package data;

/**
 * Build types recognised by the Build functionality
 * 
 * @author Lisa Nguyen Quang Do
 */

public enum BuildType {
	ANT("ant"), ANDROID("android"), ECLIPSE("eclipse"), GRADLE("gradle"), INTELLIJ("intellij"), MAVEN("maven"), UNKNOWN(
			"unknown");

	private String name;

	BuildType(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return this.name;
	}

	public static BuildType getBuildType(String name) {
		switch (name) {
		case "ant":
			return BuildType.ANT;
		case "android":
			return BuildType.ANDROID;
		case "eclipse":
			return BuildType.ECLIPSE;
		case "gradle":
			return BuildType.GRADLE;
		case "intellij":
			return BuildType.INTELLIJ;
		case "maven":
			return BuildType.MAVEN;
		default:
			return BuildType.UNKNOWN;
		}
	}
}
