@NoImplement public interface DslElementModelFactory
DslElementModel
of any ComponentConfiguration
within the context of the available application
plugins, provided for each instance of this DslElementModelFactory
Modifier and Type | Method and Description |
---|---|
<T> Optional<DslElementModel<T>> |
create(ComponentConfiguration componentConfiguration)
Resolves the
DslElementModel for the given applicationElement , providing an element
with all the required information for representing this applicationElement element in the DSL and binding it to its
model component or MetadataType . |
<T> Optional<DslElementModel<T>> |
create(ElementDeclaration elementDeclaration)
Resolves the
DslElementModel for the given ElementDeclaration , providing an element with all the required
information for representing this elementDeclaration element in the DSL and binding it to its model component or MetadataType . |
static DslElementModelFactory |
getDefault(DslResolvingContext context)
Provides a default implementation of the
DslElementModelFactory |
static DslElementModelFactory getDefault(DslResolvingContext context)
DslElementModelFactory
context
- the DslResolvingContext
to be used when performing a
namespace
or
ElementDeclaration.getName()
based lookup for a given ExtensionModel
.DslElementModelFactory
<T> Optional<DslElementModel<T>> create(ElementDeclaration elementDeclaration)
DslElementModel
for the given ElementDeclaration
, providing an element with all the required
information for representing this elementDeclaration
element in the DSL and binding it to its model
component or MetadataType
. This resolution can only be performed from DSL top-level-elements, which have
global representations in the ExtensionModel
, so this method will return an Optional.empty()
result if the
given applicationElement
does not identify either a ConfigurationModel
, OperationModel
,
SourceModel
T
- the expected model type of the element
elementDeclaration
- the ElementDeclaration
for which its DslElementModel
representation is required.DslElementModel
representation of the ElementDeclaration
if one is possible to be built based on
the extensions
provided as resolution context, or Optional.empty()
if no
DslElementModel
could be created for the given applicationElement
with the current extensions
context.<T> Optional<DslElementModel<T>> create(ComponentConfiguration componentConfiguration)
DslElementModel
for the given applicationElement
, providing an element
with all the required information for representing this applicationElement
element in the DSL and binding it to its
model
component or MetadataType
. This resolution can only be performed from DSL
top-level-elements, which have global representations in the ExtensionModel
, so this method will return an
Optional.empty()
result if the given applicationElement
does not identify either a ConfigurationModel
,
OperationModel
, SourceModel
or an ObjectType
than can be expressed as an explicit top level element.T
- the expected model type of the element
componentConfiguration
- the ComponentConfiguration
for which its DslElementModel
representation is
required.DslElementModel
representation of the ComponentConfiguration
if one is possible to be built based
on the extensions
provided as resolution context, or Optional.empty()
if no
DslElementModel
could be created for the given applicationElement
with the current extensions
context.Copyright © 2018. All rights reserved.