public interface Query extends Serializable
A query is abstractly represented by a composite made of implementations of this interface. The syntax can be different from parser to parser, but the result of the parsing process is an instance of this class.
Queries support building visits: invoking accept(QueryBuilderVisitor) on
a suitable QueryBuilderVisitor will return an object
that has been built by the visitor.
To this purpose, the implementation of
accept(QueryBuilderVisitor)
on internal nodes must gather in an array (or in an element)
the results returned by the recursive calls to
accept(QueryBuilderVisitor)
on subnodes and pass the array (or the element) to the suitable visitPost()
method of QueryBuilderVisitor.
Since allocating a generic array is impossible, every visitor must provide an explicit
QueryBuilderVisitor.newArray(int)
method which returns an array of the correct type.
Query| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(QueryBuilderVisitor<T> visitor)
Accepts a visitor.
|
<T> T accept(QueryBuilderVisitor<T> visitor) throws QueryBuilderVisitorException
visitor - the visitor.null if the visit should stop.QueryBuilderVisitorExceptionQuery