Supposedly the deal that got Affleck the role of Batman also includes a role for the upcoming Justice League film and any future films spawning from Batman vs Superman. Also could end up being the director or help direct the Justice League film.
Ben Affleck was the first choice candidate for the role but Josh Brolin and Ryan Gosling were also contacted as possibilities. Gosling rejected the offer due to him not liking to act in sequels of movies.
http://www.hollywoodreporter.com/hea...aid-yes-613658