code: public static boolean isClosureDeclaration(ASTNode expression) {
          if (expression instanceof DeclarationExpression) {
              if (((DeclarationExpression) expression).getRightExpression() instanceof ClosureExpression) {
                  return true;
              }
          }
          if (expression instanceof FieldNode) {
              ClassNode type = ((FieldNode) expression).getType();
              if (AstUtil.classNodeImplementsType(type, Closure.class)) {
                  return true;
              } else if (((FieldNode) expression).getInitialValueExpression() instanceof ClosureExpression) {
                  return true;
              }
          }
          return false;
      }
docs: Returns true if the ASTNode is a declaration of a closure, either as a declaration
  or a field.
  @param expression
  the target expression
  @return
  as described