eclipse-sisu / sisu-project

Sisu Inject
https://www.eclipse.org/sisu
Eclipse Public License 2.0
17 stars 15 forks source link

Implement bean filtering #107

Open cstamas opened 5 months ago

cstamas commented 5 months ago

As we know, sisu is "flat", while plexus is filtering components based on visibility (is configurable to be "flat"/"global" as well, but am unaware of any usage relying on that). Maven uses Plexus with default "realm" visibility as well. Basically, Maven would be very fine with Sisu only EXCEPT for component visibility.

Would be great if Sisu would accept (on construction) some "filter" that would be applied to components, to achieve same "realm" visibility as Plexus does.

Maven while constructs Sisu (and Plexus) does use and will use ClassWorlds to create realm hierarchy, so something like RealmManager could be implemented in Maven, while Sisu could be created with some filter like RealmFilteredBeans is.