类 CodeUtils

java.lang.Object
com.jeeplus.devtools.util.CodeUtils

public class CodeUtils extends Object
代码生成工具类
版本:
2021-09-16
作者:
jeeplus
  • 字段详细资料

    • versionType

      public static String versionType
    • versionNum

      public static String versionNum
    • publicKey

      public static String publicKey
    • module

      public static String module
    • computer

      public static String computer
  • 构造器详细资料

    • CodeUtils

      public CodeUtils()
  • 方法详细资料

    • getM

      public static String getM()
    • getSerial

      public static String getSerial(String license)
    • getJavaTypeByLabel

      public static String getJavaTypeByLabel(String type)
    • initColumnField

      public static void initColumnField(TableDTO genTable)
      初始化列属性字段
      参数:
      genTable -
    • getTemplatePath

      public static String getTemplatePath()
      获取模板路径
      返回:
    • xmlToObject

      public static <T> T xmlToObject(String xmlContent, Class<?> clazz)
    • getTemplateListByObj

      public static List<TemplateDTO> getTemplateListByObj(List<TemplateObj> genCodeTemplateObjList, boolean isChildTable)
      根据分类获取模板列表
      参数:
      isChildTable - 是否是子表
      返回:
    • getDataModel

      public static Map<String,Object> getDataModel(SchemeDTO schemeDTO)
      获取数据模型
      参数:
      schemeDTO -
      返回:
    • trimStart

      public static String trimStart(String str)
      把String字符串开头的空格去掉,结尾的空格不管
    • generateToFile

      public static String generateToFile(SchemeDTO schemeDTO, TemplateDTO tpl, Map<String,Object> model, boolean isReplaceFile, String projectPath) throws Exception
      生成到文件
      参数:
      tpl -
      model -
      返回:
      抛出:
      Exception
    • getFormatDate

      public static String getFormatDate(Date date, String str)
    • getNetWorkTime

      public static String getNetWorkTime()
    • getMotherboardSN

      public static String getMotherboardSN()
      获取主板序列号
      返回:
    • getHardDiskSN

      public static String getHardDiskSN(String drive)
      获取硬盘序列号
      参数:
      drive - 盘符
      返回:
    • getCPUSerial

      public static String getCPUSerial()
      获取CPU序列号
      返回:
    • getMac

      public static String getMac()
      获取MAC地址
    • getRegisterInfo

      public static String getRegisterInfo()
    • transferString2Date

      public static Date transferString2Date(String s)
    • getCurrentTime

      public static long getCurrentTime()
    • main

      public static void main(String[] args) throws Exception
      抛出:
      Exception