8264331: Use the blessed modifier order in jdk.compiler
Reviewed-by: vromero, iris, shade
This commit is contained in:
parent
0228734902
commit
d2df9a7df8
src/jdk.compiler/share/classes/com/sun/tools
javac
api
code
comp
jvm
parser
tree
util
sjavac
@ -360,7 +360,7 @@ public class JavacTaskPool {
|
||||
*/
|
||||
static class ReusableJavaCompiler extends JavaCompiler {
|
||||
|
||||
final static Factory<JavaCompiler> factory = ReusableJavaCompiler::new;
|
||||
static final Factory<JavaCompiler> factory = ReusableJavaCompiler::new;
|
||||
|
||||
ReusableJavaCompiler(Context context) {
|
||||
super(context);
|
||||
@ -387,7 +387,7 @@ public class JavacTaskPool {
|
||||
*/
|
||||
static class ReusableLog extends Log {
|
||||
|
||||
final static Factory<Log> factory = ReusableLog::new;
|
||||
static final Factory<Log> factory = ReusableLog::new;
|
||||
|
||||
Context context;
|
||||
|
||||
|
@ -799,7 +799,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
|
||||
}
|
||||
/** 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.kind != ERR) &&
|
||||
(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
|
||||
* 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) ||
|
||||
(owner.kind == TYP && owner.type.hasTag(TYPEVAR))
|
||||
) return name;
|
||||
@ -2470,7 +2470,7 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
static public AccessCode getFromCode(int code) {
|
||||
public static AccessCode getFromCode(int code) {
|
||||
for (AccessCode aCodes : AccessCode.values()) {
|
||||
if (aCodes.code == code) {
|
||||
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
|
||||
* 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 boolean isTerminal() { return true; }
|
||||
};
|
||||
|
@ -375,7 +375,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons
|
||||
return accept(stripMetadata, null);
|
||||
}
|
||||
//where
|
||||
private final static TypeMapping<Void> stripMetadata = new StructuralTypeMapping<Void>() {
|
||||
private static final TypeMapping<Void> stripMetadata = new StructuralTypeMapping<Void>() {
|
||||
@Override
|
||||
public Type visitClassType(ClassType t, Void aVoid) {
|
||||
return super.visitClassType((ClassType)t.typeNoMetadata(), aVoid);
|
||||
|
@ -1063,10 +1063,10 @@ public class Types {
|
||||
* Is t a subtype of s?<br>
|
||||
* (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);
|
||||
}
|
||||
final public boolean isSubtypeNoCapture(Type t, Type s) {
|
||||
public final boolean isSubtypeNoCapture(Type t, Type s) {
|
||||
return isSubtype(t, s, false);
|
||||
}
|
||||
public boolean isSubtype(Type t, Type s, boolean capture) {
|
||||
@ -4895,7 +4895,7 @@ public class Types {
|
||||
* Void if a second argument is not needed.
|
||||
*/
|
||||
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 visitWildcardType(WildcardType 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.
|
||||
*/
|
||||
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 visitMethodSymbol(MethodSymbol 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.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
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; }
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ public class ArgumentAttr extends JCTree.Visitor {
|
||||
}
|
||||
|
||||
@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);
|
||||
if (deferredAttrContext.mode == AttrMode.SPECULATIVE) {
|
||||
Type t = (resultInfo.pt == Type.recoveryType) ?
|
||||
|
@ -2062,7 +2062,7 @@ public class Attr extends JCTree.Visitor {
|
||||
.collect(List.collector()));
|
||||
}
|
||||
|
||||
final static TypeTag[] primitiveTags = new TypeTag[]{
|
||||
static final TypeTag[] primitiveTags = new TypeTag[]{
|
||||
BYTE,
|
||||
CHAR,
|
||||
SHORT,
|
||||
|
@ -95,7 +95,7 @@ public class TypeEnter implements Completer {
|
||||
|
||||
/** 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 Enter enter;
|
||||
|
@ -64,45 +64,45 @@ import com.sun.tools.javac.util.Name;
|
||||
* deletion without notice.</b> */
|
||||
public class ClassFile {
|
||||
|
||||
public final static int JAVA_MAGIC = 0xCAFEBABE;
|
||||
public static final int JAVA_MAGIC = 0xCAFEBABE;
|
||||
|
||||
// see Target
|
||||
public final static int CONSTANT_Utf8 = 1;
|
||||
public final static int CONSTANT_Unicode = 2;
|
||||
public final static int CONSTANT_Integer = 3;
|
||||
public final static int CONSTANT_Float = 4;
|
||||
public final static int CONSTANT_Long = 5;
|
||||
public final static int CONSTANT_Double = 6;
|
||||
public final static int CONSTANT_Class = 7;
|
||||
public final static int CONSTANT_String = 8;
|
||||
public final static int CONSTANT_Fieldref = 9;
|
||||
public final static int CONSTANT_Methodref = 10;
|
||||
public final static int CONSTANT_InterfaceMethodref = 11;
|
||||
public final static int CONSTANT_NameandType = 12;
|
||||
public final static int CONSTANT_MethodHandle = 15;
|
||||
public final static int CONSTANT_MethodType = 16;
|
||||
public final static int CONSTANT_Dynamic = 17;
|
||||
public final static int CONSTANT_InvokeDynamic = 18;
|
||||
public final static int CONSTANT_Module = 19;
|
||||
public final static int CONSTANT_Package = 20;
|
||||
public static final int CONSTANT_Utf8 = 1;
|
||||
public static final int CONSTANT_Unicode = 2;
|
||||
public static final int CONSTANT_Integer = 3;
|
||||
public static final int CONSTANT_Float = 4;
|
||||
public static final int CONSTANT_Long = 5;
|
||||
public static final int CONSTANT_Double = 6;
|
||||
public static final int CONSTANT_Class = 7;
|
||||
public static final int CONSTANT_String = 8;
|
||||
public static final int CONSTANT_Fieldref = 9;
|
||||
public static final int CONSTANT_Methodref = 10;
|
||||
public static final int CONSTANT_InterfaceMethodref = 11;
|
||||
public static final int CONSTANT_NameandType = 12;
|
||||
public static final int CONSTANT_MethodHandle = 15;
|
||||
public static final int CONSTANT_MethodType = 16;
|
||||
public static final int CONSTANT_Dynamic = 17;
|
||||
public static final int CONSTANT_InvokeDynamic = 18;
|
||||
public static final int CONSTANT_Module = 19;
|
||||
public static final int CONSTANT_Package = 20;
|
||||
|
||||
public final static int REF_getField = 1;
|
||||
public final static int REF_getStatic = 2;
|
||||
public final static int REF_putField = 3;
|
||||
public final static int REF_putStatic = 4;
|
||||
public final static int REF_invokeVirtual = 5;
|
||||
public final static int REF_invokeStatic = 6;
|
||||
public final static int REF_invokeSpecial = 7;
|
||||
public final static int REF_newInvokeSpecial = 8;
|
||||
public final static int REF_invokeInterface = 9;
|
||||
public static final int REF_getField = 1;
|
||||
public static final int REF_getStatic = 2;
|
||||
public static final int REF_putField = 3;
|
||||
public static final int REF_putStatic = 4;
|
||||
public static final int REF_invokeVirtual = 5;
|
||||
public static final int REF_invokeStatic = 6;
|
||||
public static final int REF_invokeSpecial = 7;
|
||||
public static final int REF_newInvokeSpecial = 8;
|
||||
public static final int REF_invokeInterface = 9;
|
||||
|
||||
public final static int MAX_PARAMETERS = 0xff;
|
||||
public final static int MAX_DIMENSIONS = 0xff;
|
||||
public final static int MAX_CODE = 0xffff;
|
||||
public final static int MAX_LOCALS = 0xffff;
|
||||
public final static int MAX_STACK = 0xffff;
|
||||
public static final int MAX_PARAMETERS = 0xff;
|
||||
public static final int MAX_DIMENSIONS = 0xff;
|
||||
public static final int MAX_CODE = 0xffff;
|
||||
public static final int MAX_LOCALS = 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 {
|
||||
V45_3(45, 3), // base level for all attributes
|
||||
|
@ -231,7 +231,7 @@ public class ClassWriter extends ClassFile {
|
||||
return sbuf.toString();
|
||||
}
|
||||
//where
|
||||
private final static String[] flagName = {
|
||||
private static final String[] flagName = {
|
||||
"PUBLIC", "PRIVATE", "PROTECTED", "STATIC", "FINAL",
|
||||
"SUPER", "VOLATILE", "TRANSIENT", "NATIVE", "INTERFACE",
|
||||
"ABSTRACT", "STRICTFP"};
|
||||
|
@ -2243,7 +2243,7 @@ public class Code {
|
||||
}
|
||||
|
||||
private static class Mneumonics {
|
||||
private final static String[] mnem = new String[ByteCodeCount];
|
||||
private static final String[] mnem = new String[ByteCodeCount];
|
||||
static {
|
||||
mnem[nop] = "nop";
|
||||
mnem[aconst_null] = "aconst_null";
|
||||
|
@ -137,7 +137,7 @@ public class JNIWriter {
|
||||
static boolean isNative(Symbol s) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -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 */ {null, VarAndExplicitNotAllowed, VarAndImplicitNotAllowed},
|
||||
/* EXPLICIT */ {VarAndExplicitNotAllowed, null, ImplicitAndExplicitNotAllowed},
|
||||
|
@ -46,7 +46,7 @@ public class ReferenceParser {
|
||||
* 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.
|
||||
*/
|
||||
static public class Reference {
|
||||
public static class Reference {
|
||||
public final JCTree.JCExpression moduleName;
|
||||
/** The type, if any, in the signature. */
|
||||
public final JCTree qualExpr;
|
||||
@ -66,7 +66,7 @@ public class ReferenceParser {
|
||||
/**
|
||||
* 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;
|
||||
ParseException(String message) {
|
||||
super(message);
|
||||
|
@ -390,7 +390,7 @@ public class Tokens {
|
||||
}
|
||||
}
|
||||
|
||||
final static class NamedToken extends Token {
|
||||
static final class NamedToken extends Token {
|
||||
/** The name of this token */
|
||||
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 */
|
||||
public final int radix;
|
||||
|
||||
|
@ -83,12 +83,12 @@ public class Pretty extends JCTree.Visitor {
|
||||
* A string sequence to be used when Pretty output should be constrained
|
||||
* 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
|
||||
*/
|
||||
private final static int PREFERRED_LENGTH = 20;
|
||||
private static final int PREFERRED_LENGTH = 20;
|
||||
|
||||
/** Align code to be indented to left margin.
|
||||
*/
|
||||
|
@ -401,7 +401,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
|
||||
return config;
|
||||
}
|
||||
|
||||
static public class SimpleConfiguration implements Configuration {
|
||||
public static class SimpleConfiguration implements Configuration {
|
||||
|
||||
protected Map<MultilineLimit, Integer> multilineLimits;
|
||||
protected EnumSet<DiagnosticPart> visibleParts;
|
||||
|
@ -215,7 +215,7 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
|
||||
return (BasicConfiguration)super.getConfiguration();
|
||||
}
|
||||
|
||||
static public class BasicConfiguration extends SimpleConfiguration {
|
||||
public static class BasicConfiguration extends SimpleConfiguration {
|
||||
|
||||
protected Map<DiagnosticPart, Integer> indentationLevels;
|
||||
protected Map<BasicFormatKind, String> availableFormats;
|
||||
|
@ -84,9 +84,9 @@ public class Bits {
|
||||
|
||||
}
|
||||
|
||||
private final static int wordlen = 32;
|
||||
private final static int wordshift = 5;
|
||||
private final static int wordmask = wordlen - 1;
|
||||
private static final int wordlen = 32;
|
||||
private static final int wordshift = 5;
|
||||
private static final int wordmask = wordlen - 1;
|
||||
|
||||
public int[] bits = null;
|
||||
// This field will store last version of bits after every change.
|
||||
|
@ -78,12 +78,12 @@ public abstract class Dependencies {
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
abstract public void pop();
|
||||
public abstract void pop();
|
||||
|
||||
public enum CompletionCause implements GraphUtils.DependencyKind {
|
||||
CLASS_READER,
|
||||
|
@ -40,7 +40,7 @@ public class IntHashTable {
|
||||
protected int[] ints; // the image set
|
||||
protected int mask; // used to clip int's into the domain
|
||||
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.
|
||||
|
@ -83,7 +83,7 @@ public class Iterators {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private final static Iterator EMPTY = new Iterator() {
|
||||
private static final Iterator EMPTY = new Iterator() {
|
||||
public boolean hasNext() {
|
||||
return false;
|
||||
}
|
||||
|
@ -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,
|
||||
Object... args) {
|
||||
String msg = null;
|
||||
|
@ -37,37 +37,37 @@ public interface LayoutCharacters {
|
||||
|
||||
/** Tabulator column increment.
|
||||
*/
|
||||
final static int TabInc = 8;
|
||||
static final int TabInc = 8;
|
||||
|
||||
/** Standard indentation for subdiagnostics
|
||||
*/
|
||||
final static int DiagInc = 4;
|
||||
static final int DiagInc = 4;
|
||||
|
||||
/** Standard indentation for additional diagnostic lines
|
||||
*/
|
||||
final static int DetailsInc = 2;
|
||||
static final int DetailsInc = 2;
|
||||
|
||||
/** Tabulator character.
|
||||
*/
|
||||
final static byte TAB = 0x9;
|
||||
static final byte TAB = 0x9;
|
||||
|
||||
/** Line feed character.
|
||||
*/
|
||||
final static byte LF = 0xA;
|
||||
static final byte LF = 0xA;
|
||||
|
||||
/** Form feed character.
|
||||
*/
|
||||
final static byte FF = 0xC;
|
||||
static final byte FF = 0xC;
|
||||
|
||||
/** Carriage return character.
|
||||
*/
|
||||
final static byte CR = 0xD;
|
||||
static final byte CR = 0xD;
|
||||
|
||||
/** End of input character. Used as a sentinel to denote the
|
||||
* character one beyond the last defined character in a
|
||||
* source file.
|
||||
*/
|
||||
final static byte EOI = 0x1A;
|
||||
static final byte EOI = 0x1A;
|
||||
|
||||
/** Bump column to the next tab.
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ public class SharedNameTable extends Name.Table {
|
||||
// maintain a freelist of recently used name tables for reuse.
|
||||
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()) {
|
||||
SharedNameTable t = freelist.head.get();
|
||||
freelist = freelist.tail;
|
||||
@ -54,7 +54,7 @@ public class SharedNameTable extends Name.Table {
|
||||
return new SharedNameTable(names);
|
||||
}
|
||||
|
||||
static private synchronized void dispose(SharedNameTable t) {
|
||||
private static synchronized void dispose(SharedNameTable t) {
|
||||
freelist = freelist.prepend(new SoftReference<>(t));
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ import java.lang.ref.WeakReference;
|
||||
* deletion without notice.</b>
|
||||
*/
|
||||
public class UnsharedNameTable extends Name.Table {
|
||||
static public Name.Table create(Names names) {
|
||||
public static Name.Table create(Names names) {
|
||||
return new UnsharedNameTable(names);
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class CompileJavaPackages implements Transformer {
|
||||
// The current limited sharing of data between concurrent JavaCompilers
|
||||
// in the server will not give speedups above 3 cores. Thus this limit.
|
||||
// We hope to improve this in the future.
|
||||
final static int limitOnConcurrency = 3;
|
||||
static final int limitOnConcurrency = 3;
|
||||
|
||||
Options args;
|
||||
|
||||
|
@ -84,31 +84,31 @@ public class Log {
|
||||
get().level = l;
|
||||
}
|
||||
|
||||
static public void trace(String msg) {
|
||||
public static void trace(String msg) {
|
||||
log(Level.TRACE, msg);
|
||||
}
|
||||
|
||||
static public void debug(String msg) {
|
||||
public static void debug(String msg) {
|
||||
log(Level.DEBUG, msg);
|
||||
}
|
||||
|
||||
static public void info(String msg) {
|
||||
public static void info(String msg) {
|
||||
log(Level.INFO, msg);
|
||||
}
|
||||
|
||||
static public void warn(String msg) {
|
||||
public static void warn(String msg) {
|
||||
log(Level.WARN, msg);
|
||||
}
|
||||
|
||||
static public void error(String msg) {
|
||||
public static void error(String msg) {
|
||||
log(Level.ERROR, msg);
|
||||
}
|
||||
|
||||
static public void error(Throwable t) {
|
||||
public static void error(Throwable 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);
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ public class Log {
|
||||
log(l, sw.toString());
|
||||
}
|
||||
|
||||
static public boolean isDebugging() {
|
||||
public static boolean isDebugging() {
|
||||
return get().isLevelLogged(Level.DEBUG);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ public class Package implements Comparable<Package> {
|
||||
saveArtifacts(b);
|
||||
}
|
||||
|
||||
static public Package load(Module module, String l) {
|
||||
public static Package load(Module module, String l) {
|
||||
String name = l.substring(2);
|
||||
return new Package(module, name);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ public class Source implements Comparable<Source> {
|
||||
}
|
||||
// Parse a line that looks like this:
|
||||
// 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);
|
||||
if (sp == -1) return null;
|
||||
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
|
||||
* is the name of the current module.
|
||||
*/
|
||||
static public void scanRoot(File root,
|
||||
public static void scanRoot(File root,
|
||||
Set<String> suffixes,
|
||||
List<String> excludes,
|
||||
List<String> includes,
|
||||
|
@ -94,7 +94,7 @@ public class PubapiVisitor extends ElementScanner14<Void, Void> {
|
||||
Object constVal = e.getConstantValue();
|
||||
String constValStr = null;
|
||||
// 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.)
|
||||
if (constVal != null) {
|
||||
if (e.asType().toString().equals("char")) {
|
||||
|
@ -183,15 +183,15 @@ public class PubApi implements Serializable {
|
||||
// Used for line-by-line parsing
|
||||
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(StringUtils::toLowerCase)
|
||||
.collect(Collectors.joining("|", "(", ")"));
|
||||
|
||||
private final static Pattern MOD_PATTERN = Pattern.compile("(" + MODIFIERS + " )*");
|
||||
private final static 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 final static Pattern TYPE_PATTERN = Pattern.compile("TYPE (?<modifiers>("+MODIFIERS+" )*)(?<fullyQualified>\\S+)");
|
||||
private static final Pattern MOD_PATTERN = Pattern.compile("(" + MODIFIERS + " )*");
|
||||
private static final Pattern METHOD_PATTERN = Pattern.compile("(?<ret>.+?) (?<name>\\S+)\\((?<params>.*)\\)( throws (?<throws>.*))?");
|
||||
private static final Pattern VAR_PATTERN = Pattern.compile("VAR (?<modifiers>("+MODIFIERS+" )*)(?<type>.+?) (?<id>\\S+)( = (?<val>.*))?");
|
||||
private static final Pattern TYPE_PATTERN = Pattern.compile("TYPE (?<modifiers>("+MODIFIERS+" )*)(?<fullyQualified>\\S+)");
|
||||
|
||||
public void appendItem(String l) {
|
||||
try {
|
||||
|
@ -55,7 +55,7 @@ public class PortFile {
|
||||
// Port file format:
|
||||
// byte ordering: high byte first = big endian
|
||||
// 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 8 byte long, with cookie nr.
|
||||
|
||||
|
@ -45,11 +45,11 @@ import java.util.TimerTask;
|
||||
public class PortFileMonitor {
|
||||
|
||||
// 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();
|
||||
final private PortFile portFile;
|
||||
final private SjavacServer server;
|
||||
private final Timer timer = new Timer();
|
||||
private final PortFile portFile;
|
||||
private final SjavacServer server;
|
||||
|
||||
public PortFileMonitor(PortFile portFile,
|
||||
SjavacServer server) {
|
||||
|
@ -59,11 +59,11 @@ import com.sun.tools.sjavac.comp.SjavacImpl;
|
||||
public class SjavacServer implements Terminable {
|
||||
|
||||
// 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;
|
||||
final private int poolsize;
|
||||
final private int keepalive;
|
||||
private final String portfilename;
|
||||
private final int poolsize;
|
||||
private final int keepalive;
|
||||
|
||||
// The secret cookie shared between server and client through the port file.
|
||||
// Used to prevent clients from believing that they are communicating with
|
||||
|
Loading…
x
Reference in New Issue
Block a user