Class Query.Builder

  • Enclosing class:
    Query

    public static class Query.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • language

        public Query.Builder language​(@NotNull
                                      @NotNull Language language)
        Sets the programming language associated with the query.
        Parameters:
        language - The language associated with the query
        Returns:
        this builder
        Throws:
        NullPointerException - if the language is null
        UnsatisfiedLinkError - if the language was not linked to native code
        ABIVersionError - if the language ABI version is incompatible with requirements
      • pattern

        public Query.Builder pattern​(@NotNull
                                     @NotNull String pattern)
        Sets the query pattern that will be used to match nodes.
        Parameters:
        pattern - The symbolic expression string of the query pattern.
        Returns:
        this builder
        Throws:
        NullPointerException - if the pattern is null
      • build

        public Query build()
        Builds and returns a new Query instance with the configured language and pattern.
        Returns:
        A new query instance
        Throws:
        QueryException - if query construction fails