boolean (@NotNull CFGBuilder builder, @NotNull PsiMethodCallExpression call) { if (!ASSERT_INSTANCE_OF.matches(call)) return false; PsiExpression[] expressions = call.getArgumentList().getExpressions(); if (expressions.length < 2 || expressions.length > 3) return false; PsiExpression wantedClass = expressions[0]; PsiExpression objectToTest = expressions[1]; builder.pushExpression(wantedClass) .pushExpression(objectToTest) .boxUnbox(objectToTest, PsiType.getJavaLangObject(call.getManager(), call.getResolveScope())) .splice(2, 0, 0, 1); if (expressions.length == 3) { builder.pushExpression(expressions[2]).pop(); } builder.isInstance(null) .ensure(RelationType.EQ, DfTypes.TRUE, new ContractFailureProblem(call), CommonClassNames.JAVA_LANG_ASSERTION_ERROR) .pop(); return true; }