/**
   * Construct a Filter object. This filter object may be used to match a ServiceReference or a
   * Dictionary. See Filter for a description of the filter string syntax.
   *
   * @param filter The filter string.
   * @return A Filter object encapsulating the filter string.
   * @exception InvalidSyntaxException If the filter parameter contains an invalid filter string
   *     which cannot be parsed.
   */
  public Filter createFilter(String filter) throws InvalidSyntaxException {
    checkValid();

    return FilterImpl.newInstance(filter);
  }