code: public static MethodNode findMethod(Collection<MethodNode> methodNodes, boolean isStatic, Type returnType, String name,
              Type ... paramTypes) {
          Validate.notNull(methodNodes);
          Validate.notNull(returnType);
          Validate.notNull(name);
          Validate.notNull(paramTypes);
          Validate.noNullElements(methodNodes);
          Validate.noNullElements(paramTypes);
          Validate.isTrue(returnType.getSort() != Type.METHOD);
          for (Type paramType : paramTypes) {
              Validate.isTrue(paramType.getSort() != Type.METHOD && paramType.getSort() != Type.VOID);
          }
          
          Collection<MethodNode> ret = methodNodes;
          
          ret = findMethodsWithName(ret, name);
          ret = findMethodsWithParameters(ret, paramTypes);
          if (isStatic) {
              ret = findStaticMethods(ret);
          }
          
          Validate.validState(ret.size() <= 1); // sanity check -- should never get triggered
  
          return ret.isEmpty() ? null : ret.iterator().next();
      }
docs: Find a method within a class.
  @param methodNodes method nodes to search through
  @param name method name to search for
  @param isStatic {@code true} if the method should be static
  @param returnType return type to search for
  @param paramTypes parameter types to search for (in the order specified)
  @return method found (or {@code null} if no method could be found)
  @throws NullPointerException if any argument is {@code null} or contains {@code null}
  @throws IllegalArgumentException if any element of  {@code paramTypes} is either of sort {@link Type#METHOD} or {@link Type#VOID}, or
  if {@code returnType} is {@link Type#METHOD}