diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitorBase.java b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitorBase.java index 7646fdc419..08a6f529f0 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitorBase.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/lang/ast/AstVisitorBase.java @@ -16,7 +16,8 @@ public abstract class AstVisitorBase implements AstVisitor { /** * Visit the children. By default the data parameter is passed unchanged - * to all descendants, and this returns null . + * to all descendants, and null is returned. Override this method to customize + * this behavior. * * @param node Node whose children should be visited * @param data Parameter of the visit diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java index 660fdc1547..6700f1c08d 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehension.java @@ -12,7 +12,7 @@ public final class ASTArrayComprehension extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java index d2705db202..f1c2459d22 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayComprehensionLoop.java @@ -12,7 +12,7 @@ public final class ASTArrayComprehensionLoop extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java index a3fea1f8e3..0d31e5ea05 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTArrayLiteral.java @@ -15,7 +15,7 @@ public final class ASTArrayLiteral extends AbstractEcmascriptNode } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java index 1ca45f45ce..04a3c928fd 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAssignment.java @@ -12,7 +12,7 @@ public final class ASTAssignment extends AbstractInfixEcmascriptNode } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java index ca2afd9f03..c87c140b95 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTAstRoot.java @@ -20,7 +20,7 @@ public final class ASTAstRoot extends AbstractEcmascriptNode implements } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java index 42f084523b..c4a7c1df2c 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBlock.java @@ -12,7 +12,7 @@ public final class ASTBlock extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java index babe207902..f5d52feb74 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTBreakStatement.java @@ -13,7 +13,7 @@ public final class ASTBreakStatement extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java index 9407d1e77c..986098b017 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTCatchClause.java @@ -12,7 +12,7 @@ public final class ASTCatchClause extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java index 62900dd699..d4635fd374 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTComment.java @@ -12,7 +12,7 @@ public final class ASTComment extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java index 7fa0d3e449..0b55705c0c 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTConditionalExpression.java @@ -12,7 +12,7 @@ public final class ASTConditionalExpression extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java index c47501ef7a..a24c838180 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTContinueStatement.java @@ -13,7 +13,7 @@ public final class ASTContinueStatement extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java index 6d579b5069..225da24d9a 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTDoLoop.java @@ -12,7 +12,7 @@ public final class ASTDoLoop extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java index f689d2079c..80bf56bb1f 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTElementGet.java @@ -12,7 +12,7 @@ public final class ASTElementGet extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java index ad0d48abd0..94d0acb198 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyExpression.java @@ -12,7 +12,7 @@ public final class ASTEmptyExpression extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyStatement.java index 5e5a1abcce..44300258cd 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyStatement.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTEmptyStatement.java @@ -12,7 +12,7 @@ public final class ASTEmptyStatement extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java index 9780b27117..28173de980 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTExpressionStatement.java @@ -13,7 +13,7 @@ public final class ASTExpressionStatement extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java index 1df83c1d53..a97f348ff3 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForInLoop.java @@ -12,7 +12,7 @@ public final class ASTForInLoop extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java index 746435a92e..2405a2f3b6 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTForLoop.java @@ -12,7 +12,7 @@ public final class ASTForLoop extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java index 10d7404adf..4b338e3bac 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionCall.java @@ -12,7 +12,7 @@ public final class ASTFunctionCall extends AbstractEcmascriptNode } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java index bc4d94055b..349358af93 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTFunctionNode.java @@ -13,7 +13,7 @@ public final class ASTFunctionNode extends AbstractEcmascriptNode } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java index 8b407db87c..2abaa8a04f 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTIfStatement.java @@ -12,7 +12,7 @@ public final class ASTIfStatement extends AbstractEcmascriptNode { } @Override - public Object jjtAccept(EcmascriptParserVisitor visitor, Object data) { + protected R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java index 9deb017a34..3283fc4a59 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTInfixExpression.java @@ -12,7 +12,7 @@ public final class ASTInfixExpression extends AbstractInfixEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java index 8d52211df1..dd64f99db3 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTKeywordLiteral.java @@ -16,7 +16,7 @@ public final class ASTKeywordLiteral extends AbstractEcmascriptNode R acceptJsVisitor(EcmascriptVisitor visitor, P data) { return visitor.visit(this, data); } diff --git a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java index 4c1b2bf161..7b1cc44bf6 100644 --- a/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java +++ b/pmd-javascript/src/main/java/net/sourceforge/pmd/lang/ecmascript/ast/ASTLabel.java @@ -13,7 +13,7 @@ public final class ASTLabel extends AbstractEcmascriptNode