Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the Assisted class in the Guice jar?

Tags:

java

maven

guice

I've download Guice 2.0 and 3.0 via Maven, and can't find the entire com.google.inject.assistedinject package in the jar. All the other components of Guice seem to be there, but Assisted and its brethren are simply not there.

Any idea where they went?

like image 368
ripper234 Avatar asked Aug 04 '11 01:08

ripper234


People also ask

What is Assisted inject?

An assisted injection is a dependency injection (DI) pattern that is used to construct an object where some parameters may be provided by the DI framework and others must be passed in, at creation time (a.k.a “assisted”), by the developer (you).

What is a provider in Guice?

Providers are used in numerous ways by Guice: When the default means for obtaining instances (an injectable or parameterless constructor) is insufficient for a particular binding, the module can specify a custom Provider instead, to control exactly how Guice creates or obtains instances for the binding.

What is Guice Assistedinject?

an easier way to get Guice to build auto-wired factories. Factories are a well established pattern for creating value objects, model/domain objects (entities), or objects that combine parameterization and dependencies. Factories can be brittle and contain a lot of boilerplate.


1 Answers

Assisted is bundled with the rest of the AssistedInjection extension as a separate artifact in the com.google.inject.extensions group, along with Multibindings, Persistence and Servlet.

4.0 is com.google.inject.extensions:guice-assistedinject:4.0

3.0 is com.google.inject.extensions:guice-assistedinject:3.0

2.0 is com.google.inject.extensions:guice-assisted-inject:2.0

like image 172
ig0774 Avatar answered Sep 25 '22 10:09

ig0774