/** * Returns a {@link List} of {@link MethodSub}s for each * method declared method in the inspected class. However, * in safe mode (which *is* the default), this will only return * the public methods. You must configure safe mode to be off * to receive a list of all methods. * @return methods inspectors list */ public List<MethodSub> getMethods() { if (methods == null) { Method[] declared = getType().getDeclaredMethods(); List<MethodSub> subs = new ArrayList<MethodSub>(declared.length); for (Method method : declared) { MethodSub sub = new MethodSub(method); if ((!isSafeMode() || sub.isPublic()) && (showDeprecated || !sub.isDeprecated())) { subs.add(sub); } } Collections.sort(subs); methods = Collections.unmodifiableList(subs); } return methods; }