public final class Services extends Object
SecurityManager
checks in
load(Class)
and loadSingle(Class, boolean)
.Modifier and Type | Field and Description |
---|---|
private static ClassValue<List<?>> |
cache |
private static String |
SUPPRESS_PROPERTY_NAME |
private static boolean |
SuppressNoClassDefFoundError
Determines whether to suppress the
NoClassDefFoundError raised if a service provider
class specified in a <jre>/jvmci/services/* file is missing. |
Modifier | Constructor and Description |
---|---|
private |
Services() |
Modifier and Type | Method and Description |
---|---|
private static <S> S[] |
getServiceImpls(Class<?> service) |
static <S> Iterable<S> |
load(Class<S> service)
Gets an
Iterable of the JVMCI providers available for a given service. |
static <S> S |
loadSingle(Class<S> service,
boolean required)
Gets the JVMCI provider for a given service for which at most one provider must be available.
|
private static final String SUPPRESS_PROPERTY_NAME
private static final boolean SuppressNoClassDefFoundError
NoClassDefFoundError
raised if a service provider
class specified in a <jre>/jvmci/services/*
file is missing.private static final ClassValue<List<?>> cache
private Services()
public static <S> Iterable<S> load(Class<S> service)
Iterable
of the JVMCI providers available for a given service.SecurityException
- if a security manager is present and it denies
RuntimePermission
("jvmciServices")public static <S> S loadSingle(Class<S> service, boolean required)
service
- the service whose provider is being requestedrequired
- specifies if an InternalError
should be thrown if no provider of
service
is availableSecurityException
- if a security manager is present and it denies
RuntimePermission
("jvmciServices")private static <S> S[] getServiceImpls(Class<?> service)