Look and feels and ServiceLoader

Paulo Levi i30817 at gmail.com
Wed Nov 11 01:26:55 UTC 2009


Sorry to hit the same note again, but i still think that the
UIManager.installLookAndFeel way of installing look and feels is very
primitive, and breakable, especially considering that the jre now has
ServiceLoader.

There is just the problem that ServiceLoader doesn't allow
Constructors or factory methods or arguments to be specified in the
meta-inf.services
so this approach actually requires that each look and feel create a
factory type for each skin they have.

And they never do and never will.
Is it really so much to ask that UIManager.getInstalledLookAndFeels
get all lafs infos in the classpath (that i'm sure the laf authors
would like to do?)

I'm asking for ServiceLoader to be enhaced so it can understand
constructors over Strings and numbers at least.
Please.



More information about the core-libs-dev mailing list