List<Method> methods = new ArrayList<Method>(Arrays.asList(getMethods(type, targetObject)));
// If a filter is registered for this type, call it
MethodFilter filter = (this.filters != null ? this.filters.get(type) : null);
if (filter != null) {
List<Method> filtered = filter.filter(methods);
methods = (filtered instanceof ArrayList ? filtered : new ArrayList<Method>(filtered));
}
// Sort methods into a sensible order
if (methods.size() > 1) {