public class FilterExpressionDumper extends AbstractNodeVisitor
Query.setFilter.
As this class inherits from AbstractNodeVisitor, it only
overwrites those methods that need to dump and relies on the delegation
mechanism for the remaining methods implemented in
AbstractNodeVisitor .| Constructor and Description |
|---|
FilterExpressionDumper()
Constructs an instance of this class.
|
FilterExpressionDumper(java.io.PrintStream out)
Constructs an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
arrive(AscendingOrderingExpression node)
Ascending ordering expressions are dumped like
Ascending(expression). |
protected void |
arrive(BinaryExpression node)
Binary expressions are dumped in parenthesized manner.
|
void |
arrive(CastExpression node)
Cast expressions are dumped like
(type)expression. |
void |
arrive(ComplementExpression node)
Complement expressions are dumped like
~expression. |
void |
arrive(ConstantExpression node)
Dumps the value of the argument
node. |
void |
arrive(DescendingOrderingExpression node)
Descending ordering expressions are dumped like
Descending(expression). |
void |
arrive(FieldAccessExpression node)
Field access expressions are dumped like
target.fieldName. |
void |
arrive(IdentifierExpression node)
Dumps the name of an identifier expression.
|
void |
arrive(NotExpression node)
Dumps a not expression.
|
void |
arrive(UnaryMinusExpression node)
Unary minus expressions are dumped like
-expression. |
protected java.lang.Object |
leave(BinaryExpression node,
java.lang.Object[] results)
Binary expressions are dumped in parenthesized manner.
|
java.lang.Object |
leave(FieldAccessExpression node,
java.lang.Object[] results)
Field access expressions are dumped like
target.fieldName. |
protected java.lang.Object |
leave(MethodCallExpression node,
java.lang.Object[] results)
Method call expressions are dumped like
target.methodName(arguments). |
protected java.lang.Object |
leave(OrderingExpression node,
java.lang.Object[] results)
Ordering expressions are dumped like
Ascending/Descending(expression). |
java.lang.Object |
leave(QueryTree node,
java.lang.Object[] results)
Query trees are dumped like
orderingExpressions, filterExpression. |
boolean |
walkNextChild(AndExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A logical and expression is dumped like
(leftExpression & rightExpression). |
boolean |
walkNextChild(ConditionalAndExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A conditional and expression is dumped like
(leftExpression && rightExpression). |
boolean |
walkNextChild(ConditionalOrExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A logical or expression is dumped like
(leftExpression || rightExpression). |
boolean |
walkNextChild(DivideExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A divide expression is dumped like
(leftExpression / rightExpression). |
boolean |
walkNextChild(EqualsExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
An equals expression is dumped like
(leftExpression == rightExpression). |
boolean |
walkNextChild(GreaterThanEqualsExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A greater than equals expression is dumped like
(leftExpression >= rightExpression). |
boolean |
walkNextChild(GreaterThanExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A greater than expression is dumped like
(leftExpression > rightExpression). |
boolean |
walkNextChild(LessThanEqualsExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A less than equals expression is dumped like
(leftExpression <= rightExpression). |
boolean |
walkNextChild(LessThanExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A less than expression is dumped like
(leftExpression < rightExpression). |
protected boolean |
walkNextChild(MethodCallExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
Method call expressions are dumped like
target.methodName(arguments). |
boolean |
walkNextChild(MinusExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A minus expression is dumped like
(leftExpression - rightExpression). |
boolean |
walkNextChild(NotEqualsExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
Dumps a not equals expression.
|
boolean |
walkNextChild(OrExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A logical or expression is dumped like
(leftExpression | rightExpression). |
boolean |
walkNextChild(PlusExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A plus expression is dumped like
(leftExpression + rightExpression). |
boolean |
walkNextChild(QueryTree node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
Query trees are dumped like
orderingExpressions,
filterExpression. |
boolean |
walkNextChild(TimesExpression node,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
A times expression is dumped like
(leftExpression * rightExpression). |
arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, arrive, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, leave, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChild, walkNextChildpublic FilterExpressionDumper()
System.out.public FilterExpressionDumper(java.io.PrintStream out)
out.out - the print stream to dump toprotected void arrive(BinaryExpression node)
arrive in class AbstractNodeVisitornode - the node to dumpprotected java.lang.Object leave(BinaryExpression node, java.lang.Object[] results)
leave in class AbstractNodeVisitornode - the node to dumpresults - an array of null instancesnullprotected java.lang.Object leave(MethodCallExpression node, java.lang.Object[] results)
target.methodName(arguments).leave in class AbstractNodeVisitornode - the node to dumpresults - an array of null instancesnullprotected java.lang.Object leave(OrderingExpression node, java.lang.Object[] results)
Ascending/Descending(expression).leave in class AbstractNodeVisitornode - the node to dumpresults - an array of null instancesnullprotected boolean walkNextChild(MethodCallExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
target.methodName(arguments).walkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - the result of the previsous child nodeindexOfNextChild - the index of the next child to be dumpedtruepublic void arrive(AscendingOrderingExpression node)
Ascending(expression).arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(DescendingOrderingExpression node)
Descending(expression).arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(ConstantExpression node)
node. If that node holds
a String instance, then the string value is dumped in double quotes.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(CastExpression node)
(type)expression.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(FieldAccessExpression node)
target.fieldName.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(ComplementExpression node)
~expression.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(IdentifierExpression node)
arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(NotExpression node)
!expression.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic void arrive(UnaryMinusExpression node)
-expression.arrive in interface NodeVisitorarrive in class AbstractNodeVisitornode - the node to dumppublic java.lang.Object leave(FieldAccessExpression node, java.lang.Object[] results)
target.fieldName.leave in interface NodeVisitorleave in class AbstractNodeVisitornode - the node to dumpresults - the results of walking the node's childrenpublic java.lang.Object leave(QueryTree node, java.lang.Object[] results)
orderingExpressions, filterExpression.leave in interface NodeVisitorleave in class AbstractNodeVisitornode - the node to dumpresults - the results of walking the node's childrenpublic boolean walkNextChild(AndExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression & rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(ConditionalAndExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression && rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(ConditionalOrExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression || rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(DivideExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression / rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(EqualsExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression == rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(GreaterThanEqualsExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression >= rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(GreaterThanExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression > rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(LessThanEqualsExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression <= rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(LessThanExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression < rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(MinusExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression - rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(NotEqualsExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression != rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(OrExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression | rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(QueryTree node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
orderingExpressions,
filterExpression.walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(PlusExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression + rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtruepublic boolean walkNextChild(TimesExpression node, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
(leftExpression * rightExpression).walkNextChild in interface NodeVisitorwalkNextChild in class AbstractNodeVisitornode - the parent node of the children currently dumpedresultOfPreviousChild - an array of null instancesindexOfNextChild - the index of the next child to be dumpedtrueCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.