# Explicit Feature Registration

> Why the repo lists features in AppFeatures.kt instead of using Class.forName, how FeatureRegistry rejects a wrong list, and the tests that keep it correct.

- URL: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/07-dependency-injection/lesson-10-explicit-feature-registration
- Course: [Mobile Action Pro](https://dantech.academy/en/courses/kotlin-accelerator.md)
- Module: Dependency Injection with Koin
- Duration: 25 min
- Difficulty: intermediate
- Access: Enrolled students
- Tiếng Việt: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/07-dependency-injection/lesson-10-explicit-feature-registration.md

## Objectives

- Explain why Class.forName was replaced by an explicit list in AppFeatures.kt
- Read how FeatureRegistry and FeatureNavigationRegistry reject empty or duplicate lists
- Use AppFeaturesTest and FeatureRegistryTest to keep the feature list correct

## In this lesson

1. Lesson Goal
2. Part 1: The Old Way Looked Classes Up By Name
3. Part 2: An Explicit List
4. Part 3: FeatureRegistry Rejects A Wrong List
5. Part 4: Tests Keep The List Correct
6. Practice Exercise
7. Code Reading Path
8. Signs To Avoid
9. References
10. Key Points

## Study with an AI agent

The full lesson is for students of this course. Students open the lesson on the web and press **Markdown** to copy all of it, then paste it into Claude, ChatGPT, Cursor or whichever agent you use. Faster: mint a token at `/profile/ai-agents` and your agent reads lessons over MCP.

- [Join the course](https://dantech.academy/en/kotlin-accelerator/checkout)

---

- Previous lesson: [Feature Module Pattern](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/07-dependency-injection/lesson-09-feature-module-pattern.md)
- Next lesson: [ViewModel Injection In Routes](https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/07-dependency-injection/lesson-11-viewmodel-injection-routes.md)
