Adding final modifier on internal class