boolean (PsiMethodCallExpression methodCall, @NotNull ProblemsHolder holder) { if (isVarHandleAccessMethod(methodCall)) { final PsiExpression qualifierDefinition = findDefinition(methodCall.getMethodExpression().getQualifierExpression()); if (qualifierDefinition instanceof PsiMethodCallExpression handleFactoryCall) { final PsiExpression[] factoryArguments = handleFactoryCall.getArgumentList().getExpressions(); if (isCallToMethod(handleFactoryCall, JAVA_LANG_INVOKE_METHOD_HANDLES_LOOKUP, FIND_VAR_HANDLE)) { if (factoryArguments.length == 3) { checkCallReceiver(methodCall, getReflectiveType(factoryArguments[0]), holder); checkVarHandleAccessSignature(methodCall, getReflectiveType(factoryArguments[2]), 1, holder); } } else if (isCallToMethod(handleFactoryCall, JAVA_LANG_INVOKE_METHOD_HANDLES_LOOKUP, FIND_STATIC_VAR_HANDLE)) { if (factoryArguments.length == 3) { checkVarHandleAccessSignature(methodCall, getReflectiveType(factoryArguments[2]), 0, holder); } } else if (isCallToMethod(handleFactoryCall, JAVA_LANG_INVOKE_METHOD_HANDLES, ARRAY_ELEMENT_VAR_HANDLE)) { if (factoryArguments.length == 1) { final ReflectiveType arrayType = getReflectiveType(factoryArguments[0]); if (arrayType != null) { checkCallReceiver(methodCall, arrayType, holder); final ReflectiveType valueType = arrayType.getArrayComponentType(); if (valueType != null) { checkVarHandleAccessSignature(methodCall, valueType, 2, holder); } } } } } return true; } return false; }