Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1001)

Unified Diff: pkg/analyzer-experimental/lib/src/generated/java_core.dart

Issue 12502002: Update analyzer-experimental. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer-experimental/lib/src/generated/java_core.dart
diff --git a/pkg/analyzer-experimental/lib/src/generated/java_core.dart b/pkg/analyzer-experimental/lib/src/generated/java_core.dart
index 7b148cb9ac269854429baca19b0367ca07bea51b..a450fbd85de638cc6afdb9fe190f37f7403ca222 100644
--- a/pkg/analyzer-experimental/lib/src/generated/java_core.dart
+++ b/pkg/analyzer-experimental/lib/src/generated/java_core.dart
@@ -1,30 +1,18 @@
library java.core;
import "dart:math" as math;
-import "dart:io";
import "dart:uri";
-class System {
- static final String pathSeparator = Platform.pathSeparator;
- static final int pathSeparatorChar = Platform.pathSeparator.codeUnitAt(0);
-
+class JavaSystem {
static int currentTimeMillis() {
return (new DateTime.now()).millisecondsSinceEpoch;
}
- static String getProperty(String name) {
- if (name == 'os.name') {
- return Platform.operatingSystem;
- }
- if (name == 'line.separator') {
- if (Platform.operatingSystem == 'windows') {
- return '\r\n';
- }
- return '\n';
+
+ static void arraycopy(List src, int srcPos, List dest, int destPos, int length) {
+ for (int i = 0; i < length; i++) {
+ dest[destPos + i] = src[srcPos + i];
}
- return null;
}
- static String getenv(String name) => Platform.environment[name];
-
}
/**
@@ -46,7 +34,7 @@ bool isInstanceOf(o, Type t) {
if (oTypeName == "${tTypeName}Impl") {
return true;
}
- if (oTypeName.startsWith("_HashMap") && tTypeName == "Map") {
+ if (oTypeName.startsWith("HashMap") && tTypeName == "Map") {
return true;
}
if (oTypeName.startsWith("List") && tTypeName == "List") {
@@ -90,6 +78,9 @@ class Character {
static bool isLetterOrDigit(int c) {
return isLetter(c) || c >= 0x30 && c <= 0x39;
}
+ static bool isWhitespace(int c) {
+ return c == 0x09 || c == 0x20 || c == 0x0A || c == 0x0D;
+ }
static int digit(int codePoint, int radix) {
if (radix != 16) {
throw new ArgumentError("only radix == 16 is supported");
@@ -100,6 +91,10 @@ class Character {
if (0x41 <= codePoint && codePoint <= 0x46) {
return 0xA + (codePoint - 0x41);
}
+ if (0x61 <= codePoint && codePoint <= 0x66) {
+ return 0xA + (codePoint - 0x61);
+ }
+ return -1;
}
static String toChars(int codePoint) {
throw new UnsupportedOperationException();
@@ -132,7 +127,7 @@ String _printf(String fmt, List args) {
int c = fmt.codeUnitAt(i);
if (c == 0x25) {
if (markFound) {
- sb.addCharCode(c);
+ sb.writeCharCode(c);
markFound = false;
} else {
markFound = true;
@@ -143,18 +138,18 @@ String _printf(String fmt, List args) {
markFound = false;
// %d
if (c == 0x64) {
- sb.add(args[argIndex++]);
+ sb.writeCharCode(args[argIndex++]);
continue;
}
// %s
if (c == 0x73) {
- sb.add(args[argIndex++]);
+ sb.writeCharCode(args[argIndex++]);
continue;
}
// unknown
throw new IllegalArgumentException('[$fmt][$i] = 0x${c.toRadixString(16)}');
} else {
- sb.addCharCode(c);
+ sb.writeCharCode(c);
}
}
return sb.toString();
@@ -181,7 +176,7 @@ class PrintStringWriter extends PrintWriter {
final StringBuffer _sb = new StringBuffer();
void print(x) {
- _sb.add(x);
+ _sb.write(x);
}
String toString() => _sb.toString();
@@ -193,7 +188,7 @@ class StringUtils {
static String repeat(String s, int n) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < n; i++) {
- sb.add(s);
+ sb.write(s);
}
return sb.toString();
}
@@ -268,7 +263,7 @@ class ListWrapper<E> extends Collection<E> implements List<E> {
}
void addLast(E value) {
- elements.addLast(value);
+ elements.add(value);
}
void addAll(Iterable<E> iterable) {
@@ -320,6 +315,10 @@ class ListWrapper<E> extends Collection<E> implements List<E> {
void insertRange(int start, int length, [E fill]) {
elements.insertRange(start, length, fill);
}
+
+ Map<int, E> asMap() {
+ return elements.asMap();
+ }
}
class JavaIterator<E> {
@@ -388,20 +387,6 @@ void javaMapPutAll(Map target, Map source) {
});
}
-File newRelativeFile(File base, String child) {
- var childPath = new Path(base.fullPathSync()).join(new Path(child));
- return new File.fromPath(childPath);
-}
-
-File newFileFromUri(Uri uri) {
- return new File(uri.path);
-}
-
-File getAbsoluteFile(File file) {
- var path = file.fullPathSync();
- return new File(path);
-}
-
-Uri newUriFromFile(File file) {
- return new Uri.fromComponents(path: file.fullPathSync());
+bool javaStringEqualsIgnoreCase(String a, String b) {
+ return a.toLowerCase() == b.toLowerCase();
}

Powered by Google App Engine
This is Rietveld 408576698