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

Unified Diff: reflectable/lib/src/mirrors_unimpl.dart

Issue 1182083002: Implement `.instanceMembers`. (Closed) Base URL: https://github.com/dart-lang/reflectable.git@master
Patch Set: Fix return type in test Created 5 years, 6 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: reflectable/lib/src/mirrors_unimpl.dart
diff --git a/reflectable/lib/src/mirrors_unimpl.dart b/reflectable/lib/src/mirrors_unimpl.dart
index a07b6318eb0e571498eda6d1fbafb1e7b5d8a3e6..c9be684613b27fca2098ba734cc5880fcdab7019 100644
--- a/reflectable/lib/src/mirrors_unimpl.dart
+++ b/reflectable/lib/src/mirrors_unimpl.dart
@@ -146,7 +146,8 @@ abstract class MethodMirrorUnimpl extends DeclarationMirrorUnimpl
String get source => _unsupported();
List<ParameterMirror> get parameters => _unsupported();
bool get isStatic => _unsupported();
- bool get isAbstract => _unsupported();
+ // We do not support reflection on abstract methods.
eernst 2015/06/18 12:21:12 Same as earlier patch (presumably this CL is built
sigurdm 2015/06/18 14:22:27 Yes - I have messed up the upload
+ bool get isAbstract => false;
bool get isSynthetic => _unsupported();
bool get isRegularMethod => _unsupported();
bool get isOperator => _unsupported();
@@ -175,16 +176,15 @@ class MethodMirrorImpl implements MethodMirror {
@override
String get constructorName => name;
+ // We do not support reflection on abstract methods.
@override
- bool get isAbstract => 0 != descriptor & constants.abstractAttribute;
+ bool get isAbstract => false;
@override
bool get isConstConstructor => 0 != descriptor & constants.constAttribute;
@override
- bool get isConstructor => isGenerativeConstructor ||
- isFactoryConstructor ||
- isRedirectingConstructor;
+ bool get isConstructor => isFactoryConstructor || isGenerativeConstructor;
@override
bool get isFactoryConstructor => kind == constants.factoryConstructor;
@@ -203,7 +203,8 @@ class MethodMirrorImpl implements MethodMirror {
bool get isPrivate => 0 != descriptor & constants.privateAttribute;
@override
- bool get isRedirectingConstructor => kind == constants.redirectingConstructor;
+ bool get isRedirectingConstructor =>
+ 0 != descriptor & constants.redirectingConstructor;
@override
bool get isRegularMethod => kind == constants.method;
@@ -241,7 +242,7 @@ class MethodMirrorImpl implements MethodMirror {
@override
String get simpleName => isConstructor
- ? (name == '' ? "$owner.simpleName" : "${owner.simpleName}.$name")
+ ? (name == '' ? "${owner.simpleName}" : "${owner.simpleName}.$name")
: name;
@override

Powered by Google App Engine
This is Rietveld 408576698