code: protected NamedSelector namedSelector( String nameWithOptionalAlias ) {
          String[] parts = nameWithOptionalAlias.split("\\s(AS|as)\\s");
          if (parts.length == 2) {
              return new NamedSelector(selector(parts[0]), selector(parts[1]));
          }
          return new NamedSelector(selector(parts[0]));
      }
docs: Convenience method that creates a {@link NamedSelector} object given a string that contains the selector name and
  optionally an alias. The format of the string parameter is <code>name [AS alias]</code>. Leading and trailing whitespace
  are trimmed.
  
  @param nameWithOptionalAlias the name and optional alias; may not be null
  @return the named selector object; never null