8264331: Use the blessed modifier order in jdk.compiler

Reviewed-by: vromero, iris, shade
This commit is contained in:
Alex Blewitt 2021-04-01 06:53:54 +00:00 committed by Aleksey Shipilev
parent 0228734902
commit d2df9a7df8
34 changed files with 108 additions and 108 deletions

View File

@ -360,7 +360,7 @@ public class JavacTaskPool {
*/ */
static class ReusableJavaCompiler extends JavaCompiler { static class ReusableJavaCompiler extends JavaCompiler {
final static Factory<JavaCompiler> factory = ReusableJavaCompiler::new; static final Factory<JavaCompiler> factory = ReusableJavaCompiler::new;
ReusableJavaCompiler(Context context) { ReusableJavaCompiler(Context context) {
super(context); super(context);
@ -387,7 +387,7 @@ public class JavacTaskPool {
*/ */
static class ReusableLog extends Log { static class ReusableLog extends Log {
final static Factory<Log> factory = ReusableLog::new; static final Factory<Log> factory = ReusableLog::new;
Context context; Context context;

View File

@ -799,7 +799,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
} }
/** form a fully qualified name from a name and an owner /** form a fully qualified name from a name and an owner
*/ */
static public Name formFullName(Name name, Symbol owner) { public static Name formFullName(Name name, Symbol owner) {
if (owner == null) return name; if (owner == null) return name;
if ((owner.kind != ERR) && if ((owner.kind != ERR) &&
(owner.kind.matches(KindSelector.VAL_MTH) || (owner.kind.matches(KindSelector.VAL_MTH) ||
@ -814,7 +814,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
/** form a fully qualified name from a name and an owner, after /** form a fully qualified name from a name and an owner, after
* converting to flat representation * converting to flat representation
*/ */
static public Name formFlatName(Name name, Symbol owner) { public static Name formFlatName(Name name, Symbol owner) {
if (owner == null || owner.kind.matches(KindSelector.VAL_MTH) || if (owner == null || owner.kind.matches(KindSelector.VAL_MTH) ||
(owner.kind == TYP && owner.type.hasTag(TYPEVAR)) (owner.kind == TYP && owner.type.hasTag(TYPEVAR))
) return name; ) return name;
@ -2470,7 +2470,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
this.tag = tag; this.tag = tag;
} }
static public AccessCode getFromCode(int code) { public static AccessCode getFromCode(int code) {
for (AccessCode aCodes : AccessCode.values()) { for (AccessCode aCodes : AccessCode.values()) {
if (aCodes.code == code) { if (aCodes.code == code) {
return aCodes; return aCodes;
@ -2512,7 +2512,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
/** Dummy completer to be used when the symbol has been completed or /** Dummy completer to be used when the symbol has been completed or
* does not need completion. * does not need completion.
*/ */
public final static Completer NULL_COMPLETER = new Completer() { public static final Completer NULL_COMPLETER = new Completer() {
public void complete(Symbol sym) { } public void complete(Symbol sym) { }
public boolean isTerminal() { return true; } public boolean isTerminal() { return true; }
}; };

View File

@ -375,7 +375,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons
return accept(stripMetadata, null); return accept(stripMetadata, null);
} }
//where //where
private final static TypeMapping<Void> stripMetadata = new StructuralTypeMapping<Void>() { private static final TypeMapping<Void> stripMetadata = new StructuralTypeMapping<Void>() {
@Override @Override
public Type visitClassType(ClassType t, Void aVoid) { public Type visitClassType(ClassType t, Void aVoid) {
return super.visitClassType((ClassType)t.typeNoMetadata(), aVoid); return super.visitClassType((ClassType)t.typeNoMetadata(), aVoid);

View File

@ -1063,10 +1063,10 @@ public class Types {
* Is t a subtype of s?<br> * Is t a subtype of s?<br>
* (not defined for Method and ForAll types) * (not defined for Method and ForAll types)
*/ */
final public boolean isSubtype(Type t, Type s) { public final boolean isSubtype(Type t, Type s) {
return isSubtype(t, s, true); return isSubtype(t, s, true);
} }
final public boolean isSubtypeNoCapture(Type t, Type s) { public final boolean isSubtypeNoCapture(Type t, Type s) {
return isSubtype(t, s, false); return isSubtype(t, s, false);
} }
public boolean isSubtype(Type t, Type s, boolean capture) { public boolean isSubtype(Type t, Type s, boolean capture) {
@ -4895,7 +4895,7 @@ public class Types {
* 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 static abstract class DefaultTypeVisitor<R,S> implements Type.Visitor<R,S> {
final public 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); }
public R visitArrayType(ArrayType t, S s) { return visitType(t, s); } public R visitArrayType(ArrayType t, S s) { return visitType(t, s); }
@ -4922,7 +4922,7 @@ public class Types {
* 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 static abstract class DefaultSymbolVisitor<R,S> implements Symbol.Visitor<R,S> {
final public 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); }
public R visitOperatorSymbol(OperatorSymbol s, S arg) { return visitSymbol(s, arg); } public R visitOperatorSymbol(OperatorSymbol s, S arg) { return visitSymbol(s, arg); }
@ -4975,7 +4975,7 @@ public class Types {
* 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 static abstract class UnaryVisitor<R> extends SimpleVisitor<R,Void> {
final public R visit(Type t) { return t.accept(this, null); } public final R visit(Type t) { return t.accept(this, null); }
} }
/** /**
@ -4989,7 +4989,7 @@ public class Types {
* not needed. * not needed.
*/ */
public static class MapVisitor<S> extends DefaultTypeVisitor<Type,S> { public static class MapVisitor<S> extends DefaultTypeVisitor<Type,S> {
final public Type visit(Type t) { return t.accept(this, null); } public final Type visit(Type t) { return t.accept(this, null); }
public Type visitType(Type t, S s) { return t; } public Type visitType(Type t, S s) { return t; }
} }

View File

@ -356,7 +356,7 @@ public class ArgumentAttr extends JCTree.Visitor {
} }
@Override @Override
final public Type complete(DeferredType dt, ResultInfo resultInfo, DeferredAttrContext deferredAttrContext) { public final Type complete(DeferredType dt, ResultInfo resultInfo, DeferredAttrContext deferredAttrContext) {
Assert.check(dt == this); Assert.check(dt == this);
if (deferredAttrContext.mode == AttrMode.SPECULATIVE) { if (deferredAttrContext.mode == AttrMode.SPECULATIVE) {
Type t = (resultInfo.pt == Type.recoveryType) ? Type t = (resultInfo.pt == Type.recoveryType) ?

View File

@ -2062,7 +2062,7 @@ public class Attr extends JCTree.Visitor {
.collect(List.collector())); .collect(List.collector()));
} }
final static TypeTag[] primitiveTags = new TypeTag[]{ static final TypeTag[] primitiveTags = new TypeTag[]{
BYTE, BYTE,
CHAR, CHAR,
SHORT, SHORT,

View File

@ -95,7 +95,7 @@ public class TypeEnter implements Completer {
/** A switch to determine whether we check for package/class conflicts /** A switch to determine whether we check for package/class conflicts
*/ */
final static boolean checkClash = true; static final boolean checkClash = true;
private final Names names; private final Names names;
private final Enter enter; private final Enter enter;

View File

@ -64,45 +64,45 @@ import com.sun.tools.javac.util.Name;
* deletion without notice.</b> */ * deletion without notice.</b> */
public class ClassFile { public class ClassFile {
public final static int JAVA_MAGIC = 0xCAFEBABE; public static final int JAVA_MAGIC = 0xCAFEBABE;
// see Target // see Target
public final static int CONSTANT_Utf8 = 1; public static final int CONSTANT_Utf8 = 1;
public final static int CONSTANT_Unicode = 2; public static final int CONSTANT_Unicode = 2;
public final static int CONSTANT_Integer = 3; public static final int CONSTANT_Integer = 3;
public final static int CONSTANT_Float = 4; public static final int CONSTANT_Float = 4;
public final static int CONSTANT_Long = 5; public static final int CONSTANT_Long = 5;
public final static int CONSTANT_Double = 6; public static final int CONSTANT_Double = 6;
public final static int CONSTANT_Class = 7; public static final int CONSTANT_Class = 7;
public final static int CONSTANT_String = 8; public static final int CONSTANT_String = 8;
public final static int CONSTANT_Fieldref = 9; public static final int CONSTANT_Fieldref = 9;
public final static int CONSTANT_Methodref = 10; public static final int CONSTANT_Methodref = 10;
public final static int CONSTANT_InterfaceMethodref = 11; public static final int CONSTANT_InterfaceMethodref = 11;
public final static int CONSTANT_NameandType = 12; public static final int CONSTANT_NameandType = 12;
public final static int CONSTANT_MethodHandle = 15; public static final int CONSTANT_MethodHandle = 15;
public final static int CONSTANT_MethodType = 16; public static final int CONSTANT_MethodType = 16;
public final static int CONSTANT_Dynamic = 17; public static final int CONSTANT_Dynamic = 17;
public final static int CONSTANT_InvokeDynamic = 18; public static final int CONSTANT_InvokeDynamic = 18;
public final static int CONSTANT_Module = 19; public static final int CONSTANT_Module = 19;
public final static int CONSTANT_Package = 20; public static final int CONSTANT_Package = 20;
public final static int REF_getField = 1; public static final int REF_getField = 1;
public final static int REF_getStatic = 2; public static final int REF_getStatic = 2;
public final static int REF_putField = 3; public static final int REF_putField = 3;
public final static int REF_putStatic = 4; public static final int REF_putStatic = 4;
public final static int REF_invokeVirtual = 5; public static final int REF_invokeVirtual = 5;
public final static int REF_invokeStatic = 6; public static final int REF_invokeStatic = 6;
public final static int REF_invokeSpecial = 7; public static final int REF_invokeSpecial = 7;
public final static int REF_newInvokeSpecial = 8; public static final int REF_newInvokeSpecial = 8;
public final static int REF_invokeInterface = 9; public static final int REF_invokeInterface = 9;
public final static int MAX_PARAMETERS = 0xff; public static final int MAX_PARAMETERS = 0xff;
public final static int MAX_DIMENSIONS = 0xff; public static final int MAX_DIMENSIONS = 0xff;
public final static int MAX_CODE = 0xffff; public static final int MAX_CODE = 0xffff;
public final static int MAX_LOCALS = 0xffff; public static final int MAX_LOCALS = 0xffff;
public final static int MAX_STACK = 0xffff; public static final int MAX_STACK = 0xffff;
public final static int PREVIEW_MINOR_VERSION = 0xffff; public static final int PREVIEW_MINOR_VERSION = 0xffff;
public enum Version { public enum Version {
V45_3(45, 3), // base level for all attributes V45_3(45, 3), // base level for all attributes

View File

@ -231,7 +231,7 @@ public class ClassWriter extends ClassFile {
return sbuf.toString(); return sbuf.toString();
} }
//where //where
private final static String[] flagName = { private static final String[] flagName = {
"PUBLIC", "PRIVATE", "PROTECTED", "STATIC", "FINAL", "PUBLIC", "PRIVATE", "PROTECTED", "STATIC", "FINAL",
"SUPER", "VOLATILE", "TRANSIENT", "NATIVE", "INTERFACE", "SUPER", "VOLATILE", "TRANSIENT", "NATIVE", "INTERFACE",
"ABSTRACT", "STRICTFP"}; "ABSTRACT", "STRICTFP"};

View File

@ -2243,7 +2243,7 @@ public class Code {
} }
private static class Mneumonics { private static class Mneumonics {
private final static String[] mnem = new String[ByteCodeCount]; private static final String[] mnem = new String[ByteCodeCount];
static { static {
mnem[nop] = "nop"; mnem[nop] = "nop";
mnem[aconst_null] = "aconst_null"; mnem[aconst_null] = "aconst_null";

View File

@ -137,7 +137,7 @@ public class JNIWriter {
static boolean isNative(Symbol s) { static boolean isNative(Symbol s) {
return hasFlag(s, Flags.NATIVE); return hasFlag(s, Flags.NATIVE);
} }
static private boolean hasFlag(Symbol m, int flag) { private static boolean hasFlag(Symbol m, int flag) {
return (m.flags() & flag) != 0; return (m.flags() & flag) != 0;
} }

View File

@ -1881,7 +1881,7 @@ public class JavacParser implements Parser {
} }
} }
private final static Fragment[][] decisionTable = new Fragment[][] { private static final Fragment[][] decisionTable = new Fragment[][] {
/* VAR EXPLICIT IMPLICIT */ /* VAR EXPLICIT IMPLICIT */
/* VAR */ {null, VarAndExplicitNotAllowed, VarAndImplicitNotAllowed}, /* VAR */ {null, VarAndExplicitNotAllowed, VarAndImplicitNotAllowed},
/* EXPLICIT */ {VarAndExplicitNotAllowed, null, ImplicitAndExplicitNotAllowed}, /* EXPLICIT */ {VarAndExplicitNotAllowed, null, ImplicitAndExplicitNotAllowed},

View File

@ -46,7 +46,7 @@ public class ReferenceParser {
* An object to contain the result of parsing a reference to an API element. * An object to contain the result of parsing a reference to an API element.
* Any, but not all, of the member fields may be null. * Any, but not all, of the member fields may be null.
*/ */
static public class Reference { public static class Reference {
public final JCTree.JCExpression moduleName; public final JCTree.JCExpression moduleName;
/** The type, if any, in the signature. */ /** The type, if any, in the signature. */
public final JCTree qualExpr; public final JCTree qualExpr;
@ -66,7 +66,7 @@ public class ReferenceParser {
/** /**
* An exception that indicates an error occurred while parsing a signature. * An exception that indicates an error occurred while parsing a signature.
*/ */
static public class ParseException extends Exception { public static class ParseException extends Exception {
private static final long serialVersionUID = 0; private static final long serialVersionUID = 0;
ParseException(String message) { ParseException(String message) {
super(message); super(message);

View File

@ -390,7 +390,7 @@ public class Tokens {
} }
} }
final static class NamedToken extends Token { static final class NamedToken extends Token {
/** The name of this token */ /** The name of this token */
public final Name name; public final Name name;
@ -432,7 +432,7 @@ public class Tokens {
} }
} }
final static class NumericToken extends StringToken { static final class NumericToken extends StringToken {
/** The 'radix' value of this token */ /** The 'radix' value of this token */
public final int radix; public final int radix;

View File

@ -83,12 +83,12 @@ public class Pretty extends JCTree.Visitor {
* A string sequence to be used when Pretty output should be constrained * A string sequence to be used when Pretty output should be constrained
* to fit into a given size * to fit into a given size
*/ */
private final static String trimSequence = "[...]"; private static final String trimSequence = "[...]";
/** /**
* Max number of chars to be generated when output should fit into a single line * Max number of chars to be generated when output should fit into a single line
*/ */
private final static int PREFERRED_LENGTH = 20; private static final int PREFERRED_LENGTH = 20;
/** Align code to be indented to left margin. /** Align code to be indented to left margin.
*/ */

View File

@ -401,7 +401,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
return config; return config;
} }
static public class SimpleConfiguration implements Configuration { public static class SimpleConfiguration implements Configuration {
protected Map<MultilineLimit, Integer> multilineLimits; protected Map<MultilineLimit, Integer> multilineLimits;
protected EnumSet<DiagnosticPart> visibleParts; protected EnumSet<DiagnosticPart> visibleParts;

View File

@ -215,7 +215,7 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
return (BasicConfiguration)super.getConfiguration(); return (BasicConfiguration)super.getConfiguration();
} }
static public class BasicConfiguration extends SimpleConfiguration { public static class BasicConfiguration extends SimpleConfiguration {
protected Map<DiagnosticPart, Integer> indentationLevels; protected Map<DiagnosticPart, Integer> indentationLevels;
protected Map<BasicFormatKind, String> availableFormats; protected Map<BasicFormatKind, String> availableFormats;

View File

@ -84,9 +84,9 @@ public class Bits {
} }
private final static int wordlen = 32; private static final int wordlen = 32;
private final static int wordshift = 5; private static final int wordshift = 5;
private final static int wordmask = wordlen - 1; private static final int wordmask = wordlen - 1;
public int[] bits = null; public int[] bits = null;
// This field will store last version of bits after every change. // This field will store last version of bits after every change.

View File

@ -78,12 +78,12 @@ public abstract class Dependencies {
/** /**
* Push a new completion node on the stack. * Push a new completion node on the stack.
*/ */
abstract public void push(ClassSymbol s, CompletionCause phase); public abstract void push(ClassSymbol s, CompletionCause phase);
/** /**
* Remove current dependency node from the stack. * Remove current dependency node from the stack.
*/ */
abstract public void pop(); public abstract void pop();
public enum CompletionCause implements GraphUtils.DependencyKind { public enum CompletionCause implements GraphUtils.DependencyKind {
CLASS_READER, CLASS_READER,

View File

@ -40,7 +40,7 @@ public class IntHashTable {
protected int[] ints; // the image set protected int[] ints; // the image set
protected int mask; // used to clip int's into the domain protected int mask; // used to clip int's into the domain
protected int num_bindings; // the number of mappings (including DELETED) protected int num_bindings; // the number of mappings (including DELETED)
private final static Object DELETED = new Object(); private static final Object DELETED = new Object();
/** /**
* Construct an Object {@literal ->} int hash table. * Construct an Object {@literal ->} int hash table.

View File

@ -83,7 +83,7 @@ public class Iterators {
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
private final static Iterator EMPTY = new Iterator() { private static final Iterator EMPTY = new Iterator() {
public boolean hasNext() { public boolean hasNext() {
return false; return false;
} }

View File

@ -210,7 +210,7 @@ public class JavacMessages implements Messages {
} }
} }
static private String getLocalizedString(List<ResourceBundle> bundles, private static String getLocalizedString(List<ResourceBundle> bundles,
String key, String key,
Object... args) { Object... args) {
String msg = null; String msg = null;

View File

@ -37,37 +37,37 @@ public interface LayoutCharacters {
/** Tabulator column increment. /** Tabulator column increment.
*/ */
final static int TabInc = 8; static final int TabInc = 8;
/** Standard indentation for subdiagnostics /** Standard indentation for subdiagnostics
*/ */
final static int DiagInc = 4; static final int DiagInc = 4;
/** Standard indentation for additional diagnostic lines /** Standard indentation for additional diagnostic lines
*/ */
final static int DetailsInc = 2; static final int DetailsInc = 2;
/** Tabulator character. /** Tabulator character.
*/ */
final static byte TAB = 0x9; static final byte TAB = 0x9;
/** Line feed character. /** Line feed character.
*/ */
final static byte LF = 0xA; static final byte LF = 0xA;
/** Form feed character. /** Form feed character.
*/ */
final static byte FF = 0xC; static final byte FF = 0xC;
/** Carriage return character. /** Carriage return character.
*/ */
final static byte CR = 0xD; static final byte CR = 0xD;
/** End of input character. Used as a sentinel to denote the /** End of input character. Used as a sentinel to denote the
* character one beyond the last defined character in a * character one beyond the last defined character in a
* source file. * source file.
*/ */
final static byte EOI = 0x1A; static final byte EOI = 0x1A;
/** Bump column to the next tab. /** Bump column to the next tab.
*/ */

View File

@ -43,7 +43,7 @@ public class SharedNameTable extends Name.Table {
// maintain a freelist of recently used name tables for reuse. // maintain a freelist of recently used name tables for reuse.
private static List<SoftReference<SharedNameTable>> freelist = List.nil(); private static List<SoftReference<SharedNameTable>> freelist = List.nil();
static public synchronized SharedNameTable create(Names names) { public static synchronized SharedNameTable create(Names names) {
while (freelist.nonEmpty()) { while (freelist.nonEmpty()) {
SharedNameTable t = freelist.head.get(); SharedNameTable t = freelist.head.get();
freelist = freelist.tail; freelist = freelist.tail;
@ -54,7 +54,7 @@ public class SharedNameTable extends Name.Table {
return new SharedNameTable(names); return new SharedNameTable(names);
} }
static private synchronized void dispose(SharedNameTable t) { private static synchronized void dispose(SharedNameTable t) {
freelist = freelist.prepend(new SoftReference<>(t)); freelist = freelist.prepend(new SoftReference<>(t));
} }

View File

@ -38,7 +38,7 @@ import java.lang.ref.WeakReference;
* deletion without notice.</b> * deletion without notice.</b>
*/ */
public class UnsharedNameTable extends Name.Table { public class UnsharedNameTable extends Name.Table {
static public Name.Table create(Names names) { public static Name.Table create(Names names) {
return new UnsharedNameTable(names); return new UnsharedNameTable(names);
} }

View File

@ -65,7 +65,7 @@ public class CompileJavaPackages implements Transformer {
// The current limited sharing of data between concurrent JavaCompilers // The current limited sharing of data between concurrent JavaCompilers
// in the server will not give speedups above 3 cores. Thus this limit. // in the server will not give speedups above 3 cores. Thus this limit.
// We hope to improve this in the future. // We hope to improve this in the future.
final static int limitOnConcurrency = 3; static final int limitOnConcurrency = 3;
Options args; Options args;

View File

@ -84,31 +84,31 @@ public class Log {
get().level = l; get().level = l;
} }
static public void trace(String msg) { public static void trace(String msg) {
log(Level.TRACE, msg); log(Level.TRACE, msg);
} }
static public void debug(String msg) { public static void debug(String msg) {
log(Level.DEBUG, msg); log(Level.DEBUG, msg);
} }
static public void info(String msg) { public static void info(String msg) {
log(Level.INFO, msg); log(Level.INFO, msg);
} }
static public void warn(String msg) { public static void warn(String msg) {
log(Level.WARN, msg); log(Level.WARN, msg);
} }
static public void error(String msg) { public static void error(String msg) {
log(Level.ERROR, msg); log(Level.ERROR, msg);
} }
static public void error(Throwable t) { public static void error(Throwable t) {
log(Level.ERROR, t); log(Level.ERROR, t);
} }
static public void log(Level l, String msg) { public static void log(Level l, String msg) {
get().printLogMsg(l, msg); get().printLogMsg(l, msg);
} }
@ -122,7 +122,7 @@ public class Log {
log(l, sw.toString()); log(l, sw.toString());
} }
static public boolean isDebugging() { public static boolean isDebugging() {
return get().isLevelLogged(Level.DEBUG); return get().isLevelLogged(Level.DEBUG);
} }

View File

@ -186,7 +186,7 @@ public class Package implements Comparable<Package> {
saveArtifacts(b); saveArtifacts(b);
} }
static public Package load(Module module, String l) { public static Package load(Module module, String l) {
String name = l.substring(2); String name = l.substring(2);
return new Package(module, name); return new Package(module, name);
} }

View File

@ -148,7 +148,7 @@ public class Source implements Comparable<Source> {
} }
// Parse a line that looks like this: // Parse a line that looks like this:
// S C /code/alfa/A.java 1357631228000 // S C /code/alfa/A.java 1357631228000
static public Source load(Package lastPackage, String l, boolean isGenerated) { public static Source load(Package lastPackage, String l, boolean isGenerated) {
int sp = l.indexOf(' ',4); int sp = l.indexOf(' ',4);
if (sp == -1) return null; if (sp == -1) return null;
String name = l.substring(4,sp); String name = l.substring(4,sp);
@ -185,7 +185,7 @@ public class Source implements Comparable<Source> {
* Detects the existence of module-info.java files and presumes that the directory it resides in * Detects the existence of module-info.java files and presumes that the directory it resides in
* is the name of the current module. * is the name of the current module.
*/ */
static public void scanRoot(File root, public static void scanRoot(File root,
Set<String> suffixes, Set<String> suffixes,
List<String> excludes, List<String> excludes,
List<String> includes, List<String> includes,

View File

@ -94,7 +94,7 @@ public class PubapiVisitor extends ElementScanner14<Void, Void> {
Object constVal = e.getConstantValue(); Object constVal = e.getConstantValue();
String constValStr = null; String constValStr = null;
// TODO: This doesn't seem to be entirely accurate. What if I change // TODO: This doesn't seem to be entirely accurate. What if I change
// from, say, 0 to 0L? (And the field is public final static so that // from, say, 0 to 0L? (And the field is public static final so that
// it could get inlined.) // it could get inlined.)
if (constVal != null) { if (constVal != null) {
if (e.asType().toString().equals("char")) { if (e.asType().toString().equals("char")) {

View File

@ -183,15 +183,15 @@ public class PubApi implements Serializable {
// Used for line-by-line parsing // Used for line-by-line parsing
private PubType lastInsertedType = null; private PubType lastInsertedType = null;
private final static String MODIFIERS = Stream.of(Modifier.values()) private static final String MODIFIERS = Stream.of(Modifier.values())
.map(Modifier::name) .map(Modifier::name)
.map(StringUtils::toLowerCase) .map(StringUtils::toLowerCase)
.collect(Collectors.joining("|", "(", ")")); .collect(Collectors.joining("|", "(", ")"));
private final static Pattern MOD_PATTERN = Pattern.compile("(" + MODIFIERS + " )*"); private static final Pattern MOD_PATTERN = Pattern.compile("(" + MODIFIERS + " )*");
private final static Pattern METHOD_PATTERN = Pattern.compile("(?<ret>.+?) (?<name>\\S+)\\((?<params>.*)\\)( throws (?<throws>.*))?"); private static final Pattern METHOD_PATTERN = Pattern.compile("(?<ret>.+?) (?<name>\\S+)\\((?<params>.*)\\)( throws (?<throws>.*))?");
private final static Pattern VAR_PATTERN = Pattern.compile("VAR (?<modifiers>("+MODIFIERS+" )*)(?<type>.+?) (?<id>\\S+)( = (?<val>.*))?"); private static final Pattern VAR_PATTERN = Pattern.compile("VAR (?<modifiers>("+MODIFIERS+" )*)(?<type>.+?) (?<id>\\S+)( = (?<val>.*))?");
private final static Pattern TYPE_PATTERN = Pattern.compile("TYPE (?<modifiers>("+MODIFIERS+" )*)(?<fullyQualified>\\S+)"); private static final Pattern TYPE_PATTERN = Pattern.compile("TYPE (?<modifiers>("+MODIFIERS+" )*)(?<fullyQualified>\\S+)");
public void appendItem(String l) { public void appendItem(String l) {
try { try {

View File

@ -55,7 +55,7 @@ public class PortFile {
// Port file format: // Port file format:
// byte ordering: high byte first = big endian // byte ordering: high byte first = big endian
// Magic nr, 4 byte int, first in file. // Magic nr, 4 byte int, first in file.
private final static int magicNr = 0x1174; private static final int magicNr = 0x1174;
// Followed by a 4 byte int, with the port nr. // Followed by a 4 byte int, with the port nr.
// Followed by a 8 byte long, with cookie nr. // Followed by a 8 byte long, with cookie nr.

View File

@ -45,11 +45,11 @@ import java.util.TimerTask;
public class PortFileMonitor { public class PortFileMonitor {
// Check if the portfile is gone, every 5 seconds. // Check if the portfile is gone, every 5 seconds.
private final static int CHECK_PORTFILE_INTERVAL = 5000; private static final int CHECK_PORTFILE_INTERVAL = 5000;
final private Timer timer = new Timer(); private final Timer timer = new Timer();
final private PortFile portFile; private final PortFile portFile;
final private SjavacServer server; private final SjavacServer server;
public PortFileMonitor(PortFile portFile, public PortFileMonitor(PortFile portFile,
SjavacServer server) { SjavacServer server) {

View File

@ -59,11 +59,11 @@ import com.sun.tools.sjavac.comp.SjavacImpl;
public class SjavacServer implements Terminable { public class SjavacServer implements Terminable {
// Prefix of line containing return code. // Prefix of line containing return code.
public final static String LINE_TYPE_RC = "RC"; public static final String LINE_TYPE_RC = "RC";
final private String portfilename; private final String portfilename;
final private int poolsize; private final int poolsize;
final private int keepalive; private final int keepalive;
// The secret cookie shared between server and client through the port file. // The secret cookie shared between server and client through the port file.
// Used to prevent clients from believing that they are communicating with // Used to prevent clients from believing that they are communicating with