Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions core/src/main/java/com/google/googlejavaformat/CloseOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@

import com.google.common.base.MoreObjects;

/**
* A {@code CloseOp} closes a level. It is an {@link Op} in the sequence of {@link Op}s generated by
* {@link OpsBuilder}. When the sequence is turned into a {@link Doc} by {@link DocBuilder}, ranges
* delimited by {@link OpenOp}-{@code CloseOp} pairs turn into nested {@link Doc.Level}s.
*/
/// A `CloseOp` closes a level. It is an [Op] in the sequence of [Op]s generated by [OpsBuilder].
/// When the sequence is turned into a [Doc] by [DocBuilder], ranges delimited by [OpenOp]-`CloseOp`
/// pairs turn into nested [Doc.Level]s.
public enum CloseOp implements Op {
CLOSE;

/**
* Make a {@code CloseOp}, returning a singleton since they are all the same.
*
* @return the singleton {@code CloseOp}
*/
/// Make a `CloseOp`, returning a singleton since they are all the same.
///
/// @return the singleton `CloseOp`
public static Op make() {
return CLOSE;
}
Expand Down
20 changes: 8 additions & 12 deletions core/src/main/java/com/google/googlejavaformat/CommentsHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@
import java.util.Optional;
import java.util.regex.Pattern;

/**
* Rewrite comments. This interface is implemented by {@link
* com.google.googlejavaformat.java.JavaCommentsHelper JavaCommentsHelper}.
*/
/// Rewrite comments. This interface is implemented by
/// [`JavaCommentsHelper`][com.google.googlejavaformat.java.JavaCommentsHelper].
public interface CommentsHelper {
/**
* Try to rewrite comments, returning rewritten text.
*
* @param tok the comment's tok
* @param maxWidth the line length for the output
* @param column0 the current column
* @return the rewritten comment
*/
/// Try to rewrite comments, returning rewritten text.
///
/// @param tok the comment's tok
/// @param maxWidth the line length for the output
/// @param column0 the current column
/// @return the rewritten comment
String rewrite(Input.Tok tok, int maxWidth, int column0);

static Optional<String> reformatParameterComment(Tok tok) {
Expand Down
Loading
Loading