On 26/02/2017 13:13, Doug Simon wrote:
:
Also, what if there's provider in jdk.internal.vm.compiler itself? Will it be
loaded along with the providers on my module path?
If it has `provides com.oracle.truffle.api.object.LayoutFactory` then it
will be located too. If the provider interface is only for overriding
then you could use
ServiceLoader.load(LayerFactory.class).findFirst().orElse(DefaultLayoutFactory.get())
so that it use a default/fallback implementation in your module when
there isn't a provider deployed on the module path.
-Alan