boolean (@NotNull CFGBuilder builder, @NotNull PsiMethodCallExpression call) { PsiExpression qualifier = call.getMethodExpression().getQualifierExpression(); if (qualifier == null) return false; if (IS_ASSIGNABLE_FROM.matches(call)) { PsiExpression arg = call.getArgumentList().getExpressions()[0]; PsiMethodCallExpression nestedCall = tryCast(PsiUtil.skipParenthesizedExprDown(arg), PsiMethodCallExpression.class); PsiExpression getClassQualifier = OBJECT_GET_CLASS.matches(nestedCall) ? nestedCall.getMethodExpression().getQualifierExpression() : null; if (getClassQualifier != null) { builder.pushExpression(qualifier) .pushExpression(getClassQualifier) .swap() .isInstance(call); } else { builder.pushExpression(qualifier) .pushExpression(arg) .isAssignableFrom(call); } return true; } else if (IS_INSTANCE.matches(call)) { PsiExpression arg = call.getArgumentList().getExpressions()[0]; builder.pushExpression(qualifier) .pushExpression(arg) .boxUnbox(arg, PsiType.getJavaLangObject(call.getManager(), call.getResolveScope())) .swap() .isInstance(call); return true; } return false; }