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

Unified Diff: reflectable/lib/mirrors.dart

Issue 1473073009: Added `dynamicReflected..Type`, corrected type expressions. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | reflectable/lib/src/reflectable_mirror_based.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: reflectable/lib/mirrors.dart
diff --git a/reflectable/lib/mirrors.dart b/reflectable/lib/mirrors.dart
index 35bc660811a7219aa3764a39cf4310a48d7ab9c9..1c30914a175c26a027f89e734518bec158b850e6 100644
--- a/reflectable/lib/mirrors.dart
+++ b/reflectable/lib/mirrors.dart
@@ -342,6 +342,19 @@ abstract class ClassMirror implements TypeMirror, ObjectMirror {
ClassMirror get mixin;
+ /// Return true iff this class mirror is capable of delivering its
sigurdm 2015/11/26 10:18:03 Returns
eernst 2015/11/26 11:23:59 Done, fixed 10 occurrences of `/// [verb-not-in-pr
+ /// [dynamicReflectedType].
sigurdm 2015/11/26 10:18:03 Explain when this is/is not the case.
eernst 2015/11/26 11:24:00 Done.
+ bool get hasDynamicReflectedType;
+
+ /// Return the [Type] object representing the fully dynamic instantiation of
sigurdm 2015/11/26 10:18:03 Returns ...
eernst 2015/11/26 11:24:00 Done.
+ /// this class if it is generic, and return the [Type] object representing
+ /// this class if it is not generic. The fully dynamic instantiation of a
+ /// generic class `C` is the application of `C` to a type argument list of
+ /// the appropriate length where every argument is `dynamic`. For instance,
+ /// the fully dynamic instantiation of `List` and `Map` is `List<dynamic>`
+ /// respectively `Map<dynamic, dynamic>`.
sigurdm 2015/11/26 10:18:03 Write about the relation to hasDynamicReflectedTyp
eernst 2015/11/26 11:24:00 Done.
+ Type get dynamicReflectedType;
+
/**
* Invokes the named constructor and returns the result.
*
@@ -449,6 +462,8 @@ abstract class MethodMirror implements DeclarationMirror {
TypeMirror get returnType; // Possible RET: Type
bool get hasReflectedReturnType;
Type get reflectedReturnType;
+ bool get hasDynamicReflectedReturnType;
+ Type get dynamicReflectedReturnType;
String get source;
List<ParameterMirror> get parameters;
bool get isStatic;
@@ -471,6 +486,8 @@ abstract class VariableMirror implements DeclarationMirror {
TypeMirror get type; // Possible RET: Type
bool get hasReflectedType;
Type get reflectedType;
+ bool get hasDynamicReflectedType;
+ Type get dynamicReflectedType;
bool get isStatic;
bool get isFinal;
bool get isConst;
@@ -478,9 +495,6 @@ abstract class VariableMirror implements DeclarationMirror {
}
abstract class ParameterMirror implements VariableMirror {
- TypeMirror get type; // Possible RET: Type
- bool get hasReflectedType;
- Type get reflectedType;
bool get isOptional;
bool get isNamed;
bool get hasDefaultValue;
@@ -499,3 +513,8 @@ class Comment {
final bool isDocComment;
const Comment(this.text, this.trimmedText, this.isDocComment);
}
+
+class TypeValue<E> {
+ const TypeValue();
+ Type get type => E;
+}
« no previous file with comments | « no previous file | reflectable/lib/src/reflectable_mirror_based.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698