Returns all declared methods of a class including methods of superclasses.
500434
public static List<Method> getAllDeclaredMethods(Class<?> clazz) {
		List<Method> result = new ArrayList<>();
		while (clazz != null) {
			Method[] methods = clazz.getDeclaredMethods();
			Collections.addAll(result, methods);
			clazz = clazz.getSuperclass();
		}
		return result;
	}
1266976
private static Collection<Method> getAllMethodsByClassIntern (Class<?> pvClass, Set<Method> pvMethodsMap) {
		putAllMethodsIntern( pvClass.getMethods(), pvMethodsMap) ;		
		putAllMethodsIntern( pvClass.getDeclaredMethods(), pvMethodsMap);
		
		if (!(pvClass.getSuperclass().equals(Object.class))) {
			getAllMethodsByClassIntern(pvClass.getSuperclass(), pvMethodsMap);
		}
		
		return pvMethodsMap;
	}
628973
def get_all_methods
      methods = []
      each_type do | type |
        type.each_method do |meth|
          methods << meth
        end
      end
      methods
    end
237460
def get_all_method_names(entry_point=ALL, protocol=ALL, sort_methods=False):
    """"""
    return registry.get_all_method_names(entry_point=entry_point, protocol=protocol, sort_methods=sort_methods)
1280829
private static <T> List<Method> getMethods(Class<T> type, String... names) {

		Assert.notNull(type, "Missing class to search for methods!");
		Assert.notNullOrEmpty(names, "Missing method names to search for!");

		Map<String, Method> candidates = new HashMap<>();
		for (Method method : type.getMethods()) {

			if (Modifier.isStatic(method.getModifiers()) &&
			    method.getReturnType().equals(type) &&
			    method.getParameterTypes().length == 1 &&
			    method.getParameterTypes()[0].isAssignableFrom(String.class)) {

				candidates.put(method.getName(), method);
			}
		}

		List<Method> output = new ArrayList<>();

		// go in order desired
		for (String name : names) {
			if (candidates.containsKey(name)) {
				output.add(candidates.get(name));
			}
		}

		return output;
	}
128813
private static List<MethodInfo> getPublicMethodInfos(final JavaClass cls) {
        List<MethodInfo> methodInfos = new ArrayList<>();
        Method[] methods = cls.getMethods();
        for (Method m : methods) {
            if ((m.getAccessFlags() & (Const.ACC_PUBLIC | Const.ACC_PROTECTED)) != 0) {
                ExceptionTable et = m.getExceptionTable();
                methodInfos
                        .add(new MethodInfo(m.getName(), m.getSignature(), et == null ? null : et.getExceptionNames()));
            }
        }
        return methodInfos;
    }
283223
public static List<Method> getAnnotatedMethods(final Class<?> cls, final Class<? extends Annotation> annotationClass) {
        final List<Method> methodList = new ArrayList<>();

        // Retrieve annotation even when they are wrapped into OnWaves
        for (final Method m : cls.getDeclaredMethods()) {
            if (m.getAnnotationsByType(annotationClass).length > 0) {
                methodList.add(m);
            }
        }

        // Add implemented interfaces methods
        for (final Class<?> i : cls.getInterfaces()) {
            methodList.addAll(getAnnotatedMethods(i, annotationClass));
        }

        // Add super class methods
        if (cls.getSuperclass() != null) {
            methodList.addAll(getAnnotatedMethods(cls.getSuperclass(), annotationClass));
        }

        return methodList;
    }
6506
public Set<Method> getMethods(boolean privileged) {
      if (privileged) {
         return Collections.unmodifiableSet(Sets.union(methods, declaredMethods));
      } else {
         return Collections.unmodifiableSet(methods);
      }
   }
579844
public static Set<Method> getAllMethodsInHierarchy(Method method) {
        LinkedHashSet<Method> allMethods = new LinkedHashSet<>();
        val declaringClass = method.getDeclaringClass();
        return getAllMethodsInHierarchy(allMethods, declaringClass, method);
    }
723596
def get_methods_by_name(self, name):
        

        return (m for m in self.methods if m.get_name() == name)
842211
private static Method getMethod(final Class cls, final String methodName, boolean declared) {
		$.checkNotEmpty(methodName);
		List<Method> methods = getMethodsList(cls, declared);
		for (int i = 0; i < methods.size(); i++) {
			if (methodName.equals(methods.get(i).getName())) {
				return methods.get(i);
			}
		}
		return null;
	}
1040570
def all_subclasses(cls):
    
    subclasses = cls.__subclasses__()
    descendants = (descendant for subclass in subclasses
                   for descendant in all_subclasses(subclass))
    return set(subclasses) | set(descendants)
711599
def _build_superclass_lists(self):
        
        cls_dict = self.all_classes
        for cls in list(cls_dict.values()):
            cls.all_superclasses = []
            superclass = cls.superclass
            try:
                while superclass:
                    superclass_obj = cls_dict[superclass]
                    cls.all_superclasses.append(superclass_obj)
                    superclass = superclass_obj.superclass
            except KeyError:
                print("Missing superclass: " + superclass)
807660
public static <T> Method[] getAllMethodExcept(Class<T> type, String... methodNames) {
        List<Method> methodsToMock = new LinkedList<Method>();
        Method[] methods = getAllMethods(type);
        iterateMethods:
        for (Method method : methods) {
            for (String methodName : methodNames) {
                if (method.getName().equals(methodName)) {
                    continue iterateMethods;
                }
            }
            methodsToMock.add(method);
        }
        return methodsToMock.toArray(new Method[0]);
    }
307599
private static void getLocalAndInheritedMethods(
      PackageElement pkg, TypeElement type, SetMultimap<String, ExecutableElement> methods) {
    for (TypeMirror superInterface : type.getInterfaces()) {
      getLocalAndInheritedMethods(pkg, MoreTypes.asTypeElement(superInterface), methods);
    }
    if (type.getSuperclass().getKind() != TypeKind.NONE) {
      // Visit the superclass after superinterfaces so we will always see the implementation of a
      // method after any interfaces that declared it.
      getLocalAndInheritedMethods(pkg, MoreTypes.asTypeElement(type.getSuperclass()), methods);
    }
    for (ExecutableElement method : ElementFilter.methodsIn(type.getEnclosedElements())) {
      if (!method.getModifiers().contains(Modifier.STATIC)
          && methodVisibleFromPackage(method, pkg)) {
        methods.put(method.getSimpleName().toString(), method);
      }
    }
  }
566220
def GetAnnotatedMethods(cls):
    """"""

    result = {}

    # We want methods with the highest call-order to be processed last,
    # so that their annotations have precedence.
    for i_cls in reversed(inspect.getmro(cls)):
      for name in compatibility.ListAttrs(i_cls):
        cls_method = getattr(i_cls, name)

        if not callable(cls_method):
          continue

        if not hasattr(cls_method, "__http_methods__"):
          continue

        result[name] = RouterMethodMetadata(
            name=name,
            doc=cls_method.__doc__,
            args_type=getattr(cls_method, "__args_type__", None),
            result_type=getattr(cls_method, "__result_type__", None),
            category=getattr(cls_method, "__category__", None),
            http_methods=getattr(cls_method, "__http_methods__", set()),
            no_audit_log_required=getattr(cls_method,
                                          "__no_audit_log_required__", False))

    return result
640100
def all_subclasses(cls):
    
    subclasses = cls.__subclasses__() 
    return subclasses + [g for s in subclasses for g in all_subclasses(s)]