public boolean isExceptionBlockParameter() { return getDeclaratorId().isExceptionBlockParameter(); }
@Override String kindDisplayName(ASTVariableDeclaratorId node, PropertyDescriptor<Pattern> descriptor) { if (node.isExceptionBlockParameter()) { return "exception block parameter"; } else if (node.isLocalVariable()) { return node.isFinal() ? "final local variable" : "local variable"; } throw new UnsupportedOperationException("This rule doesn't handle this case"); } }
/** * Returns true if this node declares a formal parameter for a method * declaration or a lambda expression. In particular, returns false * if the node is a receiver parameter (see {@link #isExplicitReceiverParameter()}). */ public boolean isFormalParameter() { return jjtGetParent() instanceof ASTFormalParameter && !isExceptionBlockParameter() && !isResourceDeclaration() || isLambdaParamWithNoType(); }
@Override public Object visit(ASTVariableDeclaratorId node, Object data) { if (node.isExceptionBlockParameter()) { checkMatches(node, exceptionBlockParameterRegex, data); } else if (node.isLocalVariable()) { checkMatches(node, node.isFinal() ? finalVarRegex : localVarRegex, data); } return data; }
public boolean isExceptionBlockParameter() { return getDeclaratorId().isExceptionBlockParameter(); }
@Override String kindDisplayName(ASTVariableDeclaratorId node, PropertyDescriptor<Pattern> descriptor) { if (node.isExceptionBlockParameter()) { return "exception block parameter"; } else if (node.isLocalVariable()) { return node.isFinal() ? "final local variable" : "local variable"; } throw new UnsupportedOperationException("This rule doesn't handle this case"); } }
/** * Returns true if this node declares a formal parameter for a method * declaration or a lambda expression. In particular, returns false * if the node is a receiver parameter (see {@link #isExplicitReceiverParameter()}). */ public boolean isFormalParameter() { return jjtGetParent() instanceof ASTFormalParameter && !isExceptionBlockParameter() && !isResourceDeclaration() || isLambdaParamWithNoType(); }
@Override public Object visit(ASTVariableDeclaratorId node, Object data) { if (node.isExceptionBlockParameter()) { checkMatches(node, exceptionBlockParameterRegex, data); } else if (node.isLocalVariable()) { checkMatches(node, node.isFinal() ? finalVarRegex : localVarRegex, data); } return data; }