Determine if the method is a setter.

@param method
@return
489981
public static boolean isSetter(Method method) {
        String name = method.getName();
        String[] splitname = StringUtils.splitByCharacterTypeCamelCase(name);
        return method.getReturnType().equals(void.class) && Modifier.isPublic(method.getModifiers())
                && splitname[0].equals(SETTER_PREFIX);
    }
918537
public ASTMethod getMethod(Method method) {

        ImmutableList<ASTParameter> astParameters = getParameters(method);
        ASTAccessModifier modifier = ASTAccessModifier.getModifier(method.getModifiers());
        ImmutableSet<ASTType> throwsTypes = getTypes(method.getExceptionTypes());

        return new ASTClassMethod(method, getType(method.getReturnType(), method.getGenericReturnType()), astParameters, modifier, getAnnotations(method), throwsTypes);
    }
1283404
@Override
    public void setMethod(String method) throws UnsupportedMethodException {
        MethodValues val = MethodValues.match(method, 0, method.length());
        if (null == val) {
            throw new UnsupportedMethodException("Illegal method " + method);
        }
        setMethod(val);
    }
551420
@SuppressWarnings("unchecked")
    public <T extends Annotation> T getSetterAnnotation(Method method, Class<T> annotationType) {
        T annotation = method.getAnnotation(annotationType);
        if (annotation != null) {
            return annotation;
        }
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        if (parameterAnnotations.length > 0 ) {
            for (Annotation anno : parameterAnnotations[0]) {
                if (annotationType.isInstance(anno)) {
                    return (T)anno;
                }
            }
        }
        return null;
    }
1042919
public boolean isSet(String propName) {
        if (propName.equals("method")) {
            return isSetMethod();
        }
        if (propName.equals("object")) {
            return isSetObject();
        }
        if (propName.equals("attribute")) {
            return isSetAttribute();
        }
        return false;
    }
634266
private boolean isIsGetter(AptMethod method) {
        String methodName = method.getName();

        if (methodName.length() < 3)
            return false;

        if (!methodName.startsWith("is"))
            return false;

        if (method.getArgList().length() > 0)
            return false;

        if (!"boolean".equals(method.getReturnType()))
            return false;

        return true;
    }
1226713
private static boolean containsMethod(Method method, List<Method> methods) {
    if(methods != null) {
      for(Method aMethod : methods){
        if(method.getName().equals(aMethod.getName())) {
          return true;
        }
      }
    }
    return false;
  }
1182856
static boolean isJavaPropertyMethod(final String methodName) {
        return (methodName.length() > PROPERTY_METHOD_PREFIX_LEN
                && (methodName.startsWith("get") || methodName.startsWith(("set"))));
    }
945509
private static boolean hasPossibleMutatingMethods(@Nonnull final List<Method> methods) {
		boolean result = false;
		for (final Method method : methods) {
			if (!method.getAttributes().isEmpty()) {
				result = true;
				break;
			}
		}
		return result;
	}
532045
public static boolean isSetterMethod(final Method method) {
        
        final String methodName = method.getName();
        if(!methodName.startsWith("set")) {
            return false;
            
        } else if(methodName.length() <= 3) {
            return false;
        }
        
        if(method.getParameterCount() != 1) {
            return false;
        }
        
        return true;
        
    }
474482
protected boolean isHttpMethodMatch(String method) {
		if(StrUtil.isNotBlank(httpMethod) && httpMethod.equalsIgnoreCase(method) == false) {
			if(HuluSetting.isDevMode) {
				StaticLog.warn("Request [{}] method [{}] is not match [{}]", requestPath, method, httpMethod);
			}
			return false;
		}
		return true;
	}
403867
public static boolean isGetterMethod(final Method method) {
        
        final String methodName = method.getName();
        if(!methodName.startsWith("get")) {
            return false;
            
        } else if(methodName.length() <= 3) {
            return false;
        }
        
        if(method.getParameterCount() > 0) {
            return false;
        }
        
        if(method.getReturnType().equals(Void.class)) {
            return false;
        }
        
        return true;
        
    }
859792
protected boolean isSetterMethod(MethodDoc methodDoc) {
		if (methodDoc.parameters() != null && methodDoc.parameters().length == 1
				&& methodDoc.name().matches("^set.+")) {
			return true;
		}
		return false;
	}
547541
public static Map<String, Method> getSetters(Class<?> clazz) {
		Map<String, Method> setters = new HashMap<String, Method>();
		Method[] methods = clazz.getMethods();
		for (Method method : methods) {
			String methodName = method.getName();
			if (method.getParameterTypes().length == 1
					&& methodName.startsWith("set") && methodName.length() > 3
					&& method.getReturnType() == Void.TYPE) {
				String propertyName = methodName.substring(3, 4).toLowerCase();
				if (methodName.length() > 4) {
					propertyName += methodName.substring(4);
				}
				setters.put(propertyName, method);
			}
		}
		return setters;
	}
349690
private boolean isFixtureMethod(MethodNode method) {
    String name = method.getName();

    for (String fmName : FIXTURE_METHODS) {
      if (!fmName.equalsIgnoreCase(name)) continue;

      // assertion: is (meant to be) a fixture method, so we'll return true in the end

      if (method.isStatic())
        errorReporter.error(method, "Fixture methods must not be static");
      if (!fmName.equals(name))
        errorReporter.error(method, "Misspelled '%s()' method (wrong capitalization)", fmName);

      return true;
    }

    return false;
  }
1253331
public Method getMethod(Method method) {
        return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes());
    }
736052
private boolean isHandlerMethod(final Method method) {
        boolean isHandler = false;

        if (hasStartSagaAnnotation(method) || hasHandlerAnnotation(method)) {
            if (method.getReturnType().equals(Void.TYPE)) {
                Class<?>[] parameterTypes = method.getParameterTypes();
                if (parameterTypes.length == 1) {
                    isHandler = true;
                } else {
                    LOG.warn("Method {}.{} marked for saga does not have the expected single parameter.", method.getDeclaringClass(), method.getName());
                }
            } else {
                LOG.warn("Method {}.{} marked for saga event handling but does return a value.", method.getDeclaringClass(), method.getName());
            }
        }

        return isHandler;
    }