/** * 获取模板引擎实例 * * @param pTemplateType 引擎类型 * @return 返回模板引擎实例 */ public static TemplateEngine getTemplateEngine(TemplateType pType) { if (pType == null) { return null; } if (ENGINES.containsKey(pType) == false) { throw new IllegalArgumentException( G4Constants.Exception_Head + "不支持的模板类别:" + pType.getType()); } return (TemplateEngine) ENGINES.get(pType); }