public class DefaultCommentGenerator extends Object implements CommentGenerator
| 构造器和说明 |
|---|
DefaultCommentGenerator()
Instantiates a new default comment generator.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addClassComment(InnerClass innerClass,
IntrospectedTable introspectedTable)
Adds the inner class comment.
|
void |
addClassComment(InnerClass innerClass,
IntrospectedTable introspectedTable,
boolean markAsDoNotDelete)
Adds the inner class comment.
|
void |
addComment(XmlElement xmlElement)
Adds a suitable comment to warn users that the element was generated, and when it was generated.
|
void |
addConfigurationProperties(Properties properties)
Adds properties for this instance from any properties configured in the
CommentGenerator configuration.
|
void |
addEnumComment(InnerEnum innerEnum,
IntrospectedTable introspectedTable)
Adds the enum comment.
|
void |
addFieldComment(Field field,
IntrospectedTable introspectedTable)
Adds the field comment.
|
void |
addFieldComment(Field field,
IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn)
This method should add a Javadoc comment to the specified field.
|
void |
addGeneralMethodComment(Method method,
IntrospectedTable introspectedTable)
Adds the general method comment.
|
void |
addGetterComment(Method method,
IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn)
Adds the getter comment.
|
protected void |
addJavadocTag(JavaElement javaElement,
boolean markAsDoNotDelete)
This method adds the custom javadoc tag for.
|
void |
addJavaFileComment(CompilationUnit compilationUnit)
This method is called to add a file level comment to a generated java file.
|
void |
addModelClassComment(TopLevelClass topLevelClass,
IntrospectedTable introspectedTable)
Adds a comment for a model class.
|
void |
addRootComment(XmlElement rootElement)
This method is called to add a comment as the first child of the root element.
|
void |
addSetterComment(Method method,
IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn)
Adds the setter comment.
|
protected String |
getDateString()
This method returns a formated date string to include in the Javadoc tag
and XML comments.
|
public DefaultCommentGenerator()
public void addJavaFileComment(CompilationUnit compilationUnit)
CommentGeneratorThe default implementation does nothing.
addJavaFileComment 在接口中 CommentGeneratorcompilationUnit - the compilation unitpublic void addComment(XmlElement xmlElement)
addComment 在接口中 CommentGeneratorxmlElement - the xml elementpublic void addRootComment(XmlElement rootElement)
CommentGeneratorThe default implementation does nothing.
addRootComment 在接口中 CommentGeneratorrootElement - the root elementpublic void addConfigurationProperties(Properties properties)
CommentGeneratoraddConfigurationProperties 在接口中 CommentGeneratorproperties - All properties from the configurationprotected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete)
javaElement - the java elementmarkAsDoNotDelete - the mark as do not deleteprotected String getDateString()
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable)
CommentGeneratoraddClassComment 在接口中 CommentGeneratorinnerClass - the inner classintrospectedTable - the introspected tablepublic void addModelClassComment(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
CommentGeneratoraddModelClassComment 在接口中 CommentGeneratortopLevelClass - the top level classintrospectedTable - the introspected tablepublic void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable)
CommentGeneratoraddEnumComment 在接口中 CommentGeneratorinnerEnum - the inner enumintrospectedTable - the introspected tablepublic void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn)
CommentGeneratorImportant: This method should add a the nonstandard JavaDoc tag "@mbggenerated" to the comment. Without this tag, the Eclipse based Java merge feature will fail.
addFieldComment 在接口中 CommentGeneratorfield - the fieldintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addFieldComment(Field field, IntrospectedTable introspectedTable)
CommentGeneratoraddFieldComment 在接口中 CommentGeneratorfield - the fieldintrospectedTable - the introspected tablepublic void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable)
CommentGeneratoraddGeneralMethodComment 在接口中 CommentGeneratormethod - the methodintrospectedTable - the introspected tablepublic void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn)
CommentGeneratoraddGetterComment 在接口中 CommentGeneratormethod - the methodintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn)
CommentGeneratoraddSetterComment 在接口中 CommentGeneratormethod - the methodintrospectedTable - the introspected tableintrospectedColumn - the introspected columnpublic void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete)
CommentGeneratoraddClassComment 在接口中 CommentGeneratorinnerClass - the inner classintrospectedTable - the introspected tablemarkAsDoNotDelete - the mark as do not deleteCopyright © 2006–2016 MyBatis.org. All rights reserved.