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

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

Issue 11014022: Make Mirror.simpleName unique. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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/dartdoc/lib/mirrors.dart
diff --git a/pkg/dartdoc/lib/mirrors.dart b/pkg/dartdoc/lib/mirrors.dart
index 2e5368d8a7e95c0a13d4108b04705a5ccbfe9522..6b89fd9365914848af950d949e2ae85e785a65bd 100644
--- a/pkg/dartdoc/lib/mirrors.dart
+++ b/pkg/dartdoc/lib/mirrors.dart
@@ -55,7 +55,7 @@ abstract class MirrorSystem {
/**
* Returns an unmodifiable map of all libraries in this mirror system.
*/
- Map<Object, LibraryMirror> get libraries;
+ Map<String, LibraryMirror> get libraries;
}
@@ -63,14 +63,33 @@ abstract class MirrorSystem {
* An entity in the mirror system.
*/
abstract class Mirror {
- /**
- * The simple name of the entity. The simple name is in most cases the
- * the declared single identifier name of the entity, such as 'method' for
- * a method [:void method() {...}:].
+ static const String UNARY_MINUS = 'unary-';
+
+ /**
+ * The simple name of the entity. The simple name is unique within the
+ * scope of the entity declaration.
+ *
+ * The simple name is in most cases the the declared single identifier name of
ngeoffray 2012/10/02 20:19:43 the the -> the
Johnni Winther 2012/10/03 09:36:24 Done.
+ * the entity, such as 'method' for a method [:void method() {...}:]. For an
+ * unnamed constructor for [:class Foo:] the simple name is 'Foo'. For a
+ * constructor for [:class Foo:] named 'named' the simple name is 'Foo.named'.
+ * For a property [:foo:] the simple name of the getter method is 'foo' and
+ * the simple name of the setter is 'foo='. For operators the simple name is
+ * the operator itself, for example '+' for [:operator +:].
+ *
+ * The simple name for the unary minus operator is [UNARY_MINUS].
*/
String get simpleName;
/**
+ * The display name is normal representation of the entity name. In most cases
ngeoffray 2012/10/02 20:19:43 is normal -> is the normal
Johnni Winther 2012/10/03 09:36:24 Done.
+ * the display name is the simple name, but for a setter 'foo=' the display
+ * name is simply 'foo' and for the unary minus operator the display name is
+ * 'operator -'. The display name is not unique.
+ */
+ String get displayName;
+
+ /**
* Returns the name of this entity qualified by is enclosing context. For
* instance, the qualified name of a method 'method' in class 'Class' in
* library 'library' is 'library.Class.method'.
@@ -92,7 +111,7 @@ abstract class ObjectMirror implements Mirror {
* Returns an unmodifiable map of the members of declared in this type or
* library.
*/
- Map<Object, MemberMirror> get declaredMembers;
+ Map<String, MemberMirror> get declaredMembers;
}
/**
@@ -107,7 +126,7 @@ abstract class LibraryMirror extends ObjectMirror {
/**
* Returns an iterable over all types in the library.
*/
- Map<Object, InterfaceMirror> get types;
+ Map<String, InterfaceMirror> get types;
/**
* Returns the source location for this library.
@@ -176,9 +195,9 @@ abstract class InterfaceMirror implements TypeMirror, ObjectMirror {
InterfaceMirror get superclass;
/**
- * Returns an iterable over the interfaces directly implemented by this type.
+ * Returns a list of the interfaces directly implemented by this type.
*/
- Map<Object, InterfaceMirror> get interfaces;
+ List<InterfaceMirror> get interfaces;
/**
* Is [:true:] iff this type is a class.
@@ -218,7 +237,7 @@ abstract class InterfaceMirror implements TypeMirror, ObjectMirror {
/**
* Returns an immutable map of the constructors in this interface.
*/
- Map<Object, MethodMirror> get constructors;
+ Map<String, MethodMirror> get constructors;
/**
* Returns the default type for this interface.

Powered by Google App Engine
This is Rietveld 408576698