forked from phoedos/pmd
[core] Apply PR review suggestions, refs #2382
This commit is contained in:
@ -20,7 +20,7 @@ import net.sf.saxon.om.Axis;
|
||||
* printer.visit(query.xpathExpression.getInternalExpression());
|
||||
* </pre>
|
||||
*/
|
||||
public class ExpressionPrinter extends Visitor {
|
||||
public class ExpressionPrinter extends SaxonExprVisitor {
|
||||
private int depth = 0;
|
||||
|
||||
private void print(String s) {
|
||||
|
@ -34,7 +34,7 @@ import net.sf.saxon.type.Type;
|
||||
* <p>DocumentSorter expression is removed. The sorting of the resulting nodes needs to be done
|
||||
* after all (sub)expressions have been executed.
|
||||
*/
|
||||
public class RuleChainAnalyzer extends Visitor {
|
||||
public class RuleChainAnalyzer extends SaxonExprVisitor {
|
||||
private final Configuration configuration;
|
||||
private String rootElement;
|
||||
private boolean rootElementReplaced;
|
||||
@ -107,9 +107,10 @@ public class RuleChainAnalyzer extends Visitor {
|
||||
|
||||
@Override
|
||||
public Expression visit(LazyExpression e) {
|
||||
boolean prevCtx = insideLazyExpression;
|
||||
insideLazyExpression = true;
|
||||
Expression result = super.visit(e);
|
||||
insideLazyExpression = false;
|
||||
insideLazyExpression = prevCtx;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import net.sf.saxon.expr.RootExpression;
|
||||
import net.sf.saxon.expr.VennExpression;
|
||||
import net.sf.saxon.sort.DocumentSorter;
|
||||
|
||||
abstract class Visitor {
|
||||
abstract class SaxonExprVisitor {
|
||||
public Expression visit(DocumentSorter e) {
|
||||
Expression base = visit(e.getBaseExpression());
|
||||
return new DocumentSorter(base);
|
@ -17,7 +17,7 @@ import net.sf.saxon.expr.VennExpression;
|
||||
*
|
||||
* <p>E.g. "//A | //B | //C" will result in 3 expressions "//A", "//B", and "//C".
|
||||
*/
|
||||
class SplitUnions extends Visitor {
|
||||
class SplitUnions extends SaxonExprVisitor {
|
||||
private List<Expression> expressions = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user