@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { if (hasNoExplicitAutoFinal(node) || candidate == node) { super.visitConstructorOrMethod(node, isConstructor); } }
public void visitConstructor(ConstructorNode node) { visitConstructorOrMethod(node, true); }
public void visitMethod(MethodNode node) { visitConstructorOrMethod(node, false); }
@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { // ClassCodeVisitorSupport doesn't seem to visit parameters for (Parameter param: node.getParameters()) { visitAnnotations(param); if (param.getInitialExpression() != null) param.getInitialExpression().visit(this); } super.visitConstructorOrMethod(node, isConstructor); }
@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { typeCheckingContext.pushEnclosingMethod(node); if (!isSkipMode(node) && !shouldSkipMethodNode(node)) { super.visitConstructorOrMethod(node, isConstructor); } if (!isConstructor) { returnAdder.visitMethod(node); // return statement added after visitConstructorOrMethod finished... we can not count these auto-generated return statements(GROOVY-7753), see `typeCheckingContext.pushEnclosingReturnStatement` } typeCheckingContext.popEnclosingMethod(); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { for (Parameter p : node.getParameters()) { if (p.hasInitialExpression()) { Expression init = p.getInitialExpression(); p.setInitialExpression(transform(init)); } } super.visitConstructorOrMethod(node, isConstructor); }
MethodNode oldCurrentMethod = currentMethod; currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); if (isConstructor) { final Set<String> exceptions = new HashSet<String>();
@Override protected final void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { super.visitConstructorOrMethod(node, isConstructor); }
public void visitConstructor(ConstructorNode node) { visitConstructorOrMethod(node,true); }
public void visitMethod(MethodNode node) { visitConstructorOrMethod(node,false); }
@Override public void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { MethodNode oldCurrentMethod = currentMethod; currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); currentMethod = oldCurrentMethod; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { super.visitConstructorOrMethod(node, isConstructor); // this should be pushed into the super class... for (Parameter param : node.getParameters()) { visitAnnotations(param); } }
@Override protected void visitConstructorOrMethod(final MethodNode node, final boolean isConstructor) { pushContext(node); super.visitConstructorOrMethod(node, isConstructor); popContext(); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { super.visitConstructorOrMethod(node, isConstructor); // this should be pushed into the super class... for (Parameter param : node.getParameters()) { visitAnnotations(param); } }
@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { super.visitConstructorOrMethod(node, isConstructor); for (Parameter parameter : node.getParameters()) { isInside(parameter, line, column); } }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { Parameter[] paras = node.getParameters(); for (int i=0; i<paras.length; i++) { Parameter p = paras[i]; if (p.hasInitialExpression()) { Expression init = p.getInitialExpression(); p.setInitialExpression(transform(init)); } } super.visitConstructorOrMethod(node,isConstructor); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { for (Parameter p : node.getParameters()) { if (p.hasInitialExpression()) { Expression init = p.getInitialExpression(); p.setInitialExpression(transform(init)); } } super.visitConstructorOrMethod(node, isConstructor); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { Parameter[] paras = node.getParameters(); for (int i=0; i<paras.length; i++) { Parameter p = paras[i]; if (p.hasInitialExpression()) { Expression init = p.getInitialExpression(); p.setInitialExpression(transform(init)); } } super.visitConstructorOrMethod(node,isConstructor); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { Parameter[] paras = node.getParameters(); for (int i=0; i<paras.length; i++) { Parameter p = paras[i]; if (p.hasInitialExpression()) { Expression init = p.getInitialExpression(); p.setInitialExpression(transform(init)); } } super.visitConstructorOrMethod(node,isConstructor); }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { pushState(node.isStatic()); node.setVariableScope(currentScope); // GROOVY-2156 Parameter[] parameters = node.getParameters(); for (int i = 0; i < parameters.length; i++) { Parameter parameter = parameters[i]; visitAnnotations(parameter); } declare(node.getParameters(), node); super.visitConstructorOrMethod(node, isConstructor); popState(); }