code: public static Method[] collectMethods(Class<?> c, int inclusiveModifiers, int exclusiveModifiers, Class<?> limitExclusive) {
          
          Set<Method> methods = new HashSet<Method>();
          while (c != limitExclusive) {
              for (Method f : c.getDeclaredMethods()) {
                  if (((f.getModifiers() & exclusiveModifiers) == 0)
                  		&& ((f.getModifiers() & inclusiveModifiers) == inclusiveModifiers)) {
                      methods.add(f);
                      f.setAccessible(true);
                  }
              }
              c = c.getSuperclass();
          }
          return methods.toArray(new Method[]{});
      }
docs: Produces an array with all the methods of the specified class
  @param c The class specified
  @param inclusiveModifiers An int indicating the {@link Modifier}s that may be applied
  @param exclusiveModifiers An int indicating the {@link Modifier}s that must be excluded
  @param limitExclusive Methods from this class or higher in the hierarchy will not be returned
  @return The array of matched Methods