Check if a unique method name exists in class, if exist return the method,
otherwise return null
353790
public static Method checkMethodExist(Class<?> clazz, String uniqueMethodName) {
		if (clazz == null || StrUtils.isEmpty(uniqueMethodName))
			return null;
		Map<String, Object> methodMap = uniqueMethodCache.get(clazz);
		if (methodMap != null && !methodMap.isEmpty()) {
			Object result = methodMap.get(uniqueMethodName);
			if (result != null) {
				if (ClassOrMethodNotExist.class.equals(result))
					return null;
				else
					return (Method) result;
			}
		}
		if (methodMap == null) {
			methodMap = new HashMap<String, Object>();
			uniqueMethodCache.put(clazz, methodMap);
		}
		Method[] methods = clazz.getMethods();
		for (Method method : methods)
			if (uniqueMethodName != null && uniqueMethodName.equals(method.getName())) {
				methodMap.put(uniqueMethodName, method);
				return method;
			}
		methodMap.put(uniqueMethodName, ClassOrMethodNotExist.class);
		return null;
	}
1371920
def method?(name)
      begin
        klass = Esi::Calls.const_get(method_to_class_name(name))
      rescue NameError
        return false
      end
      !klass.nil?
    end
966867
public static boolean hasMethod(Class<?> targetClass, String methodName, Class... parameterTypes) {
        try {
            targetClass.getMethod(methodName, parameterTypes);
            return true;
        } catch (NoSuchMethodException e) {
            return false;
        }
    }
854352
public static Method findMethod(Class<?> clazz, String name) {
		for (Method me : clazz.getDeclaredMethods()) {
			if (me.getName().equalsIgnoreCase(name)) {
				return me;
			}
		}
		if (clazz.getSuperclass() != null) {
			return findMethod(clazz.getSuperclass(), name);
		}
		return null;
	}
1286315
def _class_exists(self, classname, namespace):
        
        class_repo = self._get_class_repo(namespace)
        return classname in class_repo
754195
static Method getMethodByName(Method[] methods, String methodName) {
		for (int i = 0; i < methods.length; i++)
			if (methods[i].getName().equalsIgnoreCase(methodName))
				return methods[i];
		return null;
	}
552020
public JMethod getMethod(String name, JClass []paramTypes)
  {
    loop:
    for (JMethod method : getMethods()) {
      if (! method.getName().equals(name))
        continue;

      JClass []mParamTypes = method.getParameterTypes();
      if (mParamTypes.length != paramTypes.length)
        continue;

      for (int i = 0; i < paramTypes.length; i++) {
        if (! paramTypes[i].getName().equals(mParamTypes[i].getName()))
          continue loop;
      }


      return method;
    }

    return null;
  }
1209653
private static Method findGetMethod(Class<? extends Bean> beanType, String getterName) {
        try {
            return beanType.getDeclaredMethod(getterName);
        } catch (NoSuchMethodException ex) {
            try {
                return beanType.getMethod(getterName);
            } catch (NoSuchMethodException ex2) {
                return null;
            }
        }
    }
1201377
public static BshMethod getMethod(NameSpace ns, String name, Class<?>[] sig) {
        if (null == ns)
            return null;
        try {
            return ns.getMethod(name, sig, true);
        } catch (Exception e) {
            return null;
        }
    }
156628
private String getMethodName(Method method) {
        StatName statNameAnnotation = method.getAnnotation(StatName.class);
        return statNameAnnotation != null ? statNameAnnotation.value() : method.getName();
    }
1360420
private static String getGetterName(Method m) {
        String name = m.getName();
        if (name.startsWith("get") && (name.length() >= 4)
                && ! m.getReturnType().equals(void.class)
                && (m.getParameterTypes().length == 0)
        ) {
            return Character.toLowerCase(name.charAt(3)) + name.substring(4);
        }
        if (name.startsWith("is") && (name.length() >= 3)
                && (m.getReturnType().equals(boolean.class) || m.getReturnType().equals(Boolean.class))
                && (m.getParameterTypes().length == 0)
        ) {
            return Character.toLowerCase(name.charAt(2)) + name.substring(3);
        }
        return null;
    }
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;
	}
281151
def get_method(self, cls_name):
        
        for id, spec in self.db.items():
            if spec["method"].__class__.__name__ == cls_name:
                yield spec["method"]
453370
def _unique_class(self, cls):
        
        return not any(isinstance(obj, cls) for obj in self.plugins)
304396
public static Method findMethod(Collection<Method> methods, Method testMethod)
  {
    for (Method method : methods) {
      if (isMatch(method, testMethod))
        return method;
    }
    
    return null;
  }
740409
def recursively_find_methods_matching(name, is_class_method)
      res = local_methods_matching(name, is_class_method)
      @inferior_classes.each do |c|
        res.concat(c.recursively_find_methods_matching(name, is_class_method))
      end
      res
    end
885924
private static Method getMethod(Class<?> clazz, String methodName)
    {
        try
        {
            char string[] = methodName.toCharArray();
            string[0] = Character.toUpperCase(string[0]);
            methodName = new String(string);
            try
            {
                return clazz.getDeclaredMethod("get" + methodName);
            }
            catch (NoSuchMethodException e)
            {
                return clazz.getDeclaredMethod("is" + methodName);
            }
        }
        catch (NoSuchMethodException e)
        {
            return null;
        }
    }