Constructor and Description |
---|
CustomProvidersFeature(Collection<Class<?>> providers)
Constructs Feature which is used to register providers as providers in Configuration.
|
Modifier and Type | Method and Description |
---|---|
boolean |
configure(FeatureContext context)
A call-back method called when the feature is to be enabled in a given runtime configuration scope.
|
public CustomProvidersFeature(Collection<Class<?>> providers)
providers
- collection of providers which are going to be registeredpublic boolean configure(FeatureContext context)
Feature
true
if the feature was successfully enabled or false
otherwise.
Note that under some circumstances the feature may decide not to enable itself, which is indicated by returning
false
. In such case the configuration context does not add the feature to the collection of enabled features
and a subsequent call to Configuration.isEnabled(Feature)
or Configuration.isEnabled(Class)
method
would return false
.
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.