Returns True if this method's return is documented
506953
def is_return_doc_available(self):
        """"""
        return bool(self.return_doc and (self.return_doc.get('text') or self.return_doc.get('type')))
1087682
private static Boolean methodExists(Class clazz, String methodName, Type[] args, Type returnType) {
	try {
	    Class<?>[] _args = new Class[args.length];
	    for (int i = 0; i < _args.length; i++) {
		_args[i] = Types.toClass(args[i]);
	    }
	    Class<?> rtn = Types.toClass(returnType);
	    try {
		java.lang.reflect.Method m = clazz.getMethod(methodName, _args);
		return m.getReturnType() == rtn;
	    }
	    catch (Exception e) {
		return false;
	    }
	}
	catch (Exception e) {
	    SystemOut.printDate(e);
	    return null;
	}
    }
988491
def has_documented_fields(self, include_inherited_fields=False):
        """"""
        fields = self.all_fields if include_inherited_fields else self.fields
        for field in fields:
            if field.doc:
                return True
        return False
282850
public boolean isMethodSupported(String methodName,
                                   Class<?>... parameterTypes)
  throws IOException {
    if (serverMethods == null) { // client & server have the same protocol
      return true;
    }
    Method method;
    try {
      method = protocol.getDeclaredMethod(methodName, parameterTypes);
    } catch (SecurityException e) {
      throw new IOException(e);
    } catch (NoSuchMethodException e) {
      throw new IOException(e);
    }
    return serverMethods.contains(
        Integer.valueOf(ProtocolSignature.getFingerprint(method)));
  }
736088
public boolean isAnnotated(ExecutableElement method) {
        List<? extends AnnotationMirror> annotationMirrors = method.getAnnotationMirrors();
        for (AnnotationMirror annotationMirror : annotationMirrors) {
            String typeName = annotationMirror.getAnnotationType().toString();
            if (!AnnotationUtil.INTERNAL_ANNOTATION_NAMES.contains(typeName)) {
                return true;
            }
        }
        return false;
    }
1074953
def method_has_integration(self, method):
        
        for method_definition in self.get_method_contents(method):
            if self.method_definition_has_integration(method_definition):
                return True
        return False
111245
public static boolean isLiveData(SQLiteModelMethod methodDefinition) {
		boolean result = false;

		TypeName returnTypeName = methodDefinition.getReturnClass();
		if (returnTypeName instanceof ParameterizedTypeName) {
			ParameterizedTypeName returnParameterizedTypeName = (ParameterizedTypeName) returnTypeName;
			ClassName returnParameterizedClassName = returnParameterizedTypeName.rawType;
//			Class<?> wrapperClazz;
//			try {
//				wrapperClazz = Class.forName(returnParameterizedClassName.toString());
//			} catch (ClassNotFoundException e) {
//				e.printStackTrace();
//				throw (new KriptonRuntimeException(e));
//			}
//
//			String wrapperName = wrapperClazz.getName();
			if (KriptonLiveDataManager.getInstance().isLiveData(returnParameterizedClassName.toString())) {
				result = true;
			}
		}

		return result;
	}
846119
public static boolean is(Method method, boolean acceptPrefixless) {
        int length = method.getName().length();

        if (method.isPrivate() || method.isStatic()) {
            return false;
        }

        if (!method.getArguments().isEmpty()) {
            return false;
        }

        if (method.getReturnType().equals(VOID)) {
            return false;
        }

        if (acceptPrefixless) {
            return true;
        }

        if (method.getName().startsWith(GET_PREFIX)) {
            return length > GET_PREFIX.length();
        }

        if (method.getName().startsWith(IS_PREFIX) && TypeUtils.isBoolean(method.getReturnType())) {
            return length > IS_PREFIX.length();
        }

        if (method.getName().startsWith(SHOULD_PREFIX) && TypeUtils.isBoolean(method.getReturnType())) {
            return length > SHOULD_PREFIX.length();
        }
        return false;
    }
520691
private boolean checkForDefaultImplementation(Class checkClass, String checkMethod, Class[] methodParams){
		
	    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable (Level.FINE))  //306998.14
	    	logger.exiting(CLASS_NAME,"checkForDefaultImplementation","Method : " + checkMethod + ", Class : " + checkClass.getName());
		
		
		boolean defaultMethodInUse=true;
		
		while (defaultMethodInUse && checkClass!=null && !checkClass.getName().equals("javax.servlet.http.HttpServlet")) {
		    try {  
		    						       
		        checkClass.getDeclaredMethod(checkMethod, methodParams);
			
			    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable (Level.FINE))  //306998.14
			    	logger.logp(Level.FINE, CLASS_NAME,"checkForDefaultImplementation","Class implementing " + checkMethod + " is " + checkClass.getName());
			
			    defaultMethodInUse=false;
			    break;
			     
		    } catch (java.lang.NoSuchMethodException exc) {    	
			    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable (Level.FINE))  //306998.14
			    	logger.logp(Level.FINE, CLASS_NAME,"checkForDefaultImplementation",checkMethod + " is not implemented by class " + checkClass.getName()); 
		    } catch (java.lang.SecurityException exc) {
			    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable (Level.FINE))  //306998.14
			    	logger.logp(Level.FINE, CLASS_NAME,"checkForDefaultImplementation","Cannot determine if " + checkMethod + " is implemented by class " + checkClass.getName());				    	
		    }
		    
		    checkClass = checkClass.getSuperclass();
	    }  
	    if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable (Level.FINE))  //306998.14
	    	logger.exiting(CLASS_NAME,"checkForDefaultImplementation","Result : " + defaultMethodInUse);
	    
        return defaultMethodInUse;
	}
69664
private static boolean implementingObsoleteMethod(
      MethodTree enclosingMethod, VisitorState state, Type type) {
    MethodSymbol method = ASTHelpers.getSymbol(enclosingMethod);
    if (method == null) {
      return false;
    }
    if (ASTHelpers.findSuperMethods(method, state.getTypes()).isEmpty()) {
      // not an override
      return false;
    }
    if (!ASTHelpers.isSameType(method.getReturnType(), type, state)) {
      return false;
    }
    return true;
  }
353309
def is_function_or_method(obj):
    
    return inspect.isfunction(obj) or inspect.ismethod(obj) or is_cython(obj)
1090806
protected function areRequirementsMet(): bool
    {
        return !$this->isSniffSuppressed(static::CODE_MISSING_RETURN_TYPE) && !$this->hasReturnType() &&
            !in_array($this->getFunctionName(), $this->methodsWithoutVoid);
    }
19140
def check_return_types(self, method):
        ''''''
        mn = method.__name__
        retanno = method.__annotations__.get('return', None)
        # Take a look at the syntax
        if not retanno:
            return ['Missing return types for method "{}"'.format(mn)]
        if not isinstance(retanno, (list, tuple)):
            msg = 'Return annotation for method "{}" not tuple nor list'
            return [msg.format(mn)]
        if (any(map(lambda t: not isinstance(t, (list, tuple)), retanno)) or
                any(map(lambda t: not (2 <= len(t) <= 3), retanno))):
            msg = ('Return values series for "{}" should be composed of '
                   '2 or 3-items tuples (code, msg, type).')
            return [msg.format(mn)]
        errors = []
        # Take a look at the codes
        declared = set([t[0] for t in retanno])
        actual = set(int(s)
                     for s in HTTP_STATUSES_REGEX.findall(method.source))
        if declared != actual:
            if declared.issubset(actual):
                msg = 'Method {} returns undeclared codes: {}.'
                errors.append(msg.format(mn, actual - declared))
            elif actual.issubset(declared):
                msg = 'Method {} declares codes {} that are never used.'
                errors.append(msg.format(mn, declared - actual))
            else:
                msg = 'Declared {} and Used {} codes mismatch.'
                errors.append(msg.format(declared, actual))
        # Take a look at the types
        ret_with_types = filter(lambda t: len(t) == 3, retanno)
        msg = 'Method {} return type for code {} must be class (not instance).'
        msg_mod = 'Method {} return type for code {} must subclass from Model.'
        for code, _, type_ in ret_with_types:
            try:
                if Model not in type_.__bases__:
                    errors.append(msg_mod.format(mn, code))
            except AttributeError:
                errors.append(msg.format(mn, code))
        return errors
937821
protected boolean isGetterMethod(MethodDoc methodDoc) {
		if (methodDoc.parameters() != null && methodDoc.parameters().length == 0
				&& (!"boolean".equalsIgnoreCase(methodDoc.returnType().qualifiedTypeName())
						&& methodDoc.name().matches("^get.+"))
				|| (("boolean".equalsIgnoreCase(methodDoc.returnType().qualifiedTypeName())
						&& methodDoc.name().matches("^is.+")))) {
			return true;
		}
		return false;
	}
1069919
private boolean methodExists(Class clazz, String name) {
        Method[] methods = clazz.getDeclaredMethods();
        for (int i = 0; i < methods.length; i++) {
            if (methods[i].getName().equals(name)) {
                return true;
            }
        }

        if (clazz.getSuperclass() != null
                && methodExists(clazz.getSuperclass(), name)) {
            return true;
        }

        Class[] interfaces = clazz.getInterfaces();
        for (int i = 0; i < interfaces.length; i++) {
            if (methodExists(interfaces[i], name)) {
                return true;
            }
        }

        return false;
    }
834400
public boolean isMethod(MetaMethod method) {
        return getName().equals(method.getName())
            && getModifiers() == method.getModifiers()
            && getReturnType().equals(method.getReturnType())
            && equal(getParameterTypes(), method.getParameterTypes());
    }
528069
def is_method(arg, min_arity=None, max_arity=None):
    
    if not callable(arg):
        return False

    if not any(is_(arg) for is_ in (inspect.ismethod,
                                    inspect.ismethoddescriptor,
                                    inspect.isbuiltin)):
        return False

    try:
        argnames, varargs, kwargs, defaults = getargspec(arg)
    except TypeError:
        # On CPython 2.x, built-in methods of file aren't inspectable,
        # so if it's file.read() or file.write(), we can't tell it for sure.
        # Given how this check is being used, assuming the best is probably
        # all we can do here.
        return True
    else:
        if argnames and argnames[0] == 'self':
            argnames = argnames[1:]

    if min_arity is not None:
        actual_min_arity = len(argnames) - len(defaults or ())
        assert actual_min_arity >= 0, (
            "Minimum arity of %r found to be negative (got %s)!" % (
                arg, actual_min_arity))
        if int(min_arity) != actual_min_arity:
            return False

    if max_arity is not None:
        actual_max_arity = sys.maxsize if varargs or kwargs else len(argnames)
        if int(max_arity) != actual_max_arity:
            return False

    return True