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

Side by Side Diff: pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: ADded test expectations. Created 8 years, 1 month 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
« no previous file with comments | « lib/isolate/timer.dart ('k') | pkg/dartdoc/lib/src/mirrors/util.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library mirrors_dart2js; 5 library mirrors_dart2js;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../../../../lib/compiler/compiler.dart' as diagnostics; 10 import '../../../../../lib/compiler/compiler.dart' as diagnostics;
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 750
751 bool get isInterface => _class.isInterface(); 751 bool get isInterface => _class.isInterface();
752 752
753 bool get isAbstract => _class.modifiers.isAbstract(); 753 bool get isAbstract => _class.modifiers.isAbstract();
754 754
755 bool get isPrivate => _isPrivate(simpleName); 755 bool get isPrivate => _isPrivate(simpleName);
756 756
757 bool get isDeclaration => true; 757 bool get isDeclaration => true;
758 758
759 List<TypeMirror> get typeArguments { 759 List<TypeMirror> get typeArguments {
760 throw new UnsupportedOperationException( 760 throw new UnsupportedError(
761 'Declarations do not have type arguments'); 761 'Declarations do not have type arguments');
762 } 762 }
763 763
764 List<TypeVariableMirror> get typeVariables { 764 List<TypeVariableMirror> get typeVariables {
765 if (_typeVariables == null) { 765 if (_typeVariables == null) {
766 _typeVariables = <TypeVariableMirror>[]; 766 _typeVariables = <TypeVariableMirror>[];
767 _class.ensureResolved(system.compiler); 767 _class.ensureResolved(system.compiler);
768 for (TypeVariableType typeVariable in _class.typeVariables) { 768 for (TypeVariableType typeVariable in _class.typeVariables) {
769 _typeVariables.add( 769 _typeVariables.add(
770 new Dart2JsTypeVariableMirror(system, typeVariable)); 770 new Dart2JsTypeVariableMirror(system, typeVariable));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 return new Dart2JsLocation(script, span); 833 return new Dart2JsLocation(script, span);
834 } 834 }
835 return super.location; 835 return super.location;
836 } 836 }
837 837
838 LibraryMirror get library => _library; 838 LibraryMirror get library => _library;
839 839
840 bool get isTypedef => true; 840 bool get isTypedef => true;
841 841
842 List<TypeMirror> get typeArguments { 842 List<TypeMirror> get typeArguments {
843 throw new UnsupportedOperationException( 843 throw new UnsupportedError(
844 'Declarations do not have type arguments'); 844 'Declarations do not have type arguments');
845 } 845 }
846 846
847 List<TypeVariableMirror> get typeVariables { 847 List<TypeVariableMirror> get typeVariables {
848 if (_typeVariables == null) { 848 if (_typeVariables == null) {
849 _typeVariables = <TypeVariableMirror>[]; 849 _typeVariables = <TypeVariableMirror>[];
850 for (TypeVariableType typeVariable in _typedef.typeArguments) { 850 for (TypeVariableType typeVariable in _typedef.typeArguments) {
851 _typeVariables.add( 851 _typeVariables.add(
852 new Dart2JsTypeVariableMirror(system, typeVariable)); 852 new Dart2JsTypeVariableMirror(system, typeVariable));
853 } 853 }
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 if (node !== null) { 1389 if (node !== null) {
1390 var span = system.compiler.spanFromNode(node, script.uri); 1390 var span = system.compiler.spanFromNode(node, script.uri);
1391 return new Dart2JsLocation(script, span); 1391 return new Dart2JsLocation(script, span);
1392 } else { 1392 } else {
1393 var span = system.compiler.spanFromElement(_variable); 1393 var span = system.compiler.spanFromElement(_variable);
1394 return new Dart2JsLocation(script, span); 1394 return new Dart2JsLocation(script, span);
1395 } 1395 }
1396 } 1396 }
1397 } 1397 }
1398 1398
OLDNEW
« no previous file with comments | « lib/isolate/timer.dart ('k') | pkg/dartdoc/lib/src/mirrors/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698