8276635: Use blessed modifier order in compiler code

Reviewed-by: darcy
This commit is contained in:
Magnus Ihse Bursie 2021-11-05 12:05:22 +00:00
parent d95299a4d7
commit 0616d868c7
19 changed files with 43 additions and 43 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -89,7 +89,7 @@ public interface Diagnostic<S> {
/** /**
* Used to signal that no position is available. * Used to signal that no position is available.
*/ */
public final static long NOPOS = -1; public static final long NOPOS = -1;
/** /**
* Returns the kind of this diagnostic, for example, error or * Returns the kind of this diagnostic, for example, error or

View File

@ -794,7 +794,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
/** A base class for Symbols representing types. /** A base class for Symbols representing types.
*/ */
public static abstract class TypeSymbol extends Symbol { public abstract static class TypeSymbol extends Symbol {
public TypeSymbol(Kind kind, long flags, Name name, Type type, Symbol owner) { public TypeSymbol(Kind kind, long flags, Name name, Type type, Symbol owner) {
super(kind, flags, name, type, owner); super(kind, flags, name, type, owner);
} }

View File

@ -241,7 +241,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons
* of a given type expression. This mapping returns the original type is no changes occurred * of a given type expression. This mapping returns the original type is no changes occurred
* when recursively mapping the original type's subterms. * when recursively mapping the original type's subterms.
*/ */
public static abstract class StructuralTypeMapping<S> extends Types.TypeMapping<S> { public abstract static class StructuralTypeMapping<S> extends Types.TypeMapping<S> {
@Override @Override
public Type visitClassType(ClassType t, S s) { public Type visitClassType(ClassType t, S s) {
@ -1786,7 +1786,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons
} }
} }
public static abstract class DelegatedType extends Type { public abstract static class DelegatedType extends Type {
public Type qtype; public Type qtype;
public TypeTag tag; public TypeTag tag;

View File

@ -4896,7 +4896,7 @@ public class Types {
* type itself) of the operation implemented by this visitor; use * type itself) of the operation implemented by this visitor; use
* Void if a second argument is not needed. * Void if a second argument is not needed.
*/ */
public static abstract class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S> { public abstract static class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S> {
public final R visit(Type t, S s) { return t.accept(this, s); } public final R visit(Type t, S s) { return t.accept(this, s); }
public R visitClassType(ClassType t, S s) { return visitType(t, s); } public R visitClassType(ClassType t, S s) { return visitType(t, s); }
public R visitWildcardType(WildcardType t, S s) { return visitType(t, s); } public R visitWildcardType(WildcardType t, S s) { return visitType(t, s); }
@ -4923,7 +4923,7 @@ public class Types {
* symbol itself) of the operation implemented by this visitor; use * symbol itself) of the operation implemented by this visitor; use
* Void if a second argument is not needed. * Void if a second argument is not needed.
*/ */
public static abstract class DefaultSymbolVisitor<R,S> implements Symbol.Visitor<R,S> { public abstract static class DefaultSymbolVisitor<R,S> implements Symbol.Visitor<R,S> {
public final R visit(Symbol s, S arg) { return s.accept(this, arg); } public final R visit(Symbol s, S arg) { return s.accept(this, arg); }
public R visitClassSymbol(ClassSymbol s, S arg) { return visitSymbol(s, arg); } public R visitClassSymbol(ClassSymbol s, S arg) { return visitSymbol(s, arg); }
public R visitMethodSymbol(MethodSymbol s, S arg) { return visitSymbol(s, arg); } public R visitMethodSymbol(MethodSymbol s, S arg) { return visitSymbol(s, arg); }
@ -4946,7 +4946,7 @@ public class Types {
* type itself) of the operation implemented by this visitor; use * type itself) of the operation implemented by this visitor; use
* Void if a second argument is not needed. * Void if a second argument is not needed.
*/ */
public static abstract class SimpleVisitor<R,S> extends DefaultTypeVisitor<R,S> { public abstract static class SimpleVisitor<R,S> extends DefaultTypeVisitor<R,S> {
@Override @Override
public R visitCapturedType(CapturedType t, S s) { public R visitCapturedType(CapturedType t, S s) {
return visitTypeVar(t, s); return visitTypeVar(t, s);
@ -4966,7 +4966,7 @@ public class Types {
* form Type&nbsp;&times;&nbsp;Type&nbsp;&rarr;&nbsp;Boolean. * form Type&nbsp;&times;&nbsp;Type&nbsp;&rarr;&nbsp;Boolean.
* <!-- In plain text: Type x Type -> Boolean --> * <!-- In plain text: Type x Type -> Boolean -->
*/ */
public static abstract class TypeRelation extends SimpleVisitor<Boolean,Type> {} public abstract static class TypeRelation extends SimpleVisitor<Boolean,Type> {}
/** /**
* A convenience visitor for implementing operations that only * A convenience visitor for implementing operations that only
@ -4976,7 +4976,7 @@ public class Types {
* @param <R> the return type of the operation implemented by this * @param <R> the return type of the operation implemented by this
* visitor; use Void if no return type is needed. * visitor; use Void if no return type is needed.
*/ */
public static abstract class UnaryVisitor<R> extends SimpleVisitor<R,Void> { public abstract static class UnaryVisitor<R> extends SimpleVisitor<R,Void> {
public final R visit(Type t) { return t.accept(this, null); } public final R visit(Type t) { return t.accept(this, null); }
} }
@ -5041,7 +5041,7 @@ public class Types {
// <editor-fold defaultstate="collapsed" desc="Signature Generation"> // <editor-fold defaultstate="collapsed" desc="Signature Generation">
public static abstract class SignatureGenerator { public abstract static class SignatureGenerator {
public static class InvalidSignatureException extends RuntimeException { public static class InvalidSignatureException extends RuntimeException {
private static final long serialVersionUID = 0; private static final long serialVersionUID = 0;

View File

@ -341,7 +341,7 @@ public class Flow {
* Base visitor class for all visitors implementing dataflow analysis logic. * Base visitor class for all visitors implementing dataflow analysis logic.
* This class define the shared logic for handling jumps (break/continue statements). * This class define the shared logic for handling jumps (break/continue statements).
*/ */
static abstract class BaseAnalyzer extends TreeScanner { abstract static class BaseAnalyzer extends TreeScanner {
enum JumpKind { enum JumpKind {
BREAK(JCTree.Tag.BREAK) { BREAK(JCTree.Tag.BREAK) {

View File

@ -56,7 +56,7 @@ import com.sun.tools.javac.util.Context;
public class JRTIndex { public class JRTIndex {
/** Get a shared instance of the cache. */ /** Get a shared instance of the cache. */
private static JRTIndex sharedInstance; private static JRTIndex sharedInstance;
public synchronized static JRTIndex getSharedInstance() { public static synchronized JRTIndex getSharedInstance() {
if (sharedInstance == null) { if (sharedInstance == null) {
try { try {
sharedInstance = new JRTIndex(); sharedInstance = new JRTIndex();

View File

@ -444,7 +444,7 @@ public class Locations {
* @see #initHandlers * @see #initHandlers
* @see #getHandler * @see #getHandler
*/ */
protected static abstract class LocationHandler { protected abstract static class LocationHandler {
/** /**
* @see JavaFileManager#handleOption * @see JavaFileManager#handleOption
@ -513,7 +513,7 @@ public class Locations {
/** /**
* A LocationHandler for a given Location, and associated set of options. * A LocationHandler for a given Location, and associated set of options.
*/ */
private static abstract class BasicLocationHandler extends LocationHandler { private abstract static class BasicLocationHandler extends LocationHandler {
final Location location; final Location location;
final Set<Option> options; final Set<Option> options;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -254,7 +254,7 @@ public abstract class StringConcat {
/** /**
* Base class for indified concatenation bytecode flavors. * Base class for indified concatenation bytecode flavors.
*/ */
private static abstract class Indy extends StringConcat { private abstract static class Indy extends StringConcat {
public Indy(Context context) { public Indy(Context context) {
super(context); super(context);
} }

View File

@ -259,7 +259,7 @@ public class AnnotationProxyMaker {
private void typeMismatch(Method method, final Attribute attr) { private void typeMismatch(Method method, final Attribute attr) {
class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy { class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
static final long serialVersionUID = 269; static final long serialVersionUID = 269;
transient final Method method; final transient Method method;
AnnotationTypeMismatchExceptionProxy(Method method) { AnnotationTypeMismatchExceptionProxy(Method method) {
this.method = method; this.method = method;
} }

View File

@ -1115,7 +1115,7 @@ public class DocCommentParser {
return new String(buf, start, end - start); return new String(buf, start, end - start);
} }
private static abstract class TagParser { private abstract static class TagParser {
enum Kind { INLINE, BLOCK, EITHER } enum Kind { INLINE, BLOCK, EITHER }
final Kind kind; final Kind kind;

View File

@ -4988,7 +4988,7 @@ public class JavacParser implements Parser {
} }
protected static abstract class AbstractEndPosTable implements EndPosTable { protected abstract static class AbstractEndPosTable implements EndPosTable {
/** /**
* The current parser. * The current parser.
*/ */

View File

@ -294,7 +294,7 @@ public abstract class DCTree implements DocTree {
}; };
} }
public static abstract class DCEndPosTree<T extends DCEndPosTree<T>> extends DCTree { public abstract static class DCEndPosTree<T extends DCEndPosTree<T>> extends DCTree {
private int endPos = NOPOS; private int endPos = NOPOS;
@ -381,14 +381,14 @@ public abstract class DCTree implements DocTree {
} }
} }
public static abstract class DCBlockTag extends DCTree implements BlockTagTree { public abstract static class DCBlockTag extends DCTree implements BlockTagTree {
@Override @DefinedBy(Api.COMPILER_TREE) @Override @DefinedBy(Api.COMPILER_TREE)
public String getTagName() { public String getTagName() {
return getKind().tagName; return getKind().tagName;
} }
} }
public static abstract class DCInlineTag extends DCEndPosTree<DCInlineTag> implements InlineTagTree { public abstract static class DCInlineTag extends DCEndPosTree<DCInlineTag> implements InlineTagTree {
@Override @DefinedBy(Api.COMPILER_TREE) @Override @DefinedBy(Api.COMPILER_TREE)
public String getTagName() { public String getTagName() {
return getKind().tagName; return getKind().tagName;

View File

@ -689,7 +689,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
} }
} }
public static abstract class JCStatement extends JCTree implements StatementTree { public abstract static class JCStatement extends JCTree implements StatementTree {
@Override @Override
public JCStatement setType(Type type) { public JCStatement setType(Type type) {
super.setType(type); super.setType(type);
@ -702,7 +702,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
} }
} }
public static abstract class JCCaseLabel extends JCTree implements CaseLabelTree { public abstract static class JCCaseLabel extends JCTree implements CaseLabelTree {
public abstract boolean isExpression(); public abstract boolean isExpression();
public boolean isNullPattern() { public boolean isNullPattern() {
return isExpression() && TreeInfo.isNull((JCExpression) this); return isExpression() && TreeInfo.isNull((JCExpression) this);
@ -710,7 +710,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
public abstract boolean isPattern(); public abstract boolean isPattern();
} }
public static abstract class JCExpression extends JCCaseLabel implements ExpressionTree { public abstract static class JCExpression extends JCCaseLabel implements ExpressionTree {
@Override @Override
public JCExpression setType(Type type) { public JCExpression setType(Type type) {
super.setType(type); super.setType(type);
@ -740,7 +740,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
* Common supertype for all poly expression trees (lambda, method references, * Common supertype for all poly expression trees (lambda, method references,
* conditionals, method and constructor calls) * conditionals, method and constructor calls)
*/ */
public static abstract class JCPolyExpression extends JCExpression { public abstract static class JCPolyExpression extends JCExpression {
/** /**
* A poly expression can only be truly 'poly' in certain contexts * A poly expression can only be truly 'poly' in certain contexts
@ -762,7 +762,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/** /**
* Common supertype for all functional expression trees (lambda and method references) * Common supertype for all functional expression trees (lambda and method references)
*/ */
public static abstract class JCFunctionalExpression extends JCPolyExpression { public abstract static class JCFunctionalExpression extends JCPolyExpression {
public JCFunctionalExpression() { public JCFunctionalExpression() {
//a functional expression is always a 'true' poly //a functional expression is always a 'true' poly
@ -2056,7 +2056,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
} }
} }
public static abstract class JCOperatorExpression extends JCExpression { public abstract static class JCOperatorExpression extends JCExpression {
public enum OperandPos { public enum OperandPos {
LEFT, LEFT,
RIGHT RIGHT
@ -2238,7 +2238,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/** /**
* Pattern matching forms. * Pattern matching forms.
*/ */
public static abstract class JCPattern extends JCCaseLabel public abstract static class JCPattern extends JCCaseLabel
implements PatternTree { implements PatternTree {
@Override @Override
@ -2989,7 +2989,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
} }
} }
public static abstract class JCDirective extends JCTree public abstract static class JCDirective extends JCTree
implements DirectiveTree { implements DirectiveTree {
} }
@ -3401,7 +3401,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/** A generic visitor class for trees. /** A generic visitor class for trees.
*/ */
public static abstract class Visitor { public abstract static class Visitor {
public void visitTopLevel(JCCompilationUnit that) { visitTree(that); } public void visitTopLevel(JCCompilationUnit that) { visitTree(that); }
public void visitPackageDef(JCPackageDecl that) { visitTree(that); } public void visitPackageDef(JCPackageDecl that) { visitTree(that); }
public void visitImport(JCImport that) { visitTree(that); } public void visitImport(JCImport that) { visitTree(that); }

View File

@ -178,7 +178,7 @@ public abstract class Dependencies {
/** /**
* Class representing a node in the dependency graph. * Class representing a node in the dependency graph.
*/ */
public static abstract class Node extends GraphUtils.AbstractNode<ClassSymbol, Node> public abstract static class Node extends GraphUtils.AbstractNode<ClassSymbol, Node>
implements GraphUtils.DottableNode<ClassSymbol, Node> { implements GraphUtils.DottableNode<ClassSymbol, Node> {
/** /**
* dependant nodes grouped by kind * dependant nodes grouped by kind

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -54,7 +54,7 @@ public class GraphUtils {
/** /**
* Visitor for graph nodes. * Visitor for graph nodes.
*/ */
static abstract class NodeVisitor<D, N extends Node<D, N>, A> { abstract static class NodeVisitor<D, N extends Node<D, N>, A> {
/** /**
* Visitor action for nodes. * Visitor action for nodes.
*/ */
@ -92,7 +92,7 @@ public class GraphUtils {
* This class is a basic abstract class for representing a node. * This class is a basic abstract class for representing a node.
* A node is associated with a given data. * A node is associated with a given data.
*/ */
public static abstract class AbstractNode<D, N extends AbstractNode<D, N>> implements Node<D, N> { public abstract static class AbstractNode<D, N extends AbstractNode<D, N>> implements Node<D, N> {
public final D data; public final D data;
public AbstractNode(D data) { public AbstractNode(D data) {
@ -129,7 +129,7 @@ public class GraphUtils {
* This class specialized Node, by adding elements that are required in order * This class specialized Node, by adding elements that are required in order
* to perform Tarjan computation of strongly connected components. * to perform Tarjan computation of strongly connected components.
*/ */
public static abstract class TarjanNode<D, N extends TarjanNode<D, N>> extends AbstractNode<D, N> public abstract static class TarjanNode<D, N extends TarjanNode<D, N>> extends AbstractNode<D, N>
implements Comparable<N> { implements Comparable<N> {
int index = -1; int index = -1;
int lowlink; int lowlink;

View File

@ -479,7 +479,7 @@ public class JCDiagnostic implements Diagnostic<JavaFileObject> {
* created programmatically (by using the supplied factory method) or obtained through build-time * created programmatically (by using the supplied factory method) or obtained through build-time
* generated factory methods. * generated factory methods.
*/ */
public static abstract class DiagnosticInfo { public abstract static class DiagnosticInfo {
/** The diagnostic kind (i.e. error). */ /** The diagnostic kind (i.e. error). */
DiagnosticType type; DiagnosticType type;

View File

@ -90,7 +90,7 @@ public class Log extends AbstractLog {
* Note that javax.tools.DiagnosticListener (if set) is called later in the * Note that javax.tools.DiagnosticListener (if set) is called later in the
* diagnostic pipeline. * diagnostic pipeline.
*/ */
public static abstract class DiagnosticHandler { public abstract static class DiagnosticHandler {
/** /**
* The previously installed diagnostic handler. * The previously installed diagnostic handler.
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -205,7 +205,7 @@ public abstract class Name implements javax.lang.model.element.Name, PoolConstan
/** An abstraction for the hash table used to create unique Name instances. /** An abstraction for the hash table used to create unique Name instances.
*/ */
public static abstract class Table { public abstract static class Table {
/** Standard name table. /** Standard name table.
*/ */
public final Names names; public final Names names;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -239,7 +239,7 @@ class GNUStyleOptions {
OptionType(String name) { this.name = name; } OptionType(String name) { this.name = name; }
} }
static abstract class Option { abstract static class Option {
final boolean hasArg; final boolean hasArg;
final boolean argIsOptional; final boolean argIsOptional;
final String[] aliases; final String[] aliases;