diff --git a/CHANGELOG.md b/CHANGELOG.md index 36891ea..317e472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/lib/src/plugin_impl.dart b/lib/src/plugin_impl.dart index 8d0ad93..7368344 100644 --- a/lib/src/plugin_impl.dart +++ b/lib/src/plugin_impl.dart @@ -194,7 +194,7 @@ class _ManagerImpl implements Manager { @override Iterable> 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); @@ -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 { diff --git a/pubspec.yaml b/pubspec.yaml index 9f6ed55..57110d5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: redstone -version: 0.5.13 +version: 0.5.14 author: Luiz Mineo description: A metadata driven microframework for Dart homepage: http://redstonedart.org