Top Description Fields Constructors Methods
jakarta.enterprise.inject.build.compatible.spi

public final Class BuildServicesResolver

extends Object
Class Inheritance
Imports
java.util.Collections, .Comparator, .ServiceConfigurationError, .ServiceLoader, .Set, .TreeSet

An internal helper to resolve BuildServices implementations. This class is public only for integrators and should not be used by applications.
Since
4.0

Field Summary

Modifier and TypeField and Description
private static volatile BuildServices
private static volatile Set<BuildServices>
private static final Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
pack-priv static BuildServices
get()

public static void
setBuildServices(BuildServices
a BuildServices instance that should be used, must not be null
instance
)

This method should not be used by applications.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configuredBuildServicesback to summary
private static volatile BuildServices configuredBuildServices
discoveredBuildServicesback to summary
private static volatile Set<BuildServices> discoveredBuildServices
lockback to summary
private static final Object lock

Constructor Detail

BuildServicesResolverback to summary
public BuildServicesResolver()

Method Detail

discoverFactoriesback to summary
private static void discoverFactories()
getback to summary
pack-priv static BuildServices get()
setBuildServicesback to summary
public static void setBuildServices(BuildServices instance)

This method should not be used by applications. It is only exposed for integrators with complex classloading architectures, where service loader lookup doesn't work out of the box. With this method, an integrator may manually provide an instance of BuildServices and this class will no longer attempt to look it up using service loader.

Parameters
instance:BuildServices

a BuildServices instance that should be used, must not be null

Exceptions
IllegalArgumentException:
if the provided argument is null