public class TemplateCommentGenerator extends Object implements org.mybatis.generator.api.CommentGenerator
| 限定符和类型 | 类和说明 |
|---|---|
static class |
TemplateCommentGenerator.EnumNode
评论模板节点ID
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
TemplateCommentGenerator(org.mybatis.generator.config.Context context,
String templatePath)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addClassAnnotation(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports) |
void |
addClassComment(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
Adds the inner class comment.
|
void |
addClassComment(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
boolean markAsDoNotDelete)
Adds the inner class comment.
|
void |
addComment(org.mybatis.generator.api.dom.xml.XmlElement xmlElement)
This method should add a suitable comment as a child element of the specified xmlElement to warn users that the
element was generated and is subject to regeneration.
|
void |
addConfigurationProperties(Properties properties)
Adds properties for this instance from any properties configured in the
CommentGenerator configuration.
|
void |
addEnumComment(org.mybatis.generator.api.dom.java.InnerEnum innerEnum,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
Adds the enum comment.
|
void |
addFieldAnnotation(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports) |
void |
addFieldAnnotation(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports) |
void |
addFieldComment(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
Adds the field comment.
|
void |
addFieldComment(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
This method should add a Javadoc comment to the specified field.
|
void |
addGeneralMethodAnnotation(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports) |
void |
addGeneralMethodAnnotation(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports) |
void |
addGeneralMethodComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
Adds the general method comment.
|
void |
addGetterComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
Adds the getter comment.
|
void |
addJavaFileComment(org.mybatis.generator.api.dom.java.CompilationUnit compilationUnit)
This method is called to add a file level comment to a generated java file.
|
void |
addModelClassComment(org.mybatis.generator.api.dom.java.TopLevelClass topLevelClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
Adds a comment for a model class.
|
void |
addRootComment(org.mybatis.generator.api.dom.xml.XmlElement rootElement)
This method is called to add a comment as the first child of the root element.
|
void |
addSetterComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
Adds the setter comment.
|
public TemplateCommentGenerator(org.mybatis.generator.config.Context context,
String templatePath)
context - templatePath - 模板路径public void addConfigurationProperties(Properties properties)
addConfigurationProperties 在接口中 org.mybatis.generator.api.CommentGeneratorproperties - All properties from the configurationpublic void addFieldComment(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
Important: This method should add a the nonstandard JavaDoc tag "@mbg.generated" to the comment. Without this tag, the Eclipse based Java merge feature will fail.
addFieldComment 在接口中 org.mybatis.generator.api.CommentGeneratorfield - the fieldintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addFieldComment(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
addFieldComment 在接口中 org.mybatis.generator.api.CommentGeneratorfield - the fieldintrospectedTable - the introspected tablepublic void addModelClassComment(org.mybatis.generator.api.dom.java.TopLevelClass topLevelClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
addModelClassComment 在接口中 org.mybatis.generator.api.CommentGeneratortopLevelClass - the top level classintrospectedTable - the introspected tablepublic void addClassComment(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
addClassComment 在接口中 org.mybatis.generator.api.CommentGeneratorinnerClass - the inner classintrospectedTable - the introspected tablepublic void addClassComment(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
boolean markAsDoNotDelete)
addClassComment 在接口中 org.mybatis.generator.api.CommentGeneratorinnerClass - the inner classintrospectedTable - the introspected tablemarkAsDoNotDelete - the mark as do not deletepublic void addEnumComment(org.mybatis.generator.api.dom.java.InnerEnum innerEnum,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
addEnumComment 在接口中 org.mybatis.generator.api.CommentGeneratorinnerEnum - the inner enumintrospectedTable - the introspected tablepublic void addGetterComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
addGetterComment 在接口中 org.mybatis.generator.api.CommentGeneratormethod - the methodintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addSetterComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn)
addSetterComment 在接口中 org.mybatis.generator.api.CommentGeneratormethod - the methodintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addGeneralMethodComment(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable)
addGeneralMethodComment 在接口中 org.mybatis.generator.api.CommentGeneratormethod - the methodintrospectedTable - the introspected tablepublic void addJavaFileComment(org.mybatis.generator.api.dom.java.CompilationUnit compilationUnit)
The default implementation does nothing.
addJavaFileComment 在接口中 org.mybatis.generator.api.CommentGeneratorcompilationUnit - the compilation unitpublic void addComment(org.mybatis.generator.api.dom.xml.XmlElement xmlElement)
addComment 在接口中 org.mybatis.generator.api.CommentGeneratorxmlElement - the xml elementpublic void addRootComment(org.mybatis.generator.api.dom.xml.XmlElement rootElement)
The default implementation does nothing.
addRootComment 在接口中 org.mybatis.generator.api.CommentGeneratorrootElement - the root elementpublic void addGeneralMethodAnnotation(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports)
addGeneralMethodAnnotation 在接口中 org.mybatis.generator.api.CommentGeneratorpublic void addGeneralMethodAnnotation(org.mybatis.generator.api.dom.java.Method method,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports)
addGeneralMethodAnnotation 在接口中 org.mybatis.generator.api.CommentGeneratorpublic void addFieldAnnotation(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports)
addFieldAnnotation 在接口中 org.mybatis.generator.api.CommentGeneratorpublic void addFieldAnnotation(org.mybatis.generator.api.dom.java.Field field,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
org.mybatis.generator.api.IntrospectedColumn introspectedColumn,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports)
addFieldAnnotation 在接口中 org.mybatis.generator.api.CommentGeneratorpublic void addClassAnnotation(org.mybatis.generator.api.dom.java.InnerClass innerClass,
org.mybatis.generator.api.IntrospectedTable introspectedTable,
Set<org.mybatis.generator.api.dom.java.FullyQualifiedJavaType> imports)
addClassAnnotation 在接口中 org.mybatis.generator.api.CommentGeneratorCopyright © 2019. All rights reserved.