constructor injection
[/kənˈstrʌktər ɪnˈdʒɛkʃən/]
nounpl: constructor injections
injeção de dependência por construtor
1. A software design pattern in which an object receives its dependencies through its constructor method rather than creating them internally or having them set through setters
Constructor injection is a best practice in dependency injection frameworks like Spring because it makes dependencies explicit and immutable.
A injeção de dependência por construtor é uma prática recomendada em frameworks de injeção de dependência como Spring porque torna as dependências explícitas e imutáveis.
2. In object-oriented programming, a technique for implementing the Inversion of Control (IoC) principle by passing required objects to a class during instantiation
Using constructor injection ensures that an object is fully initialized with all required dependencies when it is created.
Usar injeção de dependência por construtor garante que um objeto seja totalmente inicializado com todas as dependências necessárias quando é criado.
Constructor injection is a fundamental concept in modern software development, particularly prominent in Java frameworks like Spring and widely adopted in enterprise software development in both Brazil and the USA. The term is used consistently across technical communities regardless of region, though Brazilian developers may alternate between the English and Portuguese versions depending on the formality of documentation and team conventions.
Related Idioms & Phrases
best practice for dependency injection
explicit is better than implicit
follow the dependency inversion principle
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →