接口可以按方法发布,不在黑名单里且在白名单里,*算在白名单

@param includeMethods 包含的方法列表
@param excludeMethods 不包含的方法列表
@param methodName     方法名
@return 方法
12470
protected boolean inList(String includeMethods, String excludeMethods, String methodName) {
        //判断是否在白名单中
        if (!StringUtils.ALL.equals(includeMethods)) {
            if (!inMethodConfigs(includeMethods, methodName)) {
                return false;
            }
        }
        //判断是否在黑白单中
        if (inMethodConfigs(excludeMethods, methodName)) {
            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;
  }
425073
private boolean inMethodConfigs(String methodConfigs, String methodName) {
        String[] excludeMethodCollections = StringUtils.splitWithCommaOrSemicolon(methodConfigs);
        for (String excludeMethodName : excludeMethodCollections) {
            boolean exist = StringUtils.equals(excludeMethodName, methodName);
            if (exist) {
                return true;
            }
        }
        return false;
    }
830216
private void displayMessageAtTheBeginningOfMethod(String methodName, List<GherkinStepCondition> conditions) {
        logger.debug("{} with {} contition(s)", methodName, conditions.size());
        displayConditionsAtTheBeginningOfMethod(conditions);
    }
794156
private function isMethodIncluded($methodName, $attr)
    {
        if (empty($attr[self::CONFIG_INCLUDE]) || !is_array($attr[self::CONFIG_INCLUDE])) {
            return true;
        }
        
        return in_array($methodName, $attr[self::CONFIG_INCLUDE]);
    }
127773
public void clearAttributesWithExclude(final String... exclude) throws DevFailed {
        final String[] toExclude = new String[exclude.length];
        for (int i = 0; i < toExclude.length; i++) {
            toExclude[i] = exclude[i].toLowerCase(Locale.ENGLISH);
        }
        for (final String attributeName : dynamicAttributes.keySet()) {
            if (!ArrayUtils.contains(toExclude, attributeName)) {
                removeAttribute(attributeName);
            }
        }
    }
126605
public static Method findMatchingMethod(Method originalMethod, String methodName) {
        Class<?> originalClass = originalMethod.getDeclaringClass();

        return AccessController.doPrivileged(new PrivilegedAction<Method>() {
            @Override
            public Method run() {
                return findMatchingMethod(originalMethod, methodName, originalClass, new ResolutionContext(), originalClass);
            }
        });
    }
302497
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setExcludeClasses(final String... excludeClasses) {
        pathBuilder.setExcludeClasses(excludeClasses);
        return (T) this;
    }
1241005
def method_missing(method_name, *args)
      if Color::X11Named.color_names.include?(method_name) && args.empty?
        color(method_name)
      else
        super
      end
    end
345648
public static Method findMethod(Class clazz, String methodName) {
        final List<Method> methods = getDeclaredMethodsRecursively(clazz).get(methodName);
        if (methods.isEmpty()) {
            throw new IllegalArgumentException(clazz.getName() + "::" + methodName + " not found");
        }
        final List<Method> specificMethods;
        if (methods.size() > 1) {
            specificMethods
                = methods.stream().filter(m -> m.getReturnType() != Object.class).collect(Collectors.toList());
        } else {
            specificMethods = methods;
        }
        if (specificMethods.size() != 1) {
            throw new IllegalArgumentException(
                clazz.getName() + "::" + methodName
                + " more then one method found, can not decide which one to use. "
                + methods
            );
        }
        return specificMethods.get(0);
    }
812712
public static Method getMethod(String clazzName, String methodName, String[] argsType) {
        Class clazz = ClassUtils.forName(clazzName);
        Class[] classes = ClassTypeUtils.getClasses(argsType);
        return getMethod(clazz, methodName, classes);
    }
1128925
public void setExcludeProps(Collection<String> excludeProps) {
        if (null == this.excludeProps) {
            this.excludeProps = new ArrayList<>();
        }
        this.excludeProps.clear();
        this.excludeProps.addAll(excludeProps);
    }
802233
public boolean removeMethodInfo(final String methodName) {
        
        final MethodInfo existInfo = getMethodInfo(methodName);
        if(existInfo != null) {
            this.methodInfos.remove(existInfo);
            return true;
        }
        
        return false;
        
    }
276952
public void withOverridenMethods(List<String> excludeFieldsFromToString) {
		if (Config.getPojoConfig().isIncludeHashcodeAndEquals()) {
			withHashCode();
			withEquals();
		}
		if (Config.getPojoConfig().isIncludeToString()) {
			withToString(excludeFieldsFromToString);
		}
	}
1178182
@Deprecated
    public static synchronized void suppressMethod(Class<?> cls, Class<?>... additionalClasses) {
        SuppressCode.suppressMethod(cls, additionalClasses);
    }
681937
private function isMethodExcluded($methodName, $attr)
    {
        if (empty($attr[self::CONFIG_EXCLUDE]) || !is_array($attr[self::CONFIG_EXCLUDE])) {
            return false;
        }

        return in_array($methodName, $attr[self::CONFIG_EXCLUDE]);
    }
976230
protected MethodDescriptor[] addMissingContextMethodDescriptors(
        Method[] methods, MethodDescriptor[] methodDescriptors) {

        List<Method> methodNames = new ArrayList<Method>(methodDescriptors.length);
        Vector<MethodDescriptor> mds = new Vector<MethodDescriptor>(methods.length);

        for (int i=0; i<methodDescriptors.length; i++) {
            methodNames.add(methodDescriptors[i].getMethod());
            mds.add(methodDescriptors[i]);
        }

        for (int i=0; i<methods.length; i++) {
            if (!methodNames.contains(methods[i])) {
                mds.add(new MethodDescriptor(methods[i]));
            }           
        }
        
        methodDescriptors = new MethodDescriptor[mds.size()];
        mds.copyInto(methodDescriptors);

        return methodDescriptors;
    }