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

Side by Side Diff: editor/util/plugins/com.google.dart.java2dart/resources/test_support_include.dart

Issue 189803004: Translate private Java members to private Dart members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks Created 6 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 1
2 2
3 class TestSource implements Source { 3 class TestSource implements Source {
4 int get hashCode => 0; 4 int get hashCode => 0;
5 bool operator ==(Object object) { 5 bool operator ==(Object object) {
6 return object is TestSource; 6 return object is TestSource;
7 } 7 }
8 AnalysisContext get context { 8 AnalysisContext get context {
9 throw new UnsupportedOperationException(); 9 throw new UnsupportedOperationException();
10 } 10 }
(...skipping 22 matching lines...) Expand all
33 Source resolveRelative(Uri uri) { 33 Source resolveRelative(Uri uri) {
34 throw new UnsupportedOperationException(); 34 throw new UnsupportedOperationException();
35 } 35 }
36 UriKind get uriKind { 36 UriKind get uriKind {
37 throw new UnsupportedOperationException(); 37 throw new UnsupportedOperationException();
38 } 38 }
39 TimestampedData<String> get contents { 39 TimestampedData<String> get contents {
40 throw new UnsupportedOperationException(); 40 throw new UnsupportedOperationException();
41 } 41 }
42 } 42 }
43
44 /**
45 * Wrapper around [Function] which should be called with "target" and "arguments ".
46 */
47 class MethodTrampoline {
48 int parameterCount;
49 Function trampoline;
50 MethodTrampoline(this.parameterCount, this.trampoline);
51 Object invoke(target, List arguments) {
52 if (arguments.length != parameterCount) {
53 throw new IllegalArgumentException("${arguments.length} != $parameterCount ");
54 }
55 switch (parameterCount) {
56 case 0:
57 return trampoline(target);
58 case 1:
59 return trampoline(target, arguments[0]);
60 case 2:
61 return trampoline(target, arguments[0], arguments[1]);
62 case 3:
63 return trampoline(target, arguments[0], arguments[1], arguments[2]);
64 case 4:
65 return trampoline(target, arguments[0], arguments[1], arguments[2], argu ments[3]);
66 default:
67 throw new IllegalArgumentException("Not implemented for > 4 arguments");
68 }
69 }
70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698