boolean (@NotNull PsiCallExpression call, @NotNull JavaSliceBuilder builder, @NotNull Processor<? super SliceUsage> processor) { assert builder.hasNesting(); JavaResolveResult result = call.resolveMethodGenerics(); PsiMethod method = (PsiMethod)result.getElement(); if (method != null) { int parametersCount = method.getParameterList().getParametersCount(); Flow[] annotations = new Flow[parametersCount]; for (int i=0; i<parametersCount;i++) { annotations[i] = isParamFlowAnnotated(method, i); } PsiExpression[] expressions = call.getArgumentList().getExpressions(); PsiParameter[] parameters = method.getParameterList().getParameters(); for (int i = 0; i < expressions.length; i++) { PsiExpression argument = expressions[i]; Flow anno; PsiParameter parameter; if (i>=parameters.length) { if (parameters.length != 0 && parameters[parameters.length-1].isVarArgs()) { anno = annotations[parameters.length - 1]; parameter = parameters[parameters.length-1]; } else { break; } } else { anno = annotations[i]; parameter = parameters[i]; } if (anno != null) { String target = anno.target(); if (target.equals(Flow.DEFAULT_TARGET)) target = Flow.THIS_TARGET; if (target.startsWith(Flow.THIS_TARGET)) { String paramSynthetic = StringUtil.trimStart(StringUtil.trimStart(target, Flow.THIS_TARGET),"."); if (paramSynthetic.equals(builder.getSyntheticField())) { JavaSliceBuilder combined = builder.updateNesting(anno).combineSubstitutor(result.getSubstitutor(), argument.getProject()); if (combined != null && !combined.process(argument, processor)) return false; } } } // check flow parameter to another param for (int si=0; si<annotations.length; si++) { if (si == i) continue; Flow sourceAnno = annotations[si]; if (sourceAnno == null) continue; if (sourceAnno.target().equals(parameter.getName())) { PsiExpression sourceArgument = expressions[si]; JavaSliceBuilder combined = builder.updateNesting(sourceAnno).combineSubstitutor(result.getSubstitutor(), argument.getProject()); if (combined != null && !combined.process(sourceArgument, processor)) return false; } } } } return true; }