Skip to content

Commit

Permalink
8236077: Clean up the use of modifiers and semicolons
Browse files Browse the repository at this point in the history
Reviewed-by: jjg
  • Loading branch information
pavelrappo committed Dec 17, 2019
1 parent a1d396c commit bdaa9c6
Show file tree
Hide file tree
Showing 59 changed files with 316 additions and 338 deletions.
4 changes: 2 additions & 2 deletions src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Doclet.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -153,7 +153,7 @@ interface Option {
/**
* The kind of an option.
*/
public static enum Kind {
enum Kind {
/** an extended option, such as those prefixed with -X */
EXTENDED,
/** a standard option */
Expand Down
Expand Up @@ -510,11 +510,11 @@ class MemberSignature {
private Content exceptions;

// Threshold for length of type parameters before switching from inline to block representation.
private final static int TYPE_PARAMS_MAX_INLINE_LENGTH = 50;
private static final int TYPE_PARAMS_MAX_INLINE_LENGTH = 50;

// Threshold for combined length of modifiers, type params and return type before breaking
// it up with a line break before the return type.
private final static int RETURN_TYPE_MAX_LINE_LENGTH = 50;
private static final int RETURN_TYPE_MAX_LINE_LENGTH = 50;

/**
* Create a new member signature builder.
Expand Down
Expand Up @@ -304,7 +304,7 @@ private static class DocFileWriter extends HtmlDocletWriter {
/**
* Constructor to construct the HtmlDocletWriter object.
*
* @param configuration the configuruation of this doclet.
* @param configuration the configuration of this doclet.
* @param path the file to be generated.
* @param e the anchoring element.
*/
Expand Down
Expand Up @@ -79,7 +79,7 @@ public Content getSerializableFieldsHeader() {
/**
* Return the header for serializable fields content section.
*
* @param isLastContent true if the cotent being documented is the last content.
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
public Content getFieldsContentHeader(boolean isLastContent) {
Expand All @@ -92,7 +92,7 @@ public Content getFieldsContentHeader(boolean isLastContent) {
* Add serializable fields.
*
* @param heading the heading for the section
* @param serializableFieldsTree the tree to be added to the serializable fileds
* @param serializableFieldsTree the tree to be added to the serializable fields
* content tree
* @return a content tree for the serializable fields content
*/
Expand Down
Expand Up @@ -69,7 +69,7 @@ public Content getSerializableMethodsHeader() {
/**
* Return the header for serializable methods content section.
*
* @param isLastContent true if the cotent being documented is the last content.
* @param isLastContent true if the content being documented is the last content.
* @return a content tree for the header
*/
public Content getMethodsContentHeader(boolean isLastContent) {
Expand Down
Expand Up @@ -44,9 +44,9 @@
/**
* Writes a file that tries to redirect to an alternate page.
* The redirect uses JavaScript, if enabled, falling back on
* {@code <meta http-eqiv=refresh content="0,<uri>">}.
* {@code <meta http-equiv=refresh content="0,<uri>">}.
* If neither are supported/enabled in a browser, the page displays the
* standard "JavaScipt not enabled" message, and a link to the alternate page.
* standard "JavaScript not enabled" message, and a link to the alternate page.
*/
public class IndexRedirectWriter extends HtmlDocletWriter {

Expand Down
Expand Up @@ -168,13 +168,13 @@ public void addComments(TypeMirror holderType, ExecutableElement method, Content
? utils.getSimpleName(holder)
: utils.getFullyQualifiedName(holder),
false);
Content codelLink = HtmlTree.CODE(link);
Content codeLink = HtmlTree.CODE(link);
Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel,
utils.isClass(holder)
? contents.descfrmClassLabel
: contents.descfrmInterfaceLabel);
descfrmLabel.add(Entity.NO_BREAK_SPACE);
descfrmLabel.add(codelLink);
descfrmLabel.add(codeLink);
methodDocTree.add(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
writer.addInlineComment(method, methodDocTree);
}
Expand Down Expand Up @@ -328,7 +328,7 @@ protected static void addOverridden(HtmlDocletWriter writer,
dl.add(dt);
Content overriddenTypeLink =
writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink);
Content codeOverriddenTypeLink = HtmlTree.CODE(overriddenTypeLink);
Content methlink = writer.getLink(
new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
holder)
Expand All @@ -338,7 +338,7 @@ protected static void addOverridden(HtmlDocletWriter writer,
dd.add(Entity.NO_BREAK_SPACE);
dd.add(writer.contents.inClass);
dd.add(Entity.NO_BREAK_SPACE);
dd.add(codeOverridenTypeLink);
dd.add(codeOverriddenTypeLink);
dl.add(dd);
}
}
Expand Down
Expand Up @@ -281,7 +281,7 @@ public void computeModulesData() {
}
packages.put(pkg, e);
}
};
}

// Get all exported packages for the module, using the exports directive for the module.
for (ModuleElement.ExportsDirective directive : ElementFilter.exportsIn(mdle.getDirectives())) {
Expand Down
Expand Up @@ -81,7 +81,7 @@ public PackageTreeWriter(HtmlConfiguration configuration, DocPath path, PackageE
* @param configuration the configuration for this run.
* @param pkg Package for which tree file is to be generated.
* @param noDeprecated If true, do not generate any information for
* deprecated classe or interfaces.
* deprecated classes or interfaces.
* @throws DocFileIOException if there is a problem generating the package tree page
*/
public static void generate(HtmlConfiguration configuration,
Expand Down
Expand Up @@ -148,7 +148,7 @@ public Head addKeywords(List<String> keywords) {
* @param timestamp true if timestamps should be be added.
* @return this object
*/
// For temporary backwards compatibiility, if this method is not called,
// For temporary backwards compatibility, if this method is not called,
// no 'Generated by javadoc' comment will be added.
public Head setTimestamp(boolean timestamp) {
showTimestamp = timestamp;
Expand Down
Expand Up @@ -97,7 +97,7 @@ public enum HtmlTag {
/**
* Enum representing the type of HTML element.
*/
public static enum BlockType {
public enum BlockType {
BLOCK,
INLINE,
OTHER
Expand All @@ -106,7 +106,7 @@ public static enum BlockType {
/**
* Enum representing HTML end tag requirement.
*/
public static enum EndTag {
public enum EndTag {
END,
NOEND
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -24,7 +24,7 @@
*/

/**
* Doclets provide the user-selectable backends for processing the
* Doclets provide the user-selectable back ends for processing the
* documentation comments in Java source code.
*
* <p>Doclets are implementations of the {@link jdk.javadoc.doclet Doclet API}.</p>
Expand Down
Expand Up @@ -44,21 +44,21 @@ public interface AnnotationTypeFieldWriter {
*
* @return content tree for the member tree header
*/
public Content getMemberTreeHeader();
Content getMemberTreeHeader();

/**
* Add the annotation type field details marker.
*
* @param memberDetails the content tree representing field details marker
*/
public void addAnnotationFieldDetailsMarker(Content memberDetails);
void addAnnotationFieldDetailsMarker(Content memberDetails);

/**
* Add the annotation type details tree header.
*
* @param typeElement the annotation type being documented
*/
public Content getAnnotationDetailsTreeHeader(TypeElement typeElement);
Content getAnnotationDetailsTreeHeader(TypeElement typeElement);

/**
* Get the annotation type documentation tree header.
Expand All @@ -67,7 +67,7 @@ public interface AnnotationTypeFieldWriter {
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type documentation header
*/
public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);
Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);

/**
* Get the annotation type details tree.
Expand All @@ -76,45 +76,45 @@ public interface AnnotationTypeFieldWriter {
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type details
*/
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
public Content getAnnotationDoc(Content annotationDocTree);
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
* @param member the member being documented
* @return content tree for the annotation type signature
*/
public Content getSignature(Element member);
Content getSignature(Element member);

/**
* Add the deprecated output for the given member.
*
* @param member the member being documented
* @param annotationDocTree content tree to which the deprecated information will be added
*/
public void addDeprecated(Element member, Content annotationDocTree);
void addDeprecated(Element member, Content annotationDocTree);

/**
* Add the comments for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the comments will be added
*/
public void addComments(Element member, Content annotationDocTree);
void addComments(Element member, Content annotationDocTree);

/**
* Add the tags for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the tags will be added
*/
public void addTags(Element member, Content annotationDocTree);
void addTags(Element member, Content annotationDocTree);
}
Expand Up @@ -45,5 +45,5 @@ public interface AnnotationTypeOptionalMemberWriter extends
* @param member the member being documented
* @param annotationDocTree content tree to which the default value will be added
*/
public void addDefaultValueInfo(Element member, Content annotationDocTree);
void addDefaultValueInfo(Element member, Content annotationDocTree);
}
Expand Up @@ -44,21 +44,21 @@ public interface AnnotationTypeRequiredMemberWriter {
*
* @return content tree for the member tree header
*/
public Content getMemberTreeHeader();
Content getMemberTreeHeader();

/**
* Add the annotation type details marker.
*
* @param memberDetails the content tree representing details marker
*/
public void addAnnotationDetailsMarker(Content memberDetails);
void addAnnotationDetailsMarker(Content memberDetails);

/**
* Add the annotation type details tree header.
*
* @param typeElement the annotation type being documented
*/
public Content getAnnotationDetailsTreeHeader(TypeElement typeElement);
Content getAnnotationDetailsTreeHeader(TypeElement typeElement);

/**
* Get the annotation type documentation tree header.
Expand All @@ -67,8 +67,7 @@ public interface AnnotationTypeRequiredMemberWriter {
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type documentation header
*/
public Content getAnnotationDocTreeHeader(Element member,
Content annotationDetailsTree);
Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);

/**
* Get the annotation type details tree.
Expand All @@ -77,45 +76,45 @@ public Content getAnnotationDocTreeHeader(Element member,
* @param annotationDetailsTree the content tree representing annotation type details
* @return content tree for the annotation type details
*/
public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
public Content getAnnotationDoc(Content annotationDocTree);
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
* @param member the member being documented
* @return content tree for the annotation type signature
*/
public Content getSignature(Element member);
Content getSignature(Element member);

/**
* Add the deprecated output for the given member.
*
* @param member the member being documented
* @param annotationDocTree content tree to which the deprecated information will be added
*/
public void addDeprecated(Element member, Content annotationDocTree);
void addDeprecated(Element member, Content annotationDocTree);

/**
* Add the comments for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the comments will be added
*/
public void addComments(Element member, Content annotationDocTree);
void addComments(Element member, Content annotationDocTree);

/**
* Add the tags for the given member.
*
* @param member the member being documented
* @param annotationDocTree the content tree to which the tags will be added
*/
public void addTags(Element member, Content annotationDocTree);
void addTags(Element member, Content annotationDocTree);
}

0 comments on commit bdaa9c6

Please sign in to comment.