concept final in category dependency injection

appears as: final
Dependency Injection: Design Patterns Using Spring and Guice

This is an excerpt from Manning's book Dependency Injection: Design Patterns Using Spring and Guice.

Now the circularity is satisfied. When the injector starts up, both host and symbiote object graphs are constructed via their nullary (zero-argument) constructors and then wired by setter to reference each other. Easy enough. Unfortunately there are a couple of serious drawbacks with this choice. The most obvious one is that we can no longer declare either dependency as final. So, this solution is less than ideal.

Looking over UnsafeObject, it’s obvious that dependencies are wired by setter injection. But we’re not quite sure why. It has forced both dependencies slippery and shady to be non-final, that is, mutable. And it looks like init() is expected to be called at some stage before the UnsafeObject is ready to perform duties. This object is unsafe, because there are too many ways to construct it incorrectly. Look at the following abusive injector configurations that are permitted by it:

public class FrenchChef {
public final void cook() {
...
}

void clean() {
...
}
}