Chromium Code Reviews| Index: pkg/analyzer/lib/src/generated/java_core.dart |
| diff --git a/pkg/analyzer/lib/src/generated/java_core.dart b/pkg/analyzer/lib/src/generated/java_core.dart |
| index fd684ed155d9b3999d4a8dab5ee72f309ab493a0..3d187aa6bc369eb50c83576c49e0bafb168b8af7 100644 |
| --- a/pkg/analyzer/lib/src/generated/java_core.dart |
| +++ b/pkg/analyzer/lib/src/generated/java_core.dart |
| @@ -4,23 +4,9 @@ |
| library analyzer.src.generated.java_core; |
| -const int LONG_MAX_VALUE = 0x7fffffffffffffff; |
| - |
| final Stopwatch nanoTimeStopwatch = new Stopwatch(); |
| /** |
| - * Inserts the given arguments into [pattern]. |
| - * |
| - * format('Hello, {0}!', 'John') = 'Hello, John!' |
| - * format('{0} are you {1}ing?', 'How', 'do') = 'How are you doing?' |
| - * format('{0} are you {1}ing?', 'What', 'read') = 'What are you reading?' |
| - */ |
| -String format(String pattern, |
|
Brian Wilkerson
2016/02/12 15:50:33
'format' is used in analysis_server, so it can't b
Bob Nystrom
2016/02/12 19:11:21
Done.
|
| - [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]) { |
| - return formatList(pattern, [arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7]); |
| -} |
| - |
| -/** |
| * Inserts the given [args] into [pattern]. |
| * |
| * format('Hello, {0}!', ['John']) = 'Hello, John!' |
| @@ -41,35 +27,6 @@ String formatList(String pattern, List<Object> arguments) { |
| }); |
| } |
| -bool javaCollectionContainsAll(Iterable list, Iterable c) { |
| - return c.fold(true, (bool prev, e) => prev && list.contains(e)); |
| -} |
| - |
| -javaListSet(List list, int index, newValue) { |
| - var oldValue = list[index]; |
| - list[index] = newValue; |
| - return oldValue; |
| -} |
| - |
| -bool javaSetEquals(Set a, Set b) { |
| - return a.containsAll(b) && b.containsAll(a); |
| -} |
| - |
| -bool javaStringEqualsIgnoreCase(String a, String b) { |
| - return a.toLowerCase() == b.toLowerCase(); |
| -} |
| - |
| -bool javaStringRegionMatches( |
| - String t, int toffset, String o, int ooffset, int len) { |
| - if (toffset < 0) return false; |
| - if (ooffset < 0) return false; |
| - var tend = toffset + len; |
| - var oend = ooffset + len; |
| - if (tend > t.length) return false; |
| - if (oend > o.length) return false; |
| - return t.substring(toffset, tend) == o.substring(ooffset, oend); |
| -} |
| - |
| /// Parses given string to [Uri], throws [URISyntaxException] if invalid. |
| Uri parseUriWithException(String str) { |
| Uri uri; |
| @@ -130,6 +87,7 @@ class Character { |
| static const int MIN_SUPPLEMENTARY_CODE_POINT = 0x010000; |
| static const int MIN_LOW_SURROGATE = 0xDC00; |
| static const int MIN_HIGH_SURROGATE = 0xD800; |
| + |
| static int digit(int codePoint, int radix) { |
| if (radix != 16) { |
| throw new ArgumentError("only radix == 16 is supported"); |
| @@ -146,29 +104,15 @@ class Character { |
| return -1; |
| } |
| - static bool isDigit(int c) { |
| - return c >= 0x30 && c <= 0x39; |
| - } |
| - |
| - static bool isLetter(int c) { |
| - return c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A; |
| - } |
| + static bool isDigit(int c) => c >= 0x30 && c <= 0x39; |
| - static bool isLetterOrDigit(int c) { |
| - return isLetter(c) || isDigit(c); |
| - } |
| + static bool isLetter(int c) => |
| + c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A; |
| - static bool isLowerCase(int c) { |
| - return c >= 0x61 && c <= 0x7A; |
| - } |
| + static bool isLetterOrDigit(int c) => isLetter(c) || isDigit(c); |
| - static bool isUpperCase(int c) { |
| - return c >= 0x41 && c <= 0x5A; |
| - } |
| - |
| - static bool isWhitespace(int c) { |
| - return c == 0x09 || c == 0x20 || c == 0x0A || c == 0x0D; |
| - } |
| + static bool isWhitespace(int c) => |
| + c == 0x09 || c == 0x20 || c == 0x0A || c == 0x0D; |
| static String toChars(int codePoint) { |
| if (codePoint < 0 || codePoint > MAX_CODE_POINT) { |
| @@ -182,20 +126,6 @@ class Character { |
| int c1 = (offset & 0x3ff) + MIN_LOW_SURROGATE; |
| return new String.fromCharCodes([c0, c1]); |
| } |
| - |
| - static int toLowerCase(int c) { |
| - if (c >= 0x41 && c <= 0x5A) { |
| - return 0x61 + (c - 0x41); |
| - } |
| - return c; |
| - } |
| - |
| - static int toUpperCase(int c) { |
| - if (c >= 0x61 && c <= 0x7A) { |
| - return 0x41 + (c - 0x61); |
| - } |
| - return c; |
| - } |
| } |
| abstract class Enum<E extends Enum> implements Comparable<E> { |
| @@ -219,35 +149,6 @@ class IllegalStateException extends JavaException { |
| IllegalStateException([message = ""]) : super(message); |
| } |
| -class JavaArrays { |
| - static bool equals(List a, List b) { |
| - if (identical(a, b)) { |
| - return true; |
| - } |
| - if (a.length != b.length) { |
| - return false; |
| - } |
| - var len = a.length; |
| - for (int i = 0; i < len; i++) { |
| - if (a[i] != b[i]) { |
| - return false; |
| - } |
| - } |
| - return true; |
| - } |
| - |
| - static int makeHashCode(List a) { |
|
Brian Wilkerson
2016/02/12 15:50:33
'makeHashCode' is used in analysis_server
Bob Nystrom
2016/02/12 19:11:21
Done.
|
| - if (a == null) { |
| - return 0; |
| - } |
| - int result = 1; |
| - for (var element in a) { |
| - result = 31 * result + (element == null ? 0 : element.hashCode); |
| - } |
| - return result; |
| - } |
| -} |
| - |
| class JavaException implements Exception { |
| final String message; |
| final Object cause; |
| @@ -292,10 +193,6 @@ class JavaString { |
| if (fromIndex < 0) fromIndex = 0; |
| return target.lastIndexOf(str, fromIndex); |
| } |
| - |
| - static bool startsWithBefore(String s, String other, int start) { |
| - return s.indexOf(other, start) != -1; |
| - } |
| } |
| class JavaSystem { |