Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Fix: Manager.findMethods() should include inherited methods
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmineo committed Aug 27, 2014
1 parent 6b5dd1f commit 2d3ae5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.5.14
* Fix: `Manager.findMethods()` should include inherited methods.

## v0.5.13
* Improved plugin API:
* Added the `Manager.getInjector()` and `Manager.createInjector()` methods, which allow plugins to retrieve objects from di modules more easily.
Expand Down
5 changes: 1 addition & 4 deletions lib/src/plugin_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class _ManagerImpl implements Manager {
@override
Iterable<AnnotatedType<MethodMirror>> findMethods(ClassMirror clazz, Type annotation) {
var methods = [];
_findDeclaredMethods(clazz).forEach((MethodMirror method) {
clazz.instanceMembers.values.forEach((MethodMirror method) {

var metadata = method.metadata.firstWhere((m) =>
m.reflectee.runtimeType == annotation, orElse: () => null);
Expand All @@ -215,9 +215,6 @@ class _ManagerImpl implements Manager {
_libs.map((l) => l.def).expand((LibraryMirror ldef) =>
ldef.declarations.values).where((d) => d is ClassMirror);

_findDeclaredMethods(ClassMirror clazz) =>
clazz.declarations.values.where((d) => d is MethodMirror);

}

class _ServerMetadataImpl implements ServerMetadata {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: redstone
version: 0.5.13
version: 0.5.14
author: Luiz Mineo <[email protected]>
description: A metadata driven microframework for Dart
homepage: http://redstonedart.org
Expand Down

0 comments on commit 2d3ae5e

Please sign in to comment.