List<AgentPoint> (@Nullable Project project) { List<AgentPoint> annotationPoints = new ArrayList<>(); CaptureConfigurable.processCaptureAnnotations(project, (capture, e, annotation) -> { PsiMethod method; KeyProvider keyProvider; if (e instanceof PsiMethod) { method = (PsiMethod)e; keyProvider = THIS_KEY; } else if (e instanceof PsiParameter psiParameter) { method = (PsiMethod)psiParameter.getDeclarationScope(); keyProvider = param(method.getParameterList().getParameterIndex(psiParameter)); } else { return; } String classVMName = JVMNameUtil.getClassVMName(method.getContainingClass()); if (classVMName == null) { LOG.warn("Unable to find VM class name for annotated method: " + method.getName()); return; } String className = classVMName.replaceAll("\\.", "/"); String methodName = JVMNameUtil.getJVMMethodName(method); String methodDesc = ANY; try { methodDesc = JVMNameUtil.getJVMSignature(method).getName(null); } catch (EvaluateException ex) { LOG.error(ex); } PsiAnnotationMemberValue keyExpressionValue = annotation.findAttributeValue("keyExpression"); if (keyExpressionValue != null && !"\"\"".equals(keyExpressionValue.getText())) { keyProvider = new FieldKeyProvider(className, StringUtil.unquoteString(keyExpressionValue.getText())); //treat as a field } AgentPoint point = capture ? new AgentCapturePoint(className, methodName, methodDesc, keyProvider) : new AgentInsertPoint(className, methodName, methodDesc, keyProvider); annotationPoints.add(point); }); return annotationPoints; }