|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Query
A node of a composite representing a query.
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
Method Summary | ||
---|---|---|
|
accept(QueryBuilderVisitor<T> visitor)
Accepts a visitor. |
Method Detail |
---|
<T> T accept(QueryBuilderVisitor<T> visitor) throws QueryBuilderVisitorException
visitor
- the visitor.
null
if the visit should stop.
QueryBuilderVisitorException
Query
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |