@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { this.currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); this.currentMethod = null; }
@Override protected void visitConstructorOrMethod(final MethodNode node, final boolean isConstructor) { if (staticCompilationVisitor.isSkipMode(node)) { // method has already been visited by a static type checking visitor return; } super.visitConstructorOrMethod(node, isConstructor); } }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { VariableScope oldScope = currentScope; currentScope = node.getVariableScope(); Map<GenericsTypeName, GenericsType> oldPNames = genericParameterNames; genericParameterNames = node.isStatic() && !Traits.isTrait(node.getDeclaringClass()) ? new HashMap<GenericsTypeName, GenericsType>() : new HashMap<GenericsTypeName, GenericsType>(genericParameterNames); resolveGenericsHeader(node.getGenericsTypes()); Parameter[] paras = node.getParameters(); for (Parameter p : paras) { p.setInitialExpression(transform(p.getInitialExpression())); resolveOrFail(p.getType(), p.getType()); visitAnnotations(p); } ClassNode[] exceptions = node.getExceptions(); for (ClassNode t : exceptions) { resolveOrFail(t, node); } resolveOrFail(node.getReturnType(), node); MethodNode oldCurrentMethod = currentMethod; currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); currentMethod = oldCurrentMethod; genericParameterNames = oldPNames; currentScope = oldScope; }
@Override protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { this.currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); this.currentMethod = null; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { this.currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); this.currentMethod = null; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { this.currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); this.currentMethod = null; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { this.currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); this.currentMethod = null; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { VariableScope oldScope = currentScope; currentScope = node.getVariableScope(); Map<String, GenericsType> oldPNames = genericParameterNames; genericParameterNames = new HashMap<String, GenericsType>(genericParameterNames); resolveGenericsHeader(node.getGenericsTypes()); Parameter[] paras = node.getParameters(); for (Parameter p : paras) { p.setInitialExpression(transform(p.getInitialExpression())); resolveOrFail(p.getType(), p.getType()); visitAnnotations(p); } ClassNode[] exceptions = node.getExceptions(); for (ClassNode t : exceptions) { resolveOrFail(t, node); } resolveOrFail(node.getReturnType(), node); MethodNode oldCurrentMethod = currentMethod; currentMethod = node; super.visitConstructorOrMethod(node, isConstructor); currentMethod = oldCurrentMethod; genericParameterNames = oldPNames; currentScope = oldScope; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { VariableScope oldScope = currentScope; currentScope = node.getVariableScope(); Map oldPNames = genericParameterNames; genericParameterNames = new HashMap(genericParameterNames); resolveGenericsHeader(node.getGenericsTypes()); Parameter[] paras = node.getParameters(); for (int i = 0; i < paras.length; i++) { Parameter p = paras[i]; p.setInitialExpression(transform(p.getInitialExpression())); resolveOrFail(p.getType(), p.getType()); visitAnnotations(p); } ClassNode[] exceptions = node.getExceptions(); for (int i = 0; i < exceptions.length; i++) { ClassNode t = exceptions[i]; resolveOrFail(t, node); } resolveOrFail(node.getReturnType(), node); super.visitConstructorOrMethod(node, isConstructor); genericParameterNames = oldPNames; currentScope = oldScope; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { VariableScope oldScope = currentScope; currentScope = node.getVariableScope(); Map oldPNames = genericParameterNames; genericParameterNames = new HashMap(genericParameterNames); resolveGenericsHeader(node.getGenericsTypes()); Parameter[] paras = node.getParameters(); for (int i = 0; i < paras.length; i++) { Parameter p = paras[i]; p.setInitialExpression(transform(p.getInitialExpression())); resolveOrFail(p.getType(), p.getType()); visitAnnotations(p); } ClassNode[] exceptions = node.getExceptions(); for (int i = 0; i < exceptions.length; i++) { ClassNode t = exceptions[i]; resolveOrFail(t, node); } resolveOrFail(node.getReturnType(), node); super.visitConstructorOrMethod(node, isConstructor); genericParameterNames = oldPNames; currentScope = oldScope; }
protected void visitConstructorOrMethod(MethodNode node, boolean isConstructor) { VariableScope oldScope = currentScope; currentScope = node.getVariableScope(); Map oldPNames = genericParameterNames; genericParameterNames = new HashMap(genericParameterNames); resolveGenericsHeader(node.getGenericsTypes()); Parameter[] paras = node.getParameters(); for (int i = 0; i < paras.length; i++) { Parameter p = paras[i]; p.setInitialExpression(transform(p.getInitialExpression())); resolveOrFail(p.getType(), p.getType()); visitAnnotations(p); } ClassNode[] exceptions = node.getExceptions(); for (int i = 0; i < exceptions.length; i++) { ClassNode t = exceptions[i]; resolveOrFail(t, node); } resolveOrFail(node.getReturnType(), node); super.visitConstructorOrMethod(node, isConstructor); genericParameterNames = oldPNames; currentScope = oldScope; }