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

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/java_core.dart

Issue 12604020: analyzer_experimental checkpoint and AnalysisContext example. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't mark Source as 'changed'. Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library java.core; 1 library java.core;
2 2
3 import "dart:math" as math; 3 import "dart:math" as math;
4 import "dart:uri"; 4 import "dart:uri";
5 5
6 class JavaSystem { 6 class JavaSystem {
7 static int currentTimeMillis() { 7 static int currentTimeMillis() {
8 return (new DateTime.now()).millisecondsSinceEpoch; 8 return (new DateTime.now()).millisecondsSinceEpoch;
9 } 9 }
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 void javaMapPutAll(Map target, Map source) { 401 void javaMapPutAll(Map target, Map source) {
402 source.forEach((k, v) { 402 source.forEach((k, v) {
403 target[k] = v; 403 target[k] = v;
404 }); 404 });
405 } 405 }
406 406
407 bool javaStringEqualsIgnoreCase(String a, String b) { 407 bool javaStringEqualsIgnoreCase(String a, String b) {
408 return a.toLowerCase() == b.toLowerCase(); 408 return a.toLowerCase() == b.toLowerCase();
409 } 409 }
410 410
411 bool javaBooleanOr(bool a, bool b) {
412 return a || b;
413 }
414
411 class JavaStringBuilder { 415 class JavaStringBuilder {
412 StringBuffer sb = new StringBuffer(); 416 StringBuffer sb = new StringBuffer();
413 String toString() => sb.toString(); 417 String toString() => sb.toString();
414 void append(x) { 418 void append(x) {
415 sb.write(x); 419 sb.write(x);
416 } 420 }
417 void appendChar(int c) { 421 void appendChar(int c) {
418 sb.writeCharCode(c); 422 sb.writeCharCode(c);
419 } 423 }
420 int get length => sb.length; 424 int get length => sb.length;
421 void set length(int newLength) { 425 void set length(int newLength) {
422 if (newLength < 0) { 426 if (newLength < 0) {
423 throw new StringIndexOutOfBoundsException(newLength); 427 throw new StringIndexOutOfBoundsException(newLength);
424 } 428 }
425 if (sb.length < newLength) { 429 if (sb.length < newLength) {
426 while (sb.length < newLength) { 430 while (sb.length < newLength) {
427 sb.writeCharCode(0); 431 sb.writeCharCode(0);
428 } 432 }
429 } else if (sb.length > newLength) { 433 } else if (sb.length > newLength) {
430 var s = sb.toString().substring(0, newLength); 434 var s = sb.toString().substring(0, newLength);
431 sb = new StringBuffer(s); 435 sb = new StringBuffer(s);
432 } 436 }
433 } 437 }
434 void clear() { 438 void clear() {
435 sb = new StringBuffer(); 439 sb = new StringBuffer();
436 } 440 }
437 } 441 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698