Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
burkedavison committed Nov 16, 2023
1 parent 700e04b commit 396e5be
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ private String getJavadocComment(T element) {
.orElse(null);
}

/**
* Safely combine two nullable strings with a newline delimiter
*/
/** Safely combine two nullable strings with a newline delimiter */
String joinNullable(@Nullable String top, @Nullable String bottom) {
String a = top == null || top.isEmpty() ? null : top;
String b = bottom == null || bottom.isEmpty() ? null : bottom;
Expand All @@ -226,9 +224,7 @@ String joinNullable(@Nullable String top, @Nullable String bottom) {
}
}

/**
* Provides support for deprecated and see tags
*/
/** Provides support for deprecated and see tags */
String replaceBlockTags(DocCommentTree docCommentTree, String comment) {
Set<String> seeItems = new HashSet<>();
String commentWithBlockTags = comment;
Expand Down Expand Up @@ -366,7 +362,8 @@ public String getStatusComment(T element) {
comments.add(createInternalOnlyNotice(annotationComments.get("InternalApi")));
}
if (annotationComments.containsKey("InternalExtensionOnly")) {
comments.add(createInternalExtensionOnlyNotice(annotationComments.get("InternalExtensionOnly")));
comments.add(
createInternalExtensionOnlyNotice(annotationComments.get("InternalExtensionOnly")));
}
if (annotationComments.containsKey("ObsoleteApi")) {
comments.add(createObsoleteNotice(annotationComments.get("ObsoleteApi")));
Expand All @@ -380,6 +377,7 @@ public String getStatusComment(T element) {
}
return String.join("\n\n", comments);
}

private String createBetaNotice(Optional<String> customComment) {
return "<aside class=\"beta\">\n"
+ "<p><strong>Beta</strong></p>\n"
Expand All @@ -390,6 +388,7 @@ private String createBetaNotice(Optional<String> customComment) {
+ "more information, see the launch stage descriptions.</p>\n"
+ "</aside>\n";
}

private String createObsoleteNotice(Optional<String> customComment) {
return "<aside class=\"deprecated\">\n"
+ "<p><strong>Obsolete</strong></p>\n"
Expand All @@ -398,13 +397,15 @@ private String createObsoleteNotice(Optional<String> customComment) {
+ "future release.</p>\n"
+ "</aside>\n";
}

private String createInternalExtensionOnlyNotice(Optional<String> customComment) {
return "<aside class=\"special\">\n"
+ "<p><strong>Internal Extension Only</strong>: This feature is stable for usage, but is "
+ "not intended for extension or implementation.</p>\n"
+ customComment.map(comment -> "<p><em>" + comment + "</em></p>\n").orElse("")
+ "</aside>\n";
}

private String createInternalOnlyNotice(Optional<String> customComment) {
return "<aside class=\"warning\">\n"
+ "<p><strong>Internal Only</strong>: This feature is not stable for application use.</p>\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ items:
- "java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)"
- "java.lang.Enum.clone()"
- "java.lang.Enum.compareTo(E)"
- "java.lang.Enum.describeConstable()"
- "java.lang.Enum.equals(java.lang.Object)"
- "java.lang.Enum.finalize()"
- "java.lang.Enum.getDeclaringClass()"
Expand Down Expand Up @@ -196,11 +195,6 @@ references:
name: "Enum.finalize()"
nameWithType: "Enum.finalize()"
fullName: "java.lang.Enum.finalize()"
- uid: "java.lang.Enum.describeConstable()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#describeConstable--"
name: "Enum.describeConstable()"
nameWithType: "Enum.describeConstable()"
fullName: "java.lang.Enum.describeConstable()"
- uid: "java.lang.Object.notifyAll()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--"
name: "Object.notifyAll()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ items:
- "java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)"
- "java.lang.Enum.clone()"
- "java.lang.Enum.compareTo(E)"
- "java.lang.Enum.describeConstable()"
- "java.lang.Enum.equals(java.lang.Object)"
- "java.lang.Enum.finalize()"
- "java.lang.Enum.getDeclaringClass()"
Expand Down Expand Up @@ -288,11 +287,6 @@ references:
name: "Enum.finalize()"
nameWithType: "Enum.finalize()"
fullName: "java.lang.Enum.finalize()"
- uid: "java.lang.Enum.describeConstable()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#describeConstable--"
name: "Enum.describeConstable()"
nameWithType: "Enum.describeConstable()"
fullName: "java.lang.Enum.describeConstable()"
- uid: "java.lang.Object.notifyAll()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--"
name: "Object.notifyAll()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ items:
- "java.lang.Enum.<T>valueOf(java.lang.Class<T>,java.lang.String)"
- "java.lang.Enum.clone()"
- "java.lang.Enum.compareTo(E)"
- "java.lang.Enum.describeConstable()"
- "java.lang.Enum.equals(java.lang.Object)"
- "java.lang.Enum.finalize()"
- "java.lang.Enum.getDeclaringClass()"
Expand Down Expand Up @@ -180,11 +179,6 @@ references:
name: "Enum.finalize()"
nameWithType: "Enum.finalize()"
fullName: "java.lang.Enum.finalize()"
- uid: "java.lang.Enum.describeConstable()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#describeConstable--"
name: "Enum.describeConstable()"
nameWithType: "Enum.describeConstable()"
fullName: "java.lang.Enum.describeConstable()"
- uid: "java.lang.Object.notifyAll()"
href: "https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--"
name: "Object.notifyAll()"
Expand Down

0 comments on commit 396e5be

Please sign in to comment.