获取指定方法的说明
@param method 方法对象
@return 方法说明
546124
public static String getMethodDesc(Method method) {
        Assert.notNull(method);
        return getDesc(method.getReturnType(), method.getParameterTypes());
    }
505429
public final Method getTargetMethod() {
        Method method = initialize();
        if (method == null) {
            if (LOG.isWarnEnabled()) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn("Type [{}] previously declared a method [{}] which has been removed or changed. It is recommended you re-compile the class or library against the latest version to remove this warning.", declaringType, methodName);
                }
            }
            throw ReflectionUtils.newNoSuchMethodError(declaringType, methodName, argTypes);
        }
        return method;
    }
333411
public static boolean isBooleanGetterMethod(final Method method) {
        
        final String methodName = method.getName();
        if(!methodName.startsWith("is")) {
            return false;
            
        } else if(methodName.length() <= 2) {
            return false;
        }
        
        if(method.getParameterCount() > 0) {
            return false;
        }
        
        if(!isPrimitiveBoolean(method.getReturnType())) {
            return false;
        }
        
        return true;
    }
1154702
public static Method getMethod(Class<?> clazz, String methodName, Class<?>... parameterTypes) {
        Assert.notNull(clazz, "类型不能为空");
        Assert.notNull(methodName, "方法名不能为空");

        return METHOD_CACHE.compute(new MethodKey(methodName, clazz, parameterTypes), (k, v) -> {
            if (v == null) {
                try {
                    return allowAccess(clazz.getDeclaredMethod(methodName, parameterTypes));
                } catch (NoSuchMethodException e) {
                    log.error(
                        StringUtils.format("类[{0}]中不存在方法名为[{1}]、方法列表为[{2}]的方法", clazz, methodName,
                            parameterTypes == null ? "null" : Arrays.toString(parameterTypes)));
                    throw new ReflectException(
                        StringUtils.format("类[{0}]中不存在方法名为[{1}]、方法列表为[{2}]的方法", clazz, methodName,
                            parameterTypes == null ? "null" : Arrays.toString(parameterTypes)),
                        e);
                }
            } else {
                return v;
            }
        });
    }
408497
private boolean isMethodApi(Method method)
  {
    if (_type == _api) {
      return true;
    }
    
    for (Method methodApi : _api.getMethods()) {
      if (methodApi.getName().equals(method.getName())) {
        return true;
      }
    }
    
    return false;
  }
407996
public Method getBridgeMethodTarget(Method method) {
        scan();

        if (ivBridgeMethodMetaData == null) {
            return null;
        }

        BridgeMethodMetaData md = ivBridgeMethodMetaData.get(getNonPrivateMethodKey(method));
        return md == null ? null : md.ivTarget;
    }
1255534
public static String getSetKey(ExecutableElement method) {
    StringBuilder result = new StringBuilder();
    AnnotationMirror qualifier = getQualifier(method.getAnnotationMirrors());
    if (qualifier != null) {
      qualifierToString(qualifier, result);
    }
    result.append(SET_PREFIX);
    typeToString(method.getReturnType(), result, '$');
    result.append(">");
    return result.toString();
  }
823117
public boolean referencesMethod(ExecutableElement method)
    {
        TypeElement declaringClass = (TypeElement) method.getEnclosingElement();
        String fullyQualifiedname = declaringClass.getQualifiedName().toString();
        String name = method.getSimpleName().toString();
        assert name.indexOf('.') == -1;
        String descriptor = Descriptor.getDesriptor(method);
        return getRefIndex(Methodref.class, fullyQualifiedname, name, descriptor) != -1;
    }
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;
        
    }
652128
private byte[] getBody(String method) {
        byte[] body = null;
    	String methodsWithInputEntity = HttpMethod.POST.name() + "|" + HttpMethod.PUT.name() + "|" + HttpMethod.DELETE.name();
    	if (method.matches(methodsWithInputEntity)) {
            if (isCompound()) {
                body = Utils.toBytes(getQueryInputEntity());
            }
            else {
                if (metadataJson.containsKey(INPUT_ENTITY)) {
                    JSONable data = (JSONable)commandParams.get(metadataJson.getString(INPUT_ENTITY));
                    if (data != null) {
                        body = Utils.toBytes(data.toJSON());
                    }
                }
            }
        }
        return body;
    }
719777
protected boolean isSetterMethod(Method method) {
        Matcher matcher = _setterRegex.matcher(method.getName());
        if (matcher.matches()) {

            if (Modifier.isStatic(method.getModifiers())) return false;
            if (!Modifier.isPublic(method.getModifiers())) return false;
            if (!Void.TYPE.equals(method.getReturnType())) return false;

            // method parameter checks
            Class[] params = method.getParameterTypes();
            if (params.length != 1) return false;
            if (TypeMappingsFactory.TYPE_UNKNOWN == _tmf.getTypeId(params[0])) return false;

            return true;
        }
        return false;
    }
1096677
public Method getMethod(String methodName) {
        return checkNotNull(methods().get(checkNotNull(methodName)), 
        		"The method %s is not exists of object %s", methodName, delegateClass().getName());
    }
988857
protected String isSetter(final Method<?, ?> method)
   {
      String methodName = method.getName();

      if (!methodName.startsWith(ClassUtils.JAVABEAN_SET_PREFIX))
      {
         return null;
      }

      String propertyName = methodName.substring(ClassUtils.JAVABEAN_SET_PREFIX.length());

      return StringUtils.decapitalize(propertyName);
   }
901129
private boolean isObjectMethod(Method method) {
    for (Method objectMethod : Object.class.getMethods()) {
      if (method.getName().equals(objectMethod.getName())) {
        if (equalParamTypes(objectMethod.getParameterTypes(), method.getParameterTypes())) {
          return true;
        }
      }
    }

    return false;
  }
581192
private boolean isGetterOrSetter(Method method) {
        try {
            String methodName = method.getName();
            return methodName.startsWith("get") || methodName.startsWith("is") || methodName.startsWith("set") || "clearWarnings".equals(methodName);
        } catch (Exception ex) {
            return false; // just in case, better be safe than sorry
        }
    }
666326
private static List<Annotation> getAnnotations(Method method) {
		if (methodAnnotationCache.containsKey(method)) {
			return methodAnnotationCache.get(method);
		}
		List<Annotation> annotations = new ArrayList<>();
		Collections.addAll(annotations, method.getAnnotations());
		annotations = Collections.unmodifiableList(annotations);
		methodAnnotationCache.put(method, annotations);
		return annotations;
	}
1044310
private static Class<?> parameterizedReturnType(Method method) {
    Type type = method.getGenericReturnType();
    if (type instanceof ParameterizedType) {
      try {
        return Class.forName(
            (((ParameterizedType) type).getActualTypeArguments()[0]).getTypeName());
      } catch (ClassNotFoundException e) {
        return Object.class;
      }
    } else {
      return Object.class;
    }
  }