Hi,

While working on some DCI code I had the need to be able to instantiate instances of inner classes. This would normally not work since the "outer instance" is required for the constructor to work. I got around this, and so now you can do this:
class Outer
{
  @Uses Inner inner;

  class Inner
  {
  }
}
--
Qi4j will instantiate the Inner class with the Outer instance as constructor argument while trying to inject the @Uses dependency in Outer. It obviously doesn't work if you use @Uses in a constructor dependency, only for fields+method injection.

Committed and pushed in v2.0 branch.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to