Which one is better?
Obviously, first is better. Although you indicated that you are using the Command pattern, it does not fill out the Command pattern. The team template will have team (abstract), concrete teams, receiver, interrogator and client.
Take a look at this question:
Using the command design pattern
Besides Command Patten, I would like to highlight the pros and cons of reflection.
Pros:
- Dependency Injection Handling
- Development of plug and play frameworks
Minuses:
- Reflection challenge slower
- You could violate security and explode the application with bad intent (for example, set private variables of a class that is invisible to another class)
Have a look at the relevant SE question regarding Reflection:
What is reflection and why is it useful?
This is normal in a single application to allow developers to use one of the methods they want.
Typically, developers choose the best method to solve a particular problem.
Are there other ways?
It depends on the type of problem you are about to solve. Design patterns provide solutions for recurring problems.
All solutions cannot match existing design patterns. You may have developed new templates to solve your problem.
source share