public class DefaultCommentGenerator extends Object implements CommentGenerator
| 构造器和说明 |
|---|
DefaultCommentGenerator() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addClassComment(InnerClass innerClass,
IntrospectedTable introspectedTable) |
void |
addClassComment(InnerClass innerClass,
IntrospectedTable introspectedTable,
boolean markAsDoNotDelete) |
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) |
void |
addFieldComment(Field field,
IntrospectedTable introspectedTable) |
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) |
void |
addGetterComment(Method method,
IntrospectedTable introspectedTable,
IntrospectedColumn introspectedColumn) |
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 |
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) |
protected String |
getDateString()
This method returns a formated date string to include in the Javadoc tag
and XML comments.
|
public void addJavaFileComment(CompilationUnit compilationUnit)
CommentGeneratorThe default implementation does nothing.
addJavaFileComment 在接口中 CommentGeneratorcompilationUnit - compilationUnitpublic void addComment(XmlElement xmlElement)
addComment 在接口中 CommentGeneratorxmlElement - xmlElementpublic void addRootComment(XmlElement rootElement)
CommentGeneratorThe default implementation does nothing.
addRootComment 在接口中 CommentGeneratorrootElement - rootElementpublic void addConfigurationProperties(Properties properties)
CommentGeneratoraddConfigurationProperties 在接口中 CommentGeneratorproperties - All properties from the configurationprotected void addJavadocTag(JavaElement javaElement, boolean markAsDoNotDelete)
javaElement - the java elementprotected String getDateString()
public void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable)
addClassComment 在接口中 CommentGeneratorpublic void addClassComment(InnerClass innerClass, IntrospectedTable introspectedTable, boolean markAsDoNotDelete)
addClassComment 在接口中 CommentGeneratorpublic void addEnumComment(InnerEnum innerEnum, IntrospectedTable introspectedTable)
addEnumComment 在接口中 CommentGeneratorpublic 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 - fieldintrospectedTable - introspectedTableintrospectedColumn - introspectedColumnpublic void addFieldComment(Field field, IntrospectedTable introspectedTable)
addFieldComment 在接口中 CommentGeneratorpublic void addGeneralMethodComment(Method method, IntrospectedTable introspectedTable)
addGeneralMethodComment 在接口中 CommentGeneratorpublic void addGetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn)
addGetterComment 在接口中 CommentGeneratorpublic void addSetterComment(Method method, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn)
addSetterComment 在接口中 CommentGeneratorCopyright © 2017. All Rights Reserved.