whereAnnotated method
Returns the MethodReflection that matches annotations test
.
If test
is null
, will match methods with any annotation.
Implementation
Iterable<FunctionReflection<O, R>> whereAnnotated(
[bool Function(List<Object> annotations)? test]) {
if (test != null) {
return where((m) {
return test(m.annotations);
});
}
return where((m) => m.annotations.isNotEmpty);
}