001 002package gudusoft.gsqlparser.pp.para.styleenums; 003 004/** 005 * Text-case transformation applied to a parser-classified token group. 006 * 007 * @author zhoujun 008 */ 009public enum TCaseOption { 010 /** Convert every character to upper case. */ 011 CoUppercase, 012 /** Convert every character to lower case. */ 013 CoLowercase, 014 /** Preserve the token text exactly as parsed. */ 015 CoNoChange, 016 /** Upper-case the first character of each space-delimited word and lower-case the rest. */ 017 CoInitCap; 018 019 public static TCaseOption of(String type) { 020 if (type == null) 021 return null; 022 for (TCaseOption value : TCaseOption.values()) { 023 if (value.name().equalsIgnoreCase(type)) { 024 return value; 025 } 026 } 027 return null; 028 } 029}