code: public ClassNode extractStaticReceiver(MethodCall call) {
          if (call instanceof StaticMethodCallExpression) {
              return ((StaticMethodCallExpression) call).getOwnerType();
          } else if (call instanceof MethodCallExpression) {
              Expression objectExpr = ((MethodCallExpression) call).getObjectExpression();
              if (objectExpr instanceof ClassExpression && ClassHelper.CLASS_Type.equals(objectExpr.getType())) {
                  GenericsType[] genericsTypes = objectExpr.getType().getGenericsTypes();
                  if (genericsTypes!=null && genericsTypes.length==1) {
                      return genericsTypes[0].getType();
                  }
              }
              if (objectExpr instanceof ClassExpression) {
                  return objectExpr.getType();
              }
          }
          return null;
      }
docs: Given a method call, first checks that it's a static method call, and if it is, returns the
  class node for the receiver. For example, with the following code:
  <code></code>Person.findAll { ... }</code>, it would return the class node for <i>Person</i>.
  If it's not a static method call, returns null.
  @param call a method call
  @return null if it's not a static method call, or the class node for the receiver instead.