code: public static Method[] getMethods(Class<?> clazz) {
          final boolean legacyApproach = isGetMethodsLegacyApproach();
  
          final List<Method> allMethods = new ArrayList<>();
          addMethods(allMethods, clazz, legacyApproach);
  
          return allMethods.toArray(new Method[allMethods.size()]);
      }
docs: Gets all methods of a class, excluding those from Object.
  
  Warning: This method's result varies slightly on Java 7 and on Java 8.
  With Java 8 overridden methods are properly removed from the result, and
  inherited annotations thus also available from the result. On Java 7,
  overridden methods will be returned multiple times.
  
  @see #isGetMethodsLegacyApproach()
  
  @param clazz
  @return