code: public String getAliasNameIfRelevant(GroovyExpression expr) {
          if(!(expr instanceof FunctionCallExpression)) {
              return null;
          }
          FunctionCallExpression fc = (FunctionCallExpression)expr;
          if(! fc.getFunctionName().equals(AS_METHOD)) {
              return null;
          }
         LiteralExpression aliasName =  (LiteralExpression)fc.getArguments().get(0);
         return aliasName.getValue().toString();
  
      }
docs: Checks if the given expression is an alias expression, and if so
  returns the alias from the expression.  Otherwise, null is
  returned.