package com.hap.code.utils; public enum TemplateType { Single,Manager,Tree,TreeManager } [java] view plaincopypackage com.hap.code; import java.io.Serializable; import com.hap.code.utils.TemplateType; public class CodeFactory { public void generateCode(TemplateType templateType,Class... cls) { switch (templateType) { case Single: break; default: break; } }