Add factory method and @override annotations