return asResolved(typeResolver, methodToResolve.getReturnType());
}
private ResolvedMethod getResolvedMethod(final Method methodToResolve, Class<?> beanType) {
ResolvedType enclosingType = typeResolver.resolve(beanType);
MemberResolver resolver = new MemberResolver(typeResolver);
resolver.setIncludeLangObject(false);
ResolvedTypeWithMembers typeWithMembers = resolver.resolve(enclosingType, null, null);
Iterable<ResolvedMethod> filtered = filter(newArrayList(typeWithMembers.getMemberMethods()),
methodNamesAreSame(methodToResolve));
return resolveToMethodWithMaxResolvedTypes(filtered, methodToResolve);
}