Using a service locator pattern Using dependency injection, for example Constructor injection Parameter injection Setter injection Interface injection Using a contextualized lookup Using template method design pattern Using strategy design pattern