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

Unified Diff: packages/quiver/lib/mirrors.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 5 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
« no previous file with comments | « packages/quiver/lib/io.dart ('k') | packages/quiver/lib/pattern.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/quiver/lib/mirrors.dart
diff --git a/packages/quiver/lib/mirrors.dart b/packages/quiver/lib/mirrors.dart
index 9f73e9fa9bb9c8ac6bfea6fd388aff24247a6bb6..b377f4c82a535f3afcd2f3e07c48f8ce46358247 100644
--- a/packages/quiver/lib/mirrors.dart
+++ b/packages/quiver/lib/mirrors.dart
@@ -16,21 +16,15 @@ library quiver.mirrors;
import 'dart:mirrors';
-/**
- * Returns the qualified name of [t].
- */
+/// Returns the qualified name of [t].
Symbol getTypeName(Type t) => reflectClass(t).qualifiedName;
-/**
- * Returns true if [o] implements [type].
- */
+/// Returns true if [o] implements [type].
bool implements(Object o, Type type) =>
classImplements(reflect(o).type, reflectClass(type));
-/**
- * Returns true if the class represented by [classMirror] implements the class
- * represented by [interfaceMirror].
- */
+/// Returns true if the class represented by [classMirror] implements the class
+/// represented by [interfaceMirror].
bool classImplements(ClassMirror classMirror, ClassMirror interfaceMirror) {
if (classMirror == null) return false;
// TODO: change to comparing mirrors when dartbug.com/19781 is fixed
@@ -41,13 +35,11 @@ bool classImplements(ClassMirror classMirror, ClassMirror interfaceMirror) {
return false;
}
-/**
- * Walks up the class hierarchy to find a method declaration with the given
- * [name].
- *
- * Note that it's not possible to tell if there's an implementation via
- * noSuchMethod().
- */
+/// Walks up the class hierarchy to find a method declaration with the given
+/// [name].
+///
+/// Note that it's not possible to tell if there's an implementation via
+/// noSuchMethod().
DeclarationMirror getDeclaration(ClassMirror classMirror, Symbol name) {
if (classMirror.declarations.containsKey(name)) {
return classMirror.declarations[name];
@@ -67,9 +59,7 @@ DeclarationMirror getDeclaration(ClassMirror classMirror, Symbol name) {
return null;
}
-/**
- * Closurzes a method reflectively.
- */
+/// Closurizes a method reflectively.
class Method /* implements Function */ {
final InstanceMirror mirror;
final Symbol symbol;
@@ -80,8 +70,9 @@ class Method /* implements Function */ {
if (i.isMethod && i.memberName == const Symbol('call')) {
if (i.namedArguments != null && i.namedArguments.isNotEmpty) {
// this will fail until named argument support is implemented
- return mirror.invoke(
- symbol, i.positionalArguments, i.namedArguments).reflectee;
+ return mirror
+ .invoke(symbol, i.positionalArguments, i.namedArguments)
+ .reflectee;
}
return mirror.invoke(symbol, i.positionalArguments).reflectee;
}
« no previous file with comments | « packages/quiver/lib/io.dart ('k') | packages/quiver/lib/pattern.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698