Package com.google.googlejavaformat.java
Class JavaCommentsHelper
java.lang.Object
com.google.googlejavaformat.java.JavaCommentsHelper
- All Implemented Interfaces:
CommentsHelper
JavaCommentsHelper extends CommentsHelper to rewrite Java comments.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate final Stringprivate final JavaFormatterOptionsFields inherited from interface com.google.googlejavaformat.CommentsHelper
PARAMETER_COMMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringindentJavadoc(List<String> lines, int column0) private StringindentLineComments(List<String> lines, int column0) private static booleanjavadocShaped(List<String> lines) private StringpreserveIndentation(List<String> lines, int column0) Try to rewrite comments, returning rewritten text.wrapLineComments(List<String> lines, int column0)
-
Field Details
-
lineSeparator
-
options
-
LINE_COMMENT_MISSING_SPACE_PREFIX
-
-
Constructor Details
-
JavaCommentsHelper
-
-
Method Details
-
rewrite
Description copied from interface:CommentsHelperTry to rewrite comments, returning rewritten text.- Specified by:
rewritein interfaceCommentsHelper- Parameters:
tok- the comment's tokmaxWidth- the line length for the outputcolumn0- the current column- Returns:
- the rewritten comment
-
preserveIndentation
-
indentLineComments
-
wrapLineComments
-
indentJavadoc
-
javadocShaped
-