Package net.anotheria.asg.generator
Class CommentGenerator
- java.lang.Object
-
- net.anotheria.asg.generator.AbstractGenerator
-
- net.anotheria.asg.generator.CommentGenerator
-
public class CommentGenerator extends AbstractGenerator
Helper class that generates comments.- Version:
- $Id: $Id
- Author:
- another
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOMM_ENDConstant for comments in generated code.static java.lang.StringCOMM_STARTConstant for comments in generated code.static java.lang.StringCOPYRIGHTCopyright string in the comments.static java.lang.StringLINE_POSTConstant for comments in generated code.static java.lang.StringLINE_PREConstant for comments in generated code.static intLINES_ADD_LENGTHConstant for comments in generated code.static java.lang.StringNOTICE_1Constant for comments in generated code.static java.lang.StringNOTICE_2Constant for comments in generated code.static java.lang.StringNOTICE_3Constant for comments in generated code.static java.lang.StringRIGHTSConstantRIGHTS="All Rights Reserved."static java.lang.StringSEPARATORConstant for comments in generated code.-
Fields inherited from class net.anotheria.asg.generator.AbstractGenerator
CRLF, ident
-
-
Constructor Summary
Constructors Constructor Description CommentGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgenerateJavaTypeComment(java.lang.String className)Deprecated.use generateJavaTypeComment(String className, IGenerator generator) insteadstatic java.lang.StringgenerateJavaTypeComment(java.lang.String className, java.lang.String additionalInfo)Generates and returns java file comment for given class.static java.lang.StringgenerateJavaTypeComment(java.lang.String className, IGenerator generator)Returns a java file comment for given class and a generator.-
Methods inherited from class net.anotheria.asg.generator.AbstractGenerator
append, appendCatch, appendCatch, appendComment, appendComment, appendCommentLine, appendCommentLine, appendEmptyline, appendGenerationPoint, appendImport, appendImport, appendIncreasedStatement, appendIncreasedStatement, appendIncreasedString, appendIncreasedString, appendMark, appendNullCheck, appendStatement, appendStatement, appendString, appendString, closeBlock, closeBlock, closeBlock, closeBlockNEW, createMultilingualList, decreaseIdent, emptyline, emptyline, getCurrentJob, getCurrentJobContent, getElementLanguage, increaseIdent, openFun, openTry, quote, quote, quote, resetIdent, startClassBody, startNewJob, writeComment, writeCommentLine, writeEmptyline, writeImport, writeImport, writeIncreasedStatement, writeIncreasedString, writeStatement, writeString
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
Copyright string in the comments.- See Also:
- Constant Field Values
-
RIGHTS
public static final java.lang.String RIGHTS
ConstantRIGHTS="All Rights Reserved."- See Also:
- Constant Field Values
-
NOTICE_1
public static final java.lang.String NOTICE_1
Constant for comments in generated code.- See Also:
- Constant Field Values
-
NOTICE_2
public static final java.lang.String NOTICE_2
Constant for comments in generated code.- See Also:
- Constant Field Values
-
NOTICE_3
public static final java.lang.String NOTICE_3
Constant for comments in generated code.- See Also:
- Constant Field Values
-
LINE_PRE
public static final java.lang.String LINE_PRE
Constant for comments in generated code.- See Also:
- Constant Field Values
-
LINE_POST
public static final java.lang.String LINE_POST
Constant for comments in generated code.- See Also:
- Constant Field Values
-
LINES_ADD_LENGTH
public static final int LINES_ADD_LENGTH
Constant for comments in generated code.
-
SEPARATOR
public static final java.lang.String SEPARATOR
Constant for comments in generated code.- See Also:
- Constant Field Values
-
COMM_START
public static final java.lang.String COMM_START
Constant for comments in generated code.- See Also:
- Constant Field Values
-
COMM_END
public static final java.lang.String COMM_END
Constant for comments in generated code.- See Also:
- Constant Field Values
-
-
Method Detail
-
generateJavaTypeComment
public static final java.lang.String generateJavaTypeComment(java.lang.String className)
Deprecated.use generateJavaTypeComment(String className, IGenerator generator) insteadReturns a java file comment for given class.- Parameters:
className- the name of the commented class.- Returns:
- return the content of a comment.
-
generateJavaTypeComment
public static final java.lang.String generateJavaTypeComment(java.lang.String className, IGenerator generator)Returns a java file comment for given class and a generator.- Parameters:
className- the name of the commented class.generator- the name/class of the generator which generated the code.- Returns:
- return the content of a comment.
-
generateJavaTypeComment
public static final java.lang.String generateJavaTypeComment(java.lang.String className, java.lang.String additionalInfo)Generates and returns java file comment for given class. Includes additional line(s) supplied by the user.- Parameters:
className- the class to commentadditionalInfo- an info string to add to the content- Returns:
- the comment for the class.
-
-