@NoImplement public interface ExtensionLoadingContext
ExtensionModel
.
Each instance should be used to load one and only one ExtensionModel
. Use different
instances if you're going to load several models.
Modifier and Type | Method and Description |
---|---|
ExtensionLoadingContext |
addCustomDeclarationEnricher(DeclarationEnricher enricher)
Registers a custom
DeclarationEnricher which is executed before the ones that
the runtime automatically applies. |
ExtensionLoadingContext |
addCustomDeclarationEnrichers(Collection<DeclarationEnricher> enrichers)
Registers custom
DeclarationEnricher which are executed before the ones that
the runtime automatically applies. |
ExtensionLoadingContext |
addCustomValidator(ExtensionModelValidator extensionModelValidator)
Registers a custom
ExtensionModelValidator to be executed on top of the ones which
the runtime applies by default. |
ExtensionLoadingContext |
addCustomValidators(Collection<ExtensionModelValidator> extensionModelValidators)
Registers custom
ExtensionModelValidator to be executed on top of the ones which
the runtime applies by default. |
void |
addParameter(String key,
Object value)
Adds a custom parameter registered under
key |
void |
addParameters(Map<String,Object> parameters)
Adds the contents of the given map as custom parameters
|
List<DeclarationEnricher> |
getCustomDeclarationEnrichers() |
List<ExtensionModelValidator> |
getCustomValidators() |
DslResolvingContext |
getDslResolvingContext() |
ClassLoader |
getExtensionClassLoader() |
ExtensionDeclarer |
getExtensionDeclarer()
The
ExtensionDeclarer in which
the extension is being described into |
<T> Optional<T> |
getParameter(String key)
Obtains the custom parameter registered under
key . |
ExtensionDeclarer getExtensionDeclarer()
ExtensionDeclarer
in which
the extension is being described intonull
ExtensionDeclarer
void addParameter(String key, Object value)
key
key
- the key under which the value
is to be registeredvalue
- the custom parameter valueIllegalArgumentException
- if key
or value
are null
void addParameters(Map<String,Object> parameters)
parameters
- a map with custom parameters<T> Optional<T> getParameter(String key)
key
.T
- generic type of the expected valuekey
- the key under which the wanted value is registeredOptional
valueExtensionLoadingContext addCustomValidator(ExtensionModelValidator extensionModelValidator)
ExtensionModelValidator
to be executed on top of the ones which
the runtime applies by default.
Custom validators will not apply globally but just for the model being loaded with this context.
extensionModelValidator
- the custom validatorthis
instanceExtensionLoadingContext addCustomValidators(Collection<ExtensionModelValidator> extensionModelValidators)
ExtensionModelValidator
to be executed on top of the ones which
the runtime applies by default.
These custom validators will not apply globaly but just for the model being loaded with this context.
extensionModelValidators
- the custom validatorsthis
instanceExtensionLoadingContext addCustomDeclarationEnricher(DeclarationEnricher enricher)
DeclarationEnricher
which is executed before the ones that
the runtime automatically applies.enricher
- the custom enricherthis
instanceExtensionLoadingContext addCustomDeclarationEnrichers(Collection<DeclarationEnricher> enrichers)
DeclarationEnricher
which are executed before the ones that
the runtime automatically applies.enrichers
- the custom enrichersthis
instanceList<DeclarationEnricher> getCustomDeclarationEnrichers()
List<ExtensionModelValidator> getCustomValidators()
ClassLoader getExtensionClassLoader()
ClassLoader
DslResolvingContext getDslResolvingContext()
DslResolvingContext
with all the dependencies to load an ExtensionModel
Copyright © 2018. All rights reserved.