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

Unified Diff: lib/dartdoc/mirrors/mirrors_util.dart

Issue 10823257: Refactored accessors in mirrors from methods to properties. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: lib/dartdoc/mirrors/mirrors_util.dart
diff --git a/lib/dartdoc/mirrors/mirrors_util.dart b/lib/dartdoc/mirrors/mirrors_util.dart
index 3dad2048d00a980eb488350449601ff9efa76455..cfb37c0eeff7f61ec6ef95d498ad3bf96e0d882d 100644
--- a/lib/dartdoc/mirrors/mirrors_util.dart
+++ b/lib/dartdoc/mirrors/mirrors_util.dart
@@ -18,21 +18,21 @@
Iterable<InterfaceMirror> computeSubdeclarations(InterfaceMirror type) {
type = type.declaration;
var subtypes = <InterfaceMirror>[];
- type.system.libraries().forEach((_, library) {
- for (InterfaceMirror otherType in library.types().getValues()) {
- var superClass = otherType.superclass();
+ type.system.libraries.forEach((_, library) {
+ for (InterfaceMirror otherType in library.types.getValues()) {
+ var superClass = otherType.superclass;
if (superClass !== null) {
superClass = superClass.declaration;
- if (type.library() === superClass.library()) {
+ if (type.library === superClass.library) {
if (superClass == type) {
subtypes.add(otherType);
}
}
}
- final superInterfaces = otherType.interfaces().getValues();
+ final superInterfaces = otherType.interfaces.getValues();
for (InterfaceMirror superInterface in superInterfaces) {
superInterface = superInterface.declaration;
- if (type.library() === superInterface.library()) {
+ if (type.library === superInterface.library) {
if (superInterface == type) {
subtypes.add(otherType);
}
@@ -52,7 +52,7 @@ Mirror findMirror(Map<Object,Mirror> map, String name,
[String constructorName, String operatorName]) {
var foundMirror = null;
map.forEach((_, Mirror mirror) {
- if (mirror.simpleName() == name) {
+ if (mirror.simpleName == name) {
if (constructorName !== null) {
if (mirror is MethodMirror &&
constructorName == mirror.constructorName) {
@@ -72,7 +72,7 @@ Mirror findMirror(Map<Object,Mirror> map, String name,
}
LibraryMirror findLibrary(MemberMirror member) {
- ObjectMirror owner = member.surroundingDeclaration();
+ ObjectMirror owner = member.surroundingDeclaration;
if (owner is LibraryMirror) {
return owner;
} else if (owner is TypeMirror) {
@@ -86,8 +86,8 @@ LibraryMirror findLibrary(MemberMirror member) {
* Returns the column of the start of a location.
*/
int getLocationColumn(Location location) {
- String text = location.source().text();
- int index = location.start()-1;
+ String text = location.source.text;
+ int index = location.start-1;
var column = 0;
while (0 <= index && index < text.length) {
var charCode = text.charCodeAt(index);

Powered by Google App Engine
This is Rietveld 408576698