Annotation Interface Table


@Retention(SOURCE) @Target(TYPE) public @interface Table
apt注解

默认为String.format

举例:

  • 全大写 %S
  • 加APT后缀 %sAPT
  • 加APT前缀 APT%s
  • 加APT后缀并且大写 %SAPT

支持Ognl语法,字段说明
Ognl上下文

  • className 类名
  • classPackage 包名
  • util 工具类 OgnlUtil com.github.yulichang.processor.utils.OgnlUtil , github link
指定开头 Ognl# 这不是ognl语法,这是MPJ规定的 用于区分 ognl还是String.format

举例:

  • 去掉3长度的后缀并且大写 Ognl#className.substring(0, className.length() - 3).toUpperCase()
  • 以“APT”结尾 Ognl#className + 'APT'
  • 全大写并且以“APT”结尾 Ognl#className.toUpperCase() + 'APT'
  • "PO"结尾替换为“APT”且全大写 Ognl#util.replaceSuffix(className, 'PO', 'APT').toUpperCase()

支持 三元运算 String所有方法 如lastIndexOf subString toUpperCase等 Ognl语法

从以下版本开始:
1.5.0
作者:
yulichang
  • 元素详细资料

    • value

      String value
      APT类名

      支持Ognl 默认使用String.format()

      默认值:
      "%sCol"
    • classPackage

      String classPackage
      生成类的包名

      支持Ognl 默认使用String.format()

      默认值:
      "%s.apt"
    • genTables

      boolean genTables
      是否在Tables中生成对应的类字段
      默认值:
      true
    • tablesClassPackage

      String tablesClassPackage
      Tables中的字段名 默认大写的类名

      支持Ognl 默认使用String.format()

      默认值:
      "%s.tables"
    • tablesClassName

      String tablesClassName
      Tables中的字段名 默认大写的类名

      支持Ognl 默认使用String.format()

      默认值:
      "%S"
    • cache

      boolean cache
      是否缓存
      默认值:
      true