class ToMethodCall {

    public TypedExpression toMethodCallWithClassCheck(Expression expr, String bindingId, Class<?> clazz) {
        Deque<ParsedMethod> createExpressionCallLeftToRight = createExpressionCallLeftToRight(expr);

        previousClass = clazz; // Start from input class

        for (ParsedMethod e : createExpressionCallLeftToRight) {
            if (e.expression instanceof EnclosedExpr) { // inline cast
                setCursorForEnclosedExpr(e);
            } else if (e.expression instanceof MethodCallExpr) {
                setCursorForMethodCall(e);
            } else {
                convertNameToMethod(bindingId, e);
            }
        }

        return new TypedExpression(previousScope, previousClass);
    }

    public  ToMethodCall(RuleContext context);
    public  ToMethodCall(TypeResolver typeResolver);

}